/* ============================================================
   FEEDBACK.CSS — Star Rating and Real-Time Review Panel Styles
   ============================================================ */

/* ---- Tabs Navigation Bar ---- */
.feedback-tabs-bar {
  background: var(--clr-surface, rgba(22, 22, 30, 0.4));
  border-bottom: 1px solid var(--clr-border, rgba(255, 255, 255, 0.08));
  position: sticky;
  top: var(--nav-h);
  z-index: 100;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.feedback-tabs {
  display: flex;
  gap: 1.5rem;
  padding: 0.75rem 0;
}

.tab-btn {
  background: none;
  border: none;
  padding: 0.5rem 1rem;
  font-family: var(--font-head);
  font-size: var(--fs-sm, 0.875rem);
  font-weight: 600;
  color: var(--clr-text-3, rgba(255, 255, 255, 0.5));
  cursor: pointer;
  position: relative;
  transition: color 0.3s ease;
}

.tab-btn:hover {
  color: var(--clr-text, #fff);
}

.tab-btn.active {
  color: var(--clr-accent, #0066FF);
}

.tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: -0.75rem;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--clr-accent, #0066FF);
  border-radius: 999px;
}

.admin-tab {
  margin-left: auto;
  border: 1px dashed rgba(255, 255, 255, 0.15);
  border-radius: var(--r-md, 8px);
  padding: 0.35rem 0.75rem;
}
.admin-tab.active {
  border-color: var(--clr-accent, #0066FF);
}

/* Tab Content Visibility */
.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* ---- Stat Cards Header ---- */
.reviews-stats-row {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 2.5rem;
  justify-content: center;
}

.reviews-stat-card {
  background: var(--clr-surface, rgba(22, 22, 30, 0.45));
  border: 1px solid var(--clr-border, rgba(255, 255, 255, 0.08));
  border-radius: var(--r-lg, 16px);
  padding: 1.25rem 2rem;
  text-align: center;
  min-width: 180px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.reviews-stat-card .stat-num {
  font-family: var(--font-head);
  font-size: var(--fs-xl, 2rem);
  font-weight: 800;
  color: var(--clr-accent, #0066FF);
  display: block;
}

.reviews-stat-card .stat-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--clr-text-3, rgba(255, 255, 255, 0.5));
  margin-top: 0.25rem;
}

/* ---- Reviews Cards Grid ---- */
.reviews-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
  margin-bottom: 4rem;
}

.review-card {
  background: var(--clr-surface, rgba(22, 22, 30, 0.4));
  border: 1px solid var(--clr-border, rgba(255, 255, 255, 0.08));
  border-radius: var(--r-xl, 24px);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  position: relative;
  transition: all 0.3s ease;
}

.review-card:hover {
  transform: translateY(-5px);
  border-color: rgba(0, 102, 255, 0.2);
}

.review-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.client-info h4 {
  font-family: var(--font-head);
  font-size: var(--fs-sm, 0.95rem);
  font-weight: 700;
  color: var(--clr-text, #fff);
}

.client-info span {
  font-size: var(--fs-xs, 0.75rem);
  color: var(--clr-text-3, rgba(255, 255, 255, 0.5));
}

.star-rating-display {
  color: #FBBF24; /* Star Gold */
  font-size: var(--fs-sm, 0.875rem);
  letter-spacing: 2px;
}

.review-msg {
  font-size: var(--fs-sm, 0.875rem);
  color: var(--clr-text-2, #ccc);
  line-height: 1.6;
}

.review-date {
  font-size: 0.68rem;
  color: var(--clr-text-3, rgba(255, 255, 255, 0.4));
  text-align: right;
  margin-top: auto;
  border-top: 1px solid var(--clr-border, rgba(255, 255, 255, 0.05));
  padding-top: 0.75rem;
}

/* Loading status */
.reviews-loading-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 4rem 2rem;
  color: var(--clr-text-3, rgba(255, 255, 255, 0.5));
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

/* ---- Write Review Form Form styling ---- */
.feedback-form-card {
  background: var(--clr-surface, rgba(22, 22, 30, 0.55));
  border: 1px solid var(--clr-border, rgba(255, 255, 255, 0.08));
  border-radius: var(--r-xl, 24px);
  padding: clamp(1.75rem, 3.5vw, 2.5rem);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  margin-bottom: 4rem;
}

/* Star Rating Selector */
.rating-input-group {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.rating-group-label {
  font-size: var(--fs-sm, 0.875rem);
  font-weight: 600;
  color: var(--clr-text-2, #ccc);
}

.star-rating-selector {
  display: flex;
  gap: 0.25rem;
}

.rating-star {
  font-size: var(--fs-xl, 1.75rem);
  color: rgba(255, 255, 255, 0.15);
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.rating-star:hover,
.rating-star.hovered,
.rating-star.selected {
  color: #FBBF24;
}

/* ---- Admin Dashboard ---- */
.admin-overview-stats {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  margin-bottom: 2.5rem;
}

.admin-table-wrap {
  background: var(--clr-surface, rgba(22, 22, 30, 0.5));
  border: 1px solid var(--clr-border, rgba(255, 255, 255, 0.08));
  border-radius: var(--r-xl, 24px);
  padding: 2rem;
  margin-bottom: 4rem;
}

.admin-table-wrap h3 {
  font-family: var(--font-head);
  font-size: var(--fs-md, 1.125rem);
  font-weight: 700;
  color: var(--clr-text, #fff);
  margin-bottom: 1.5rem;
}

.admin-table-scroll {
  overflow-x: auto;
}

.moderation-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.moderation-table th,
.moderation-table td {
  padding: 1rem 1.25rem;
  font-size: var(--fs-sm, 0.875rem);
  border-bottom: 1px solid var(--clr-border, rgba(255, 255, 255, 0.06));
}

.moderation-table th {
  font-family: var(--font-head);
  font-weight: 700;
  color: var(--clr-text-3, rgba(255, 255, 255, 0.5));
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
}

.moderation-table td {
  color: var(--clr-text-2, #ccc);
}

.moderation-table .admin-msg-cell {
  max-width: 280px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Admin Actions Buttons */
.admin-action-btn {
  padding: 0.35rem 0.75rem;
  font-size: var(--fs-xs, 0.75rem);
  font-weight: 600;
  border-radius: var(--r-md, 6px);
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-right: 0.4rem;
}

.admin-action-btn.approve-btn {
  background: rgba(16, 185, 129, 0.15);
  color: #10B981;
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.admin-action-btn.approve-btn:hover {
  background: #10B981;
  color: #fff;
}

.admin-action-btn.reject-btn {
  background: rgba(239, 68, 68, 0.15);
  color: #EF4444;
  border: 1px solid rgba(239, 68, 68, 0.25);
}

.admin-action-btn.reject-btn:hover {
  background: #EF4444;
  color: #fff;
}

/* Auth card overrides */
.admin-auth-card {
  background: var(--clr-glass, rgba(22, 22, 30, 0.7));
  border: 1px solid var(--clr-glass-border, rgba(255, 255, 255, 0.1));
  border-radius: var(--r-xl, 24px);
  padding: 2rem;
  box-shadow: var(--shadow-md);
  margin-top: 2rem;
  margin-bottom: 4rem;
  backdrop-filter: blur(20px);
}

.admin-auth-card h3 {
  font-family: var(--font-head);
  font-weight: 700;
  color: var(--clr-text, #fff);
}

.admin-auth-card p {
  font-size: var(--fs-sm, 0.875rem);
  color: var(--clr-text-3, rgba(255, 255, 255, 0.5));
}

/* Light mode support */
[data-theme="light"] .feedback-tabs-bar {
  background: var(--clr-surface, #ffffff);
}
[data-theme="light"] .reviews-stat-card,
[data-theme="light"] .review-card,
[data-theme="light"] .feedback-form-card,
[data-theme="light"] .admin-table-wrap,
[data-theme="light"] .admin-auth-card {
  background: var(--clr-surface, #ffffff);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.03);
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
  .reviews-stats-row,
  .admin-overview-stats {
    flex-direction: column;
    align-items: stretch;
  }
}
