/* PsyWrite - Reports Page Styles */

/* Reports Container */
.reports-container {
  min-height: 100vh;
  background-color: #f9fafb;
  padding-top: 40px;
}

/* Page Header */
.reports-header {
  text-align: center;
  margin-bottom: 2rem;
}

.reports-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--text-color);
  margin-bottom: 0.5rem;
}

.reports-subtitle {
  font-size: 1.1rem;
  color: var(--text-light);
  margin-bottom: 0;
}

/* Search Section */
.search-container {
  position: relative;
  max-width: 600px;
}

.search-container i {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-light);
  z-index: 10;
}

.search-container .form-control {
  padding-left: 40px;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  font-size: 0.95rem;
}

.search-container .form-control:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.2rem rgba(79, 70, 229, 0.25);
}

/* Search and Filter Section */
.search-input-group {
  position: relative;
}

.search-input-group i {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-light);
  z-index: 10;
}

.search-input-group .form-control {
  padding-left: 40px;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  font-size: 0.95rem;
}

.search-input-group .form-control:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.2rem rgba(79, 70, 229, 0.25);
}

/* Report Cards */
.report-card {
  transition: all 0.3s ease;
  margin-bottom: 1.5rem;
}

.report-card:hover {
  transform: translateY(-2px);
}

.report-card .app-card {
  height: 100%;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  overflow: hidden;
}

.report-card-header {
  background: linear-gradient(
    135deg,
    var(--primary-color) 0%,
    var(--primary-hover) 100%
  );
  color: white;
  padding: 1rem;
  margin: 0;
}

.report-card-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
  line-height: 1.3;
}

.report-card-client {
  font-size: 0.9rem;
  opacity: 0.9;
  margin-bottom: 0;
}

.report-card-body {
  padding: 1rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.report-summary {
  color: var(--text-light);
  font-size: 0.9rem;
  line-height: 1.4;
  margin-bottom: 1rem;
  flex-grow: 1;
}

.report-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  padding-top: 0.5rem;
  border-top: 1px solid #f0f0f0;
}

.report-date {
  display: flex;
  align-items: center;
  color: var(--text-light);
  font-size: 0.85rem;
}

.report-date i {
  margin-right: 0.25rem;
}

.report-status {
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
}

.status-completed {
  background-color: #d1fae5;
  color: #065f46;
}

.status-draft {
  background-color: #fef3c7;
  color: #92400e;
}

.report-card-actions {
  display: flex;
  gap: 0.5rem;
}

.btn-sm {
  font-size: 0.8rem;
  padding: 0.375rem 0.75rem;
}

.btn-outline-primary:hover {
  transform: translateY(-1px);
}

.btn-outline-danger:hover {
  transform: translateY(-1px);
}

/* Empty State */
.empty-state {
  padding: 3rem 1rem;
}

.empty-state-icon {
  font-size: 4rem;
  color: var(--text-light);
  margin-bottom: 1rem;
}

.empty-state h3 {
  color: var(--text-color);
  margin-bottom: 1rem;
}

.empty-state p {
  font-size: 1rem;
  margin-bottom: 2rem;
}

/* Pagination */
.pagination {
  --bs-pagination-color: var(--text-color);
  --bs-pagination-hover-color: var(--primary-color);
  --bs-pagination-hover-bg: rgba(79, 70, 229, 0.1);
  --bs-pagination-focus-color: var(--primary-color);
  --bs-pagination-active-color: white;
  --bs-pagination-active-bg: var(--primary-color);
  --bs-pagination-active-border-color: var(--primary-color);
}

/* Report Content Modal */
.report-content {
  font-family: "Inter", sans-serif;
  line-height: 0.8;
  color: var(--text-color);
}

.report-content h1,
.report-content h2,
.report-content h3 {
  color: var(--text-color);
  margin-top: 1.5rem;
  margin-bottom: 1rem;
}

.report-content h1 {
  font-size: 1.5rem;
  font-weight: 700;
}

.report-content h2 {
  font-size: 1.3rem;
  font-weight: 600;
}

.report-content h3 {
  font-size: 1.1rem;
  font-weight: 600;
}

.report-content p {
  margin-bottom: 1rem;
  text-align: justify;
}

.report-content ul,
.report-content ol {
  margin-bottom: 0.4rem;
  margin-top: 0.2rem;
  padding-left: 1.2rem;
}

.report-content li {
  margin-bottom: 0.5rem;
}

/* Compact Markdown Report Styles for Modal */
.report-content h1,
.report-content h2,
.report-content h3,
.report-content h4,
.report-content h5,
.report-content h6 {
  margin-top: 1.2rem;
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

.report-content h1:first-child,
.report-content h2:first-child,
.report-content h3:first-child {
  margin-top: 0;
}

.report-content p {
  margin-bottom: 0.7rem;
  line-height: 1.5;
}

.report-content ul,
.report-content ol {
  margin-bottom: 0.8rem;
  padding-left: 1.2rem;
}

.report-content li {
  margin-bottom: 0.3rem;
  line-height: 1.4;
}

.report-content li:last-child {
  margin-bottom: 0;
}

/* Remove excessive spacing from nested elements */
.report-content ul ul,
.report-content ol ol,
.report-content ul ol,
.report-content ol ul {
  margin-top: 0.3rem;
  margin-bottom: 0.3rem;
}

/* Ensure good readability in modal */
.report-content {
  font-size: 0.95rem;
  color: #333;
  max-height: 70vh;
  overflow-y: auto;
}

/* Loading States */
.loading-card {
  background: linear-gradient(
    90deg,
    #f0f0f0 25%,
    transparent 37%,
    transparent 63%,
    #f0f0f0 75%
  );
  background-size: 400% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
}

@keyframes shimmer {
  0% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

/* Responsive Design */
@media (max-width: 768px) {
  .reports-title {
    font-size: 2rem;
  }

  .reports-subtitle {
    font-size: 1rem;
  }

  .search-input-group,
  .form-select {
    margin-bottom: 1rem;
  }

  .report-card-actions {
    flex-direction: column;
  }

  .report-card-actions .btn {
    width: 100%;
    margin-bottom: 0.25rem;
  }

  .report-card-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
}

@media (max-width: 576px) {
  .reports-container {
    padding-top: 70px;
  }

  .empty-state {
    padding: 2rem 0.5rem;
  }

  .empty-state-icon {
    font-size: 3rem;
  }
}

/* Feature Request Cards */
.feature-request-card {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  padding: 1.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  transition: box-shadow 0.2s ease;
}

.feature-request-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.vote-btn {
  min-width: 80px;
  transition: all 0.2s ease;
}

.vote-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* Status badge colors */
.badge.bg-primary {
  background-color: #3b82f6 !important;
}
.badge.bg-success {
  background-color: #10b981 !important;
}
.badge.bg-warning {
  background-color: #f59e0b !important;
}
.badge.bg-danger {
  background-color: #ef4444 !important;
}
.badge.bg-secondary {
  background-color: #6b7280 !important;
}
