/* ============================================================
   REVIEW MODAL — Post-cita
   ============================================================ */

.review-modal {
    z-index: 2500;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: max(20px, env(safe-area-inset-top)) max(20px, env(safe-area-inset-right))
        max(20px, env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left));
}

.review-modal[hidden] {
    display: none !important;
    visibility: hidden;
    pointer-events: none;
}

.review-modal__backdrop {
    background: rgba(8, 8, 10, 0.78);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    animation: review-backdrop-in 0.3s ease;
}

.review-modal__dialog {
    width: min(100%, 460px);
    max-height: min(92vh, 720px);
    overflow-x: hidden;
    overflow-y: auto;
    background: linear-gradient(165deg, #252528 0%, #1a1a1e 45%, #141416 100%);
    border: 1px solid rgba(212, 165, 116, 0.22);
    border-radius: 24px;
    padding: 0 0 28px;
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.04) inset,
        0 24px 64px rgba(0, 0, 0, 0.55),
        0 0 80px rgba(212, 165, 116, 0.08);
    z-index: 1;
    animation: review-dialog-in 0.38s cubic-bezier(0.34, 1.2, 0.64, 1);
}

.review-modal__accent {
    height: 4px;
    background: linear-gradient(90deg, transparent, var(--accent), #e8c9a0, var(--accent), transparent);
    border-radius: 24px 24px 0 0;
}

.review-modal__glow {
    position: absolute;
    top: -40px;
    right: -20px;
    width: 160px;
    height: 160px;
    background: radial-gradient(circle, rgba(212, 165, 116, 0.18), transparent 70%);
    pointer-events: none;
}

.review-modal__close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    z-index: 2;
}

.review-modal__close:hover {
    color: #fff;
    border-color: rgba(212, 165, 116, 0.4);
    background: rgba(212, 165, 116, 0.12);
    transform: rotate(90deg);
}

.review-modal__header {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    padding: 28px 28px 0;
    padding-right: 56px;
}

.review-modal__logo-wrap {
    flex-shrink: 0;
    width: 64px;
    height: 64px;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(212, 165, 116, 0.3);
    background: rgba(212, 165, 116, 0.08);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
}

.review-modal__logo-wrap--placeholder {
    color: var(--accent);
    font-size: 1.5rem;
}

.review-modal__logo-wrap:not(.review-modal__logo-wrap--placeholder) #review-modal-logo-icon {
    display: none;
}

.review-modal__logo-wrap--placeholder .review-modal__logo[hidden] {
    display: none !important;
}

.review-modal__logo {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.review-modal__logo-wrap[hidden] {
    display: none !important;
}

.review-modal__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 8px;
    padding: 5px 10px;
    border-radius: 50px;
    background: rgba(212, 165, 116, 0.12);
    border: 1px solid rgba(212, 165, 116, 0.25);
}

.review-modal__header h2 {
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 8px;
    line-height: 1.25;
}

.review-modal__subtitle {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.55;
}

.review-modal__subtitle strong {
    color: #fff;
    font-weight: 600;
}

.review-modal__employee {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    padding: 6px 12px;
    border-radius: 50px;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--accent);
    background: rgba(212, 165, 116, 0.1);
    border: 1px solid rgba(212, 165, 116, 0.2);
}

.review-modal__form {
    padding: 0 28px;
}

.review-modal__rating-block {
    margin: 24px 0 20px;
    padding: 22px 16px 18px;
    text-align: center;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 18px;
}

.review-modal__rating-label {
    display: block;
    font-size: 0.88rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 14px;
}

.review-modal__rating-hint {
    display: block;
    margin-top: 10px;
    font-size: 0.8rem;
    color: var(--text-secondary);
    min-height: 1.2em;
    transition: color 0.2s ease;
}

.review-modal__rating-hint--active {
    color: var(--accent);
    font-weight: 500;
}

.review-stars {
    display: flex;
    justify-content: center;
    gap: 6px;
}

.review-stars__btn {
    border: none;
    background: transparent;
    padding: 4px 6px;
    cursor: pointer;
    font-size: 2rem;
    color: rgba(255, 255, 255, 0.2);
    line-height: 1;
    transition: transform 0.2s cubic-bezier(0.34, 1.3, 0.64, 1), color 0.2s ease, filter 0.2s ease;
}

.review-stars__btn:hover {
    transform: scale(1.15);
    color: rgba(212, 165, 116, 0.65);
}

.review-stars__btn--active {
    color: #fbbf24;
    transform: scale(1.12);
    filter: drop-shadow(0 0 8px rgba(251, 191, 36, 0.45));
}

.review-stars__btn--active i {
    font-weight: 900;
}

.review-modal__comment {
    display: block;
    margin-bottom: 18px;
}

.review-modal__comment span {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.review-modal__optional {
    font-weight: 400;
    opacity: 0.75;
}

.review-modal__comment textarea {
    width: 100%;
    padding: 14px 16px;
    border-radius: 14px;
    border: 1px solid var(--border-color);
    background: rgba(15, 15, 16, 0.6);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.92rem;
    line-height: 1.5;
    min-height: 96px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.review-modal__comment textarea::placeholder {
    color: rgba(156, 163, 175, 0.7);
}

.review-modal__comment textarea:focus {
    outline: none;
    border-color: rgba(212, 165, 116, 0.55);
    box-shadow: 0 0 0 3px rgba(212, 165, 116, 0.12);
}

.review-modal__error {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 14px;
    margin-bottom: 14px;
    border-radius: 12px;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.28);
    color: #fca5a5;
    font-size: 0.85rem;
}

.review-modal__error[hidden] {
    display: none !important;
}

.review-modal__error::before {
    content: '\f06a';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    flex-shrink: 0;
}

.review-modal__actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.review-modal__actions .btn-primary {
    width: 100%;
    min-height: 50px;
    border-radius: 14px;
    font-size: 0.95rem;
    font-weight: 700;
    box-shadow: 0 4px 20px rgba(212, 165, 116, 0.3);
}

.review-modal__actions .btn-primary:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.review-modal__actions .btn-secondary {
    width: 100%;
    min-height: 46px;
    border-radius: 14px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    background: transparent;
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.review-modal__actions .btn-secondary:hover {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.04);
}

.review-modal__success {
    text-align: center;
    padding: 40px 28px 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}

.review-modal__success[hidden] {
    display: none !important;
}

.review-modal__success-icon {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: rgba(34, 197, 94, 0.15);
    border: 2px solid rgba(34, 197, 94, 0.35);
    color: #4ade80;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    animation: review-success-pop 0.5s cubic-bezier(0.34, 1.4, 0.64, 1);
}

.review-modal__success-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #fff;
}

.review-modal__success-text {
    font-size: 0.9rem;
    color: var(--text-secondary);
    max-width: 280px;
    line-height: 1.5;
}

@keyframes review-backdrop-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes review-dialog-in {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes review-success-pop {
    0% {
        opacity: 0;
        transform: scale(0.5);
    }
    70% {
        transform: scale(1.08);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@media (max-width: 480px) {
    .review-modal {
        padding: 12px;
        align-items: flex-end;
    }

    .review-modal__dialog {
        border-radius: 22px 22px 18px 18px;
        max-height: 94vh;
    }

    .review-modal__header,
    .review-modal__form {
        padding-left: 20px;
        padding-right: 20px;
    }

    .review-modal__header {
        padding-top: 24px;
    }

    .review-stars__btn {
        font-size: 1.75rem;
        padding: 2px 4px;
    }
}
