/* ============================================
   Triad Pool & Spa — Reviews Styles
   ============================================
   Supports two display modes:
   - Grid (Style C) — default
   - Carousel (Style A)
   Controlled via admin settings.
   ============================================ */


/* ── Summary Bar (both modes) ── */
.review-summary {
  display: flex;
  align-items: center;
  justify-content: space-evenly;
  gap: 1.5rem;
  margin-bottom: 2.5rem;
  padding: 1.25rem 1.5rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  flex-wrap: wrap;
}

.review-summary-rating {
  text-align: center;
}

.review-summary-number {
  font-size: 2rem;
  font-weight: 700;
  color: var(--navy);
  line-height: 1;
}

.review-summary-stars {
  color: #f59e0b;
  font-size: 0.9rem;
  letter-spacing: 1px;
  margin-top: 0.2rem;
}

.review-summary-label {
  font-size: 0.72rem;
  color: var(--sub);
  margin-top: 0.2rem;
}

.review-summary-divider {
  width: 1px;
  height: 40px;
  background: var(--border);
}

.review-summary-stat {
  font-size: 0.85rem;
  color: var(--sub);
}

.review-summary-stat strong {
  color: var(--navy);
}

.review-summary-cta {
  display: flex;
  align-items: center;
}
.review-summary-cta .review-cta-btn {
  padding: 0.55rem 1.25rem;
  font-size: 0.82rem;
}


/* ── Stars (shared) ── */
.review-stars {
  color: #f59e0b;
  font-size: 0.85rem;
  letter-spacing: 1px;
}

.review-stars-empty {
  color: var(--border);
}


/* ── Verified Badge (shared) ── */
.review-verified {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.review-verified::before {
  content: "✓";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 0.55rem;
  font-weight: 700;
}


/* ── Service Tag (shared) ── */
.review-service-tag {
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--sub);
  background: var(--bg3);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  display: inline-block;
}


/* ── Avatar (shared) ── */
.review-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--navy);
  flex-shrink: 0;
}


/* ═══════════════════════════════════════
   GRID MODE (Style C)
   ═══════════════════════════════════════ */
.reviews-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.review-grid-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.review-grid-card:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 20px rgba(8, 145, 178, 0.08);
}

.review-grid-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.75rem;
}

.review-grid-author {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.review-grid-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--navy);
}

.review-grid-date {
  font-size: 0.7rem;
  color: var(--sub);
}

.review-grid-text {
  font-size: 0.84rem;
  color: var(--sub);
  line-height: 1.65;
  margin-bottom: 0.75rem;
}

.review-grid-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Show More button */
.reviews-show-more {
  text-align: center;
  margin-top: 1.5rem;
}

.reviews-show-more-btn {
  background: var(--bg);
  color: var(--text);
  padding: 0.65rem 1.75rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.85rem;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}

.reviews-show-more-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}


/* ═══════════════════════════════════════
   CAROUSEL MODE (Style A)
   ═══════════════════════════════════════ */
.reviews-carousel-wrapper {
  overflow: hidden;
  position: relative;
}

.reviews-carousel-track {
  display: flex;
  transition: transform 0.5s ease;
}

.review-carousel-card {
  padding: 0 0.625rem;
  box-sizing: border-box;
  flex-shrink: 0;
}

.review-carousel-inner {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.75rem;
  height: 100%;
  display: flex;
  flex-direction: column;
  transition: border-color 0.2s;
}

.review-carousel-inner:hover {
  border-color: var(--accent);
}

.review-carousel-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.review-carousel-meta h4 {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 0.1rem;
}

.review-carousel-meta .review-date {
  font-size: 0.72rem;
  color: var(--sub);
}

.review-carousel-text {
  font-size: 0.85rem;
  color: var(--sub);
  line-height: 1.65;
  flex: 1;
  margin: 0.75rem 0;
}

.review-carousel-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}

/* Carousel controls */
.reviews-carousel-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  margin-top: 1.25rem;
}

.reviews-carousel-arrow {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 0.85rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.reviews-carousel-arrow:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.reviews-carousel-dots {
  display: flex;
  gap: 0.35rem;
}

.reviews-carousel-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--border);
  cursor: pointer;
  transition: all 0.2s;
}

.reviews-carousel-dot.active {
  background: var(--accent);
  width: 18px;
  border-radius: 3px;
}


/* ── "Leave a Review" Button ── */
.review-cta {
  text-align: center;
  margin-top: 2rem;
}

.review-cta-btn {
  background: var(--navy);
  color: #fff;
  padding: 0.75rem 1.75rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.88rem;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border: none;
  cursor: pointer;
  transition: background 0.2s;
  font-family: inherit;
}

.review-cta-btn:hover {
  background: var(--accent);
}


/* ═══════════════════════════════════════
   GOOGLE REVIEWS BADGE
   ═══════════════════════════════════════ */
.google-reviews-badge {
  display: flex;
  align-items: center;
  justify-content: space-evenly;
  gap: 1.5rem;
  margin-top: 1.25rem;
  margin-bottom: 1.5rem;
  padding: 0.9rem 1.5rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  flex-wrap: wrap;
}
.google-badge-left {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.google-badge-icon {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}
.google-badge-info {
  display: flex;
  flex-direction: column;
}
.google-badge-title {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--navy);
}
.google-badge-rating {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 1px;
}
.google-badge-score {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--navy);
}
.google-badge-stars {
  color: #f59e0b;
  font-size: 0.8rem;
  letter-spacing: 1px;
}
.google-badge-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.google-badge-btn {
  padding: 0.65rem 1.5rem;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: all 0.2s;
  font-family: inherit;
  cursor: pointer;
  border: none;
}
.google-btn-see {
  background: var(--navy);
  color: #fff;
}
.google-btn-see:hover {
  background: var(--accent);
}
.google-btn-leave {
  background: transparent;
  color: var(--navy);
  border: 1.5px solid var(--border);
}
.google-btn-leave:hover {
  border-color: var(--navy);
  background: rgba(15, 43, 76, 0.04);
}

/* Dark mode */
[data-theme="dark"] .google-reviews-badge {
  background: var(--bg);
  border-color: var(--border);
}
[data-theme="dark"] .google-badge-title,
[data-theme="dark"] .google-badge-score {
  color: var(--text);
}
[data-theme="dark"] .google-btn-see {
  background: #e2e8f0;
  color: #0f172a;
}
[data-theme="dark"] .google-btn-see:hover {
  background: var(--accent);
  color: #fff;
}
[data-theme="dark"] .google-btn-leave {
  color: var(--text);
  border-color: var(--border);
}
[data-theme="dark"] .google-btn-leave:hover {
  border-color: var(--text);
}

@media (max-width: 768px) {
  .google-reviews-badge {
    flex-direction: column;
    text-align: center;
    gap: 0.75rem;
    padding: 0.75rem;
  }
  .google-badge-left { justify-content: center; }
  .google-badge-actions { justify-content: center; flex-wrap: wrap; }
}


/* ═══════════════════════════════════════
   REVIEW SUBMISSION MODAL
   ═══════════════════════════════════════ */
.review-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 9998;
  background: rgba(0, 0, 0, 0.4);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.review-modal-backdrop.active {
  display: flex;
}

.review-modal {
  background: var(--bg);
  border-radius: 14px;
  padding: 2.25rem;
  width: 480px;
  max-width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

.review-modal-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 0.25rem;
}

.review-modal-desc {
  font-size: 0.82rem;
  color: var(--sub);
  margin-bottom: 1.75rem;
}

.review-form-group {
  margin-bottom: 1.1rem;
}

.review-form-group label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.35rem;
}

.review-form-group .label-optional {
  font-weight: 400;
  color: var(--sub);
  margin-left: 0.2rem;
}

.review-input,
.review-select,
.review-textarea {
  width: 100%;
  padding: 0.6rem 0.8rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.88rem;
  font-family: inherit;
  color: var(--text);
  background: var(--bg);
  transition: border-color 0.2s;
}

.review-input:focus,
.review-select:focus,
.review-textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(8, 145, 178, 0.1);
}

.review-textarea {
  resize: vertical;
  min-height: 100px;
}

.review-char-count {
  font-size: 0.7rem;
  color: var(--sub);
  text-align: right;
  margin-top: 0.25rem;
}

.review-char-count.over {
  color: #dc2626;
}


/* ── Star Rating Input ── */
.star-rating-input {
  display: flex;
  gap: 0.3rem;
  flex-direction: row-reverse;
  justify-content: flex-end;
}

.star-rating-input input {
  display: none;
}

.star-rating-input label {
  font-size: 1.8rem;
  color: var(--border);
  cursor: pointer;
  transition: color 0.15s;
  line-height: 1;
  margin-bottom: 0;
}

.star-rating-input label:hover,
.star-rating-input label:hover ~ label,
.star-rating-input input:checked ~ label {
  color: #f59e0b;
}


/* ── Modal Actions ── */
.review-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.6rem;
  margin-top: 1.5rem;
}

.review-modal-cancel {
  padding: 0.6rem 1.25rem;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  transition: all 0.2s;
  font-family: inherit;
}

.review-modal-cancel:hover {
  border-color: var(--sub);
}

.review-modal-submit {
  padding: 0.6rem 1.25rem;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  background: var(--navy);
  color: #fff;
  transition: background 0.2s;
  font-family: inherit;
}

.review-modal-submit:hover {
  background: var(--accent);
}

.review-modal-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.review-form-error {
  font-size: 0.78rem;
  color: #dc2626;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 6px;
  padding: 0.5rem 0.75rem;
  margin-bottom: 1rem;
  display: none;
}

.review-form-error.show {
  display: block;
}

.review-form-success {
  text-align: center;
  padding: 2rem 1rem;
}

.review-form-success-icon {
  font-size: 3rem;
  margin-bottom: 0.75rem;
}

.review-form-success-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 0.35rem;
}

.review-form-success-text {
  font-size: 0.88rem;
  color: var(--sub);
  margin-bottom: 1.5rem;
}


/* ── Empty Reviews State ── */
.reviews-empty {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--sub);
}

.reviews-empty-icon {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
  opacity: 0.3;
}

.reviews-empty-text {
  font-size: 0.92rem;
  margin-bottom: 0.3rem;
}

.reviews-empty-hint {
  font-size: 0.78rem;
  color: var(--sub);
}


/* ═══════════════════════════════════════
   ADMIN — REVIEWS TAB STYLES
   ═══════════════════════════════════════ */
.admin-review-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.25rem;
  margin-bottom: 0.75rem;
  transition: border-color 0.2s;
}

.admin-review-card:hover {
  border-color: var(--accent);
}

.admin-review-card.pending {
  border-left: 3px solid #f59e0b;
}

.admin-review-card.rejected {
  border-left: 3px solid #dc2626;
  opacity: 0.7;
}

.admin-review-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.5rem;
}

.admin-review-author {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.admin-review-name {
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--navy);
}

.admin-review-email {
  font-size: 0.72rem;
  color: var(--sub);
}

.admin-review-info {
  text-align: right;
  font-size: 0.72rem;
  color: var(--sub);
}

.admin-review-status {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 0.12rem 0.45rem;
  border-radius: 4px;
}

.admin-review-status.approved {
  background: #dcfce7;
  color: #16a34a;
}

.admin-review-status.pending {
  background: #fef3c7;
  color: #d97706;
}

.admin-review-status.rejected {
  background: #fef2f2;
  color: #dc2626;
}

.admin-review-text {
  font-size: 0.84rem;
  color: var(--text);
  line-height: 1.6;
  margin: 0.5rem 0;
}

.admin-review-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.75rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border);
}

.admin-review-actions {
  display: flex;
  gap: 0.35rem;
}

.admin-review-meta {
  font-size: 0.7rem;
  color: var(--sub);
}

/* Pending count badge on tab */
.admin-tab-badge {
  background: #dc2626;
  color: #fff;
  font-size: 0.6rem;
  font-weight: 700;
  padding: 0.1rem 0.35rem;
  border-radius: 10px;
  margin-left: 0.3rem;
  min-width: 16px;
  text-align: center;
  display: inline-block;
}

/* Filter bar */
.admin-review-filters {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.admin-review-filter-btn {
  padding: 0.4rem 0.85rem;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--sub);
  transition: all 0.15s;
  font-family: inherit;
}

.admin-review-filter-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.admin-review-filter-btn.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}


/* ═══════════════════════════════════════
   DARK MODE
   ═══════════════════════════════════════ */
[data-theme="dark"] .review-summary {
  background: var(--bg2);
}

[data-theme="dark"] .review-grid-card {
  background: var(--bg2);
}

[data-theme="dark"] .review-carousel-inner {
  background: var(--bg2);
}

[data-theme="dark"] .review-modal {
  background: var(--bg2);
}

[data-theme="dark"] .review-input,
[data-theme="dark"] .review-select,
[data-theme="dark"] .review-textarea {
  background: var(--bg);
  color: var(--text);
}

[data-theme="dark"] .review-form-error {
  background: #450a0a;
  border-color: #7f1d1d;
  color: #fca5a5;
}

[data-theme="dark"] .review-modal-cancel {
  background: var(--bg);
  color: var(--text);
}

[data-theme="dark"] .review-modal-submit {
  background: var(--accent);
  color: #111318;
}

[data-theme="dark"] .review-cta-btn {
  background: var(--accent);
  color: #111318;
}

[data-theme="dark"] .reviews-show-more-btn {
  background: var(--bg2);
  color: var(--text);
}

[data-theme="dark"] .review-service-tag {
  background: var(--bg);
}

[data-theme="dark"] .admin-review-card {
  background: var(--bg2);
}

[data-theme="dark"] .admin-review-status.approved {
  background: #052e16;
  color: #4ade80;
}

[data-theme="dark"] .admin-review-status.pending {
  background: #422006;
  color: #fbbf24;
}

[data-theme="dark"] .admin-review-status.rejected {
  background: #450a0a;
  color: #f87171;
}

[data-theme="dark"] .admin-review-filter-btn {
  background: var(--bg2);
  color: var(--sub);
}

[data-theme="dark"] .admin-review-filter-btn.active {
  background: var(--accent);
  color: #111318;
}


/* ═══════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════ */
@media (max-width: 768px) {
  .reviews-grid {
    grid-template-columns: 1fr 1fr;
  }

  .review-carousel-card {
    flex: 0 0 50%;
  }

  .review-summary {
    gap: 1.25rem;
    padding: 1rem;
  }

  .review-summary-divider {
    display: none;
  }

  .review-modal {
    padding: 1.5rem;
  }
}

@media (max-width: 480px) {
  .reviews-grid {
    grid-template-columns: 1fr;
  }

  .review-carousel-card {
    flex: 0 0 100%;
  }

  .review-summary {
    flex-direction: column;
    gap: 0.75rem;
  }
}
