/* ==========================================================================
   FEEDBACK & REVIEWS PAGE STYLING
   Verified Customer Ratings, Filter Console, and Responsive Layout
   ========================================================================== */

/* Feedback Hero Section */
.feedback-hero {
    padding: clamp(1.5rem, 4vw, 3rem) 0 clamp(1rem, 2.5vw, 1.75rem);
    text-align: center;
    position: relative;
    max-width: 860px;
    margin: 0 auto;
}
.rating-summary-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    background: rgba(212, 175, 55, 0.12);
    border: 1px solid rgba(212, 175, 55, 0.35);
    color: var(--gold-dark);
    padding: 0.4rem 1.15rem;
    border-radius: 9999px;
    font-size: clamp(0.78rem, 2.3vw, 0.88rem);
    font-weight: 600;
    margin-bottom: 1rem;
    box-shadow: 0 2px 8px var(--gold-subtle);
    max-width: 100%;
    box-sizing: border-box;
    flex-wrap: wrap;
    line-height: 1.35;
}
[data-theme="dark"] .rating-summary-pill {
    color: var(--gold-light);
    background: rgba(212, 175, 55, 0.15);
    border-color: rgba(212, 175, 55, 0.4);
}
.feedback-page-title {
    font-family: var(--font-royal, 'Cinzel', serif);
    font-size: clamp(1.4rem, 4.5vw, 2.45rem);
    letter-spacing: -0.015em;
    line-height: 1.22;
    margin: 0.65rem 0 0.5rem;
    color: var(--text);
    overflow-wrap: break-word;
    word-break: break-word;
}
.feedback-hero-subtitle {
    color: var(--text-muted);
    max-width: 620px;
    margin: 0 auto;
    font-size: clamp(0.86rem, 2.2vw, 0.95rem);
    line-height: 1.6;
    padding: 0 0.5rem;
}

/* Two-Column Master-Detail Layout */
.feedback-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr);
    gap: clamp(1.25rem, 2.5vw, 2rem);
    align-items: flex-start;
    margin-top: clamp(1.25rem, 2.5vw, 2rem);
}
.feedback-layout > * {
    min-width: 0;
    max-width: 100%;
}
.feedback-form-card {
    background: var(--card-bg, #ffffff);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: clamp(1.25rem, 2.5vw, 1.75rem);
    position: sticky;
    top: 90px;
    max-height: calc(100vh - 110px);
    overflow-y: auto;
    box-shadow: var(--card-shadow);
    transition: background 0.3s ease, border-color 0.3s ease;
    box-sizing: border-box;
}

/* Mobile Review Form Collapsible Toggle */
.mobile-review-toggle-btn {
    display: none;
    width: 100%;
    background: linear-gradient(135deg, #fae28b 0%, #d4af37 45%, #b38209 100%);
    border: 1.5px solid #875e03;
    color: #080a12 !important;
    padding: 0.85rem 1.15rem;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 800;
    cursor: pointer;
    margin-bottom: 1.25rem;
    align-items: center;
    justify-content: space-between;
    font-family: inherit;
    box-shadow: 0 4px 16px rgba(179, 130, 9, 0.35);
    transition: all 0.2s ease;
    box-sizing: border-box;
    gap: 0.5rem;
    touch-action: manipulation;
}
.mobile-review-toggle-btn:hover,
.mobile-review-toggle-btn:focus-visible {
    background: linear-gradient(135deg, #ffffff 0%, #fae28b 45%, #d4af37 100%);
    color: #000000 !important;
    box-shadow: 0 6px 20px rgba(179, 130, 9, 0.45);
    transform: translateY(-1px);
}
.mobile-review-toggle-btn span,
.mobile-review-toggle-btn strong {
    color: #080a12 !important;
    font-weight: 800;
}
.mobile-review-toggle-btn:hover span,
.mobile-review-toggle-btn:hover strong {
    color: #000000 !important;
}
.mobile-review-toggle-btn #mobile-fb-toggle-icon {
    font-size: 0.82rem;
    font-weight: 800;
    color: #080a12 !important;
    background: rgba(0, 0, 0, 0.12);
    padding: 0.32rem 0.75rem;
    border-radius: 8px;
    border: 1px solid rgba(0, 0, 0, 0.2);
    display: inline-flex;
    align-items: center;
    letter-spacing: 0.3px;
    white-space: nowrap;
}
.mobile-review-toggle-btn:hover #mobile-fb-toggle-icon {
    color: #000000 !important;
    background: rgba(0, 0, 0, 0.18);
    border-color: rgba(0, 0, 0, 0.3);
}

/* Form Inputs & Touch Targets */
.feedback-form-card .form-group {
    margin-bottom: 1.15rem;
}
.feedback-form-card .form-group label {
    display: block;
    font-size: 0.84rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.4rem;
}
.feedback-form-card input[type="text"],
.feedback-form-card input[type="email"],
.feedback-form-card textarea {
    width: 100%;
    box-sizing: border-box;
    background: var(--bg-secondary, #ffffff);
    border: 1px solid var(--border);
    color: var(--text);
    border-radius: 8px;
    padding: 0.75rem 0.85rem;
    font-family: inherit;
    font-size: 16px !important; /* Prevents auto-zoom on iOS */
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.feedback-form-card input[type="text"]:focus,
.feedback-form-card input[type="email"]:focus,
.feedback-form-card textarea:focus {
    border-color: var(--gold);
    outline: none;
    box-shadow: 0 0 0 3px var(--gold-subtle);
}
.feedback-form-card textarea {
    resize: vertical;
    min-height: 95px;
}

/* Star Selector with Fluid Touch Targets */
.star-rating-select {
    display: flex;
    gap: clamp(0.35rem, 2vw, 0.6rem);
    margin: 0.4rem 0 0.85rem 0;
    flex-wrap: wrap;
    touch-action: manipulation;
}
.star-btn {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    color: var(--text-muted);
    font-size: clamp(1.2rem, 3.8vw, 1.4rem);
    width: clamp(40px, 11vw, 46px);
    height: clamp(40px, 11vw, 46px);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}
.star-btn:hover, .star-btn.active {
    background: var(--gold-gradient);
    color: #080a12;
    border-color: var(--gold);
    transform: scale(1.06);
    box-shadow: 0 4px 14px var(--gold-glow);
}

/* Reviews Stream Header & Filter Console */
.reviews-header-bar {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 0.85rem;
    flex-wrap: wrap;
    gap: 0.75rem;
}
.reviews-header-info {
    flex: 1 1 auto;
    min-width: 240px;
}
.reviews-header-title {
    margin: 0;
    color: var(--text);
    font-size: clamp(1.1rem, 3.2vw, 1.35rem);
    font-weight: 700;
    line-height: 1.25;
}
.reviews-header-subtitle {
    margin: 0.25rem 0 0;
    color: var(--text-muted);
    font-size: clamp(0.78rem, 2.2vw, 0.84rem);
}
.reviews-sort-wrap {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 0.35rem 0.75rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}
.sort-label {
    font-size: 0.76rem;
    font-weight: 600;
    color: var(--text-muted);
    white-space: nowrap;
}
.review-sort-select {
    background: transparent;
    border: none;
    color: var(--text);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    outline: none;
    padding: 0.15rem 0.25rem;
    border-radius: 4px;
}
.review-sort-select option {
    background: var(--surface, #ffffff);
    color: var(--text, #111827);
}
[data-theme="dark"] .review-sort-select option {
    background: #151926;
    color: #f3f4f6;
}

.reviews-filter-console {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: clamp(12px, 2.5vw, 16px);
    padding: clamp(0.85rem, 2.5vw, 1.15rem);
    margin-bottom: 1.25rem;
    box-shadow: var(--card-shadow);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.filter-search-box {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
}
.filter-search-box .search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    z-index: 2;
}
input.review-search-input,
.review-search-input {
    width: 100% !important;
    height: 44px !important;
    min-height: 44px !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    padding-left: 44px !important;
    padding-right: 40px !important;
    border-radius: 10px !important;
    border: 1px solid var(--border) !important;
    background: var(--bg-secondary) !important;
    color: var(--text) !important;
    font-size: clamp(0.82rem, 2.4vw, 0.88rem) !important;
    box-sizing: border-box !important;
    outline: none !important;
    transition: border-color 0.2s ease, box-shadow 0.2s ease !important;
}
.review-search-input:focus {
    border-color: var(--gold) !important;
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.18) !important;
}
.review-search-input::placeholder {
    color: var(--text-muted) !important;
    opacity: 0.75 !important;
}
.filter-search-box .search-clear-btn {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: none;
    background: rgba(128, 128, 128, 0.18);
    color: var(--text-muted);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    line-height: 1;
    transition: background-color 0.2s ease, color 0.2s ease;
    z-index: 2;
}
.filter-search-box .search-clear-btn:hover {
    background: rgba(212, 175, 55, 0.25);
    color: var(--gold);
}

.filter-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
}
.filter-row-label {
    font-size: 0.74rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    flex-shrink: 0;
    min-width: 72px;
}
.filter-pills-row {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
    align-items: center;
    flex: 1;
}
.filter-pill {
    padding: 0.32rem 0.78rem;
    border-radius: 9999px;
    border: 1px solid var(--border);
    background: var(--surface-elevated, var(--surface));
    color: var(--text-muted);
    font-size: clamp(0.75rem, 2.2vw, 0.8rem);
    cursor: pointer;
    transition: all 0.18s ease-in-out;
    white-space: nowrap;
    touch-action: manipulation;
    min-height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    font-weight: 600;
}
.filter-pill:hover {
    color: var(--gold-dark);
    border-color: var(--gold);
}
[data-theme="dark"] .filter-pill:hover {
    color: var(--gold-light);
}
.filter-pill.active {
    background: var(--gold-gradient);
    color: #080a12;
    font-weight: 700;
    border-color: var(--gold);
    box-shadow: 0 2px 8px var(--gold-glow);
}
.pill-badge {
    font-size: 0.68rem;
    padding: 1px 6px;
    border-radius: 9999px;
    background: rgba(0, 0, 0, 0.08);
    font-weight: 700;
}
.filter-pill.active .pill-badge {
    background: rgba(0, 0, 0, 0.22);
    color: #080a12;
}
[data-theme="dark"] .filter-pill:not(.active) .pill-badge {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
}

.active-filters-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 0.55rem;
    border-top: 1px solid var(--border);
    font-size: 0.78rem;
    color: var(--text-muted);
    flex-wrap: wrap;
    gap: 0.5rem;
}
.clear-all-filters-btn {
    background: transparent;
    border: 1px dashed var(--border-gold, #d4af37);
    color: var(--gold-dark);
    border-radius: 6px;
    padding: 0.25rem 0.65rem;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    transition: all 0.2s;
}
[data-theme="dark"] .clear-all-filters-btn {
    color: var(--gold-light);
}
.clear-all-filters-btn:hover {
    background: rgba(212, 175, 55, 0.12);
    border-color: var(--gold);
}

/* Empty State */
.reviews-empty-state {
    background: var(--surface);
    border: 1px dashed var(--border-gold);
    border-radius: 14px;
    padding: clamp(2rem, 5vw, 3rem) 1.5rem;
    text-align: center;
    margin: 1.5rem 0;
}
.reviews-empty-state .empty-icon {
    font-size: 2.2rem;
    margin-bottom: 0.65rem;
}
.reviews-empty-state h4 {
    font-size: 1.15rem;
    color: var(--text);
    margin: 0 0 0.4rem;
    font-weight: 700;
}
.reviews-empty-state p {
    color: var(--text-muted);
    font-size: 0.88rem;
    max-width: 440px;
    margin: 0 auto 1.25rem;
    line-height: 1.55;
}

/* Review Cards */
.review-card {
    background: var(--card-bg, #ffffff);
    border: 1px solid var(--border);
    border-radius: clamp(12px, 2.5vw, 16px);
    padding: clamp(1.1rem, 3vw, 1.5rem);
    margin-bottom: 1.15rem;
    box-shadow: var(--card-shadow);
    transition: transform 0.2s, border-color 0.2s, background 0.3s ease;
    overflow-wrap: break-word;
    word-break: break-word;
    box-sizing: border-box;
    max-width: 100%;
}
.review-card:hover {
    border-color: var(--border-gold);
    transform: translateY(-2px);
}
.review-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.65rem;
    flex-wrap: wrap;
    gap: 0.4rem 0.75rem;
}
.reviewer-meta h4 {
    margin: 0;
    font-size: clamp(0.95rem, 2.8vw, 1.05rem);
    color: var(--text);
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.4rem;
}
.verified-badge {
    font-size: 0.72rem;
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.3);
    padding: 2px 7px;
    border-radius: 9999px;
    font-weight: 600;
    white-space: nowrap;
}
.review-route {
    font-size: clamp(0.76rem, 2.2vw, 0.82rem);
    color: var(--gold-dark);
    font-weight: 600;
    margin-top: 0.2rem;
}
[data-theme="dark"] .review-route {
    color: var(--gold-light);
}
.review-stars {
    color: #f59e0b;
    font-size: clamp(0.85rem, 2.5vw, 0.95rem);
    letter-spacing: 1.5px;
    white-space: nowrap;
}
.review-body {
    color: var(--text-muted);
    font-size: clamp(0.88rem, 2.5vw, 0.94rem);
    line-height: 1.6;
    margin-top: 0.5rem;
}
.review-date {
    font-size: 0.74rem;
    color: var(--text-muted);
    margin-top: 0.75rem;
}

/* Admin Reply Box */
.admin-reply-box {
    margin-top: 0.9rem;
    padding: clamp(0.75rem, 2.5vw, 0.95rem) clamp(0.85rem, 3vw, 1.15rem);
    border-radius: 10px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-left: 3.5px solid var(--gold);
}
.admin-reply-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.35rem;
    flex-wrap: wrap;
    gap: 0.4rem;
}
.admin-reply-title {
    color: var(--highlight);
    font-size: 0.76rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}
.admin-reply-date {
    color: var(--text-muted);
    font-size: 0.72rem;
}
.admin-reply-text {
    margin: 0;
    color: var(--text);
    font-size: clamp(0.82rem, 2.4vw, 0.88rem);
    line-height: 1.55;
}

/* CTA Banner */
.premium-cta-banner {
    position: relative;
    background: var(--surface-elevated, #ffffff);
    border: 1px solid var(--border-gold);
    border-radius: clamp(14px, 3vw, 20px);
    padding: clamp(2rem, 5vw, 3.5rem) clamp(1rem, 4vw, 2.5rem);
    text-align: center;
    overflow: hidden;
    box-shadow: var(--card-shadow);
    box-sizing: border-box;
    max-width: 100%;
}
.premium-cta-banner h2 {
    font-family: var(--font-royal, 'Cinzel', serif);
    font-size: clamp(1.35rem, 4vw, 2rem);
    color: var(--text);
    margin-bottom: 0.5rem;
    line-height: 1.25;
    overflow-wrap: break-word;
    word-break: break-word;
}
.premium-cta-banner p {
    color: var(--text-muted);
    font-size: clamp(0.86rem, 2.2vw, 0.98rem);
    max-width: 540px;
    margin: 0 auto;
    line-height: 1.55;
}
.btn-group.center {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.85rem;
    flex-wrap: wrap;
}

/* Responsive Breakpoints */
@media (max-width: 900px) {
    .feedback-layout {
        grid-template-columns: minmax(0, 1fr);
        gap: 1.25rem;
        margin-top: 1.25rem;
    }
    .mobile-review-toggle-btn {
        display: flex;
    }
    .feedback-form-card {
        position: static !important;
        top: auto !important;
        max-height: none !important;
        overflow-y: visible !important;
        padding: clamp(1.2rem, 3vw, 1.6rem) clamp(0.95rem, 2.5vw, 1.35rem) !important;
        margin-bottom: 1.5rem !important;
        display: none;
        animation: fbSlideDown 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    }
    .feedback-form-card.open {
        display: block !important;
    }
}

@media (max-width: 640px) {
    .container {
        padding-left: clamp(0.85rem, 3.5vw, 1.25rem) !important;
        padding-right: clamp(0.85rem, 3.5vw, 1.25rem) !important;
        padding-top: 1.25rem !important;
    }
    .reviews-header-bar {
        flex-direction: column;
        align-items: stretch;
        gap: 0.65rem;
    }
    .reviews-header-info {
        flex: 0 0 auto;
        min-width: auto;
    }
    .reviews-sort-wrap {
        width: 100%;
        justify-content: space-between;
        box-sizing: border-box;
    }
    .filter-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.35rem;
    }
    .filter-row-label {
        min-width: auto;
    }
    .filter-pills-row {
        width: 100%;
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 6px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    .filter-pills-row::-webkit-scrollbar {
        display: none;
    }
    .filter-pill {
        flex-shrink: 0;
        min-height: 40px;
        display: inline-flex;
        align-items: center;
        box-sizing: border-box;
    }
    .btn-group.center {
        flex-direction: column;
        width: 100%;
    }
    .btn-group.center .btn {
        width: 100%;
        justify-content: center;
        min-height: 48px;
        box-sizing: border-box;
    }
}

@media (max-width: 480px) {
    .mobile-review-toggle-btn {
        padding: 0.75rem 0.95rem;
        font-size: 0.9rem;
    }
    .mobile-review-toggle-btn #mobile-fb-toggle-icon {
        font-size: 0.78rem;
        padding: 0.28rem 0.6rem;
    }
    .feedback-form-card {
        border-radius: 12px !important;
    }
}

@media (max-width: 360px) {
    .mobile-review-toggle-btn {
        flex-direction: column;
        gap: 0.45rem;
        text-align: center;
    }
    .mobile-review-toggle-btn #mobile-fb-toggle-icon {
        width: 100%;
        justify-content: center;
    }
    .rating-summary-pill {
        font-size: 0.74rem;
        padding: 0.35rem 0.75rem;
    }
}

@keyframes fbSlideDown {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Pagination – Pixel-Perfect Centered Baseline & Symmetrical Heights */
.pagination-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    padding: 1rem 0;
    font-size: 0.85rem;
    color: var(--text-muted);
    border-top: 1px solid var(--border);
    margin-top: 1.5rem;
}

.pagination-summary {
    font-size: 0.84rem;
    color: var(--text-muted);
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    line-height: 1;
    margin: 0;
    letter-spacing: 0.01em;
}

.pagination-summary strong {
    color: var(--text);
    font-weight: 700;
    padding: 0 0.15rem;
}

.pagination-controls {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.pagination-btn {
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text);
    height: 34px;
    padding: 0 1rem;
    border-radius: var(--radius-sm, 8px);
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    box-sizing: border-box;
    vertical-align: middle;
    user-select: none;
}

.pagination-btn:hover:not(:disabled) {
    background: var(--gold);
    border-color: var(--gold);
    color: #080a12;
    box-shadow: 0 2px 10px var(--gold-glow);
}

.pagination-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
    background: transparent;
}

.pagination-page-info {
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 0.6rem;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text);
    line-height: 1;
    box-sizing: border-box;
    vertical-align: middle;
}

@media (max-width: 640px) {
    .pagination-bar {
        flex-direction: column;
        justify-content: center;
        align-items: center;
        text-align: center;
        gap: 0.85rem;
    }

    .pagination-summary {
        justify-content: center;
    }
}

