/**
 * RezAI Premium — AI Rezervasyon Asistanı
 */
:root {
    --rezai-navy: #0F172A;
    --rezai-navy-mid: #16213E;
    --rezai-gold: #D4AF37;
    --rezai-gold-soft: rgba(212, 175, 55, 0.15);
    --rezai-white: #FFFFFF;
    --rezai-muted: #94A3B8;
    --rezai-chat-bg: #F8FAFC;
    --rezai-ai-bubble: #FFFFFF;
    --rezai-user-bubble: linear-gradient(135deg, #16213E 0%, #0F172A 100%);
    --rezai-shadow: 0 24px 64px rgba(15, 23, 42, 0.28);
    --rezai-font: 'Inter', system-ui, sans-serif;
    --rezai-display: 'Playfair Display', Georgia, serif;
}

/* ─── Floating button ─── */
.rezai-floating-button {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 99999;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 18px 12px 14px;
    border: 1px solid rgba(212, 175, 55, 0.45);
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.88) 0%, rgba(22, 33, 62, 0.92) 100%);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    color: var(--rezai-white);
    font-family: var(--rezai-font);
    font-weight: 600;
    font-size: 0.875rem;
    box-shadow: 0 8px 32px rgba(15, 23, 42, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.06) inset;
    cursor: pointer;
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.35s;
    animation: rezai-fab-breathe 3s ease-in-out infinite;
    overflow: hidden;
}

.rezai-fab-glow {
    position: absolute;
    inset: -2px;
    border-radius: inherit;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.5), rgba(15, 23, 42, 0));
    opacity: 0.6;
    z-index: 0;
    pointer-events: none;
}

.rezai-fab-ring {
    position: absolute;
    inset: -4px;
    border-radius: inherit;
    border: 1px solid rgba(212, 175, 55, 0.35);
    animation: rezai-ring-pulse 2.5s ease-out infinite;
    pointer-events: none;
}

.rezai-fab-icon {
    position: relative;
    z-index: 1;
    font-size: 1.25rem;
    line-height: 1;
    filter: drop-shadow(0 0 8px rgba(212, 175, 55, 0.6));
}

.rezai-fab-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    text-align: left;
}

.rezai-fab-title {
    font-size: 0.875rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.rezai-fab-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.6875rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.75);
}

.rezai-online-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #22C55E;
    box-shadow: 0 0 8px rgba(34, 197, 94, 0.8);
    animation: rezai-dot-pulse 2s ease-in-out infinite;
}

.rezai-floating-button:hover {
    transform: translateY(-4px) scale(1.03);
    box-shadow: 0 16px 48px rgba(15, 23, 42, 0.45), 0 0 24px rgba(212, 175, 55, 0.25);
}

@keyframes rezai-fab-breathe {
    0%, 100% { box-shadow: 0 8px 32px rgba(15, 23, 42, 0.35), 0 0 0 0 rgba(212, 175, 55, 0.2); }
    50% { box-shadow: 0 12px 40px rgba(15, 23, 42, 0.4), 0 0 20px rgba(212, 175, 55, 0.15); }
}

@keyframes rezai-ring-pulse {
    0% { transform: scale(1); opacity: 0.6; }
    70% { transform: scale(1.08); opacity: 0; }
    100% { transform: scale(1.08); opacity: 0; }
}

@keyframes rezai-dot-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

@media (max-width: 767px) {
    .rezai-floating-button {
        right: 16px;
        bottom: 16px;
        padding: 10px 14px 10px 12px;
    }
    .rezai-fab-title { font-size: 0.8125rem; }
}

/* ─── Overlay & drawer ─── */
.rezai-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(4px);
    z-index: 100000;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.35s ease, visibility 0.35s;
}

.rezai-overlay.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.rezai-drawer {
    position: fixed;
    z-index: 100001;
    background: var(--rezai-white);
    display: flex;
    flex-direction: column;
    font-family: var(--rezai-font);
    box-shadow: var(--rezai-shadow);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: transform 0.45s cubic-bezier(0.32, 0.72, 0, 1), opacity 0.35s, visibility 0.35s;
}

@media (max-width: 767px) {
    .rezai-drawer {
        left: 0;
        right: 0;
        bottom: 0;
        max-height: 90vh;
        border-radius: 24px 24px 0 0;
        transform: translateY(100%);
    }
    .rezai-drawer.is-open {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: translateY(0);
    }
}

@media (min-width: 768px) {
    .rezai-drawer {
        top: 16px;
        right: 16px;
        bottom: 16px;
        width: min(440px, calc(100vw - 32px));
        border-radius: 24px;
        transform: translateX(calc(100% + 24px)) scale(0.96);
    }
    .rezai-drawer.is-open {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: translateX(0) scale(1);
    }
}

body.rezai-open { overflow: hidden; }

/* ─── Header ─── */
.rezai-header {
    flex-shrink: 0;
    padding: 20px 20px 16px;
    background: linear-gradient(160deg, var(--rezai-navy) 0%, var(--rezai-navy-mid) 100%);
    color: var(--rezai-white);
    border-radius: 28px 28px 0 0;
}

@media (min-width: 768px) {
    .rezai-header { border-radius: 24px 24px 0 0; }
}

.rezai-header-main {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.rezai-avatar {
    position: relative;
    flex-shrink: 0;
    width: 48px;
    height: 48px;
}

.rezai-avatar-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--rezai-gold) 0%, #B8941F 100%);
    color: var(--rezai-navy);
    font-family: var(--rezai-display);
    font-weight: 700;
    font-size: 1.25rem;
    box-shadow: 0 4px 16px rgba(212, 175, 55, 0.4);
}

.rezai-avatar-pulse {
    position: absolute;
    inset: -4px;
    border-radius: 20px;
    border: 2px solid rgba(212, 175, 55, 0.4);
    animation: rezai-ring-pulse 2s ease-out infinite;
}

.rezai-header-info {
    flex: 1;
    min-width: 0;
}

.rezai-header-info h2 {
    margin: 0;
    font-family: var(--rezai-display);
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.rezai-header-sub {
    margin: 2px 0 8px;
    font-size: 0.8125rem;
    opacity: 0.85;
}

.rezai-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.rezai-close {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
}

.rezai-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

.rezai-trust-stat {
    margin: 14px 0 0;
    padding-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    font-size: 0.8125rem;
    opacity: 0.9;
}

.rezai-trust-stat strong {
    color: var(--rezai-gold);
    font-weight: 700;
}

/* ─── Chat area ─── */
.rezai-body {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    background: var(--rezai-chat-bg);
}

.rezai-chat {
    flex: 1;
    overflow-y: auto;
    padding: 20px 16px 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    scroll-behavior: smooth;
}

/* Messages */
.rezai-msg {
    display: flex;
    max-width: 92%;
    animation: rezai-msg-in 0.4s cubic-bezier(0.32, 0.72, 0, 1) forwards;
    opacity: 0;
}

.rezai-msg-ai { align-self: flex-start; }
.rezai-msg-user { align-self: flex-end; }

.rezai-msg-bubble {
    padding: 12px 16px;
    border-radius: 18px;
    font-size: 0.9375rem;
    line-height: 1.5;
    color: var(--rezai-navy);
}

.rezai-msg-ai .rezai-msg-bubble {
    background: var(--rezai-ai-bubble);
    border: 1px solid #E2E8F0;
    border-bottom-left-radius: 6px;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
}

.rezai-msg-user .rezai-msg-bubble {
    background: var(--rezai-user-bubble);
    color: #fff;
    border-bottom-right-radius: 6px;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.2);
}

.rezai-msg-label {
    font-size: 0.6875rem;
    font-weight: 600;
    color: var(--rezai-muted);
    margin-bottom: 4px;
    padding-left: 4px;
}

.rezai-msg-ai .rezai-msg-label { color: var(--rezai-gold); }

/* Typing indicator */
.rezai-typing .rezai-msg-bubble {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 14px 18px;
    min-width: 56px;
}

.rezai-typing span {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--rezai-muted);
    animation: rezai-typing-dot 1.2s ease-in-out infinite;
}

.rezai-typing span:nth-child(2) { animation-delay: 0.15s; }
.rezai-typing span:nth-child(3) { animation-delay: 0.3s; }

@keyframes rezai-typing-dot {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
    30% { transform: translateY(-5px); opacity: 1; }
}

@keyframes rezai-msg-in {
    from { opacity: 0; transform: translateY(12px) scale(0.96); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Options panel */
.rezai-options-panel {
    align-self: flex-start;
    width: 100%;
    max-width: 100%;
    animation: rezai-panel-in 0.45s cubic-bezier(0.32, 0.72, 0, 1) forwards;
    opacity: 0;
}

@keyframes rezai-panel-in {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}

.rezai-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 4px;
}

.rezai-option {
    padding: 10px 16px;
    border-radius: 14px;
    border: 1px solid #E2E8F0;
    background: #fff;
    color: var(--rezai-navy);
    font-family: var(--rezai-font);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.32, 0.72, 0, 1);
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

.rezai-option:hover {
    border-color: var(--rezai-gold);
    background: var(--rezai-gold-soft);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.2);
}

.rezai-option.is-selected {
    border-color: var(--rezai-gold);
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.2), rgba(212, 175, 55, 0.08));
    font-weight: 600;
}

.rezai-input-row {
    display: flex;
    gap: 8px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.rezai-input-row input,
.rezai-input-row select {
    flex: 1;
    min-width: 140px;
    padding: 10px 12px;
    border: 1px solid #E2E8F0;
    border-radius: 12px;
    font-size: 0.875rem;
}

.rezai-btn-next {
    margin-top: 12px;
    width: 100%;
    padding: 12px 16px;
    border: none;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--rezai-navy-mid), var(--rezai-navy));
    color: #fff;
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.rezai-btn-next:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(15, 23, 42, 0.25);
}

/* Thinking / loading */
.rezai-thinking {
    padding: 8px 4px 16px;
    animation: rezai-msg-in 0.5s ease forwards;
}

.rezai-thinking-title {
    font-family: var(--rezai-display);
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--rezai-navy);
    margin-bottom: 6px;
}

.rezai-thinking-sub {
    font-size: 0.875rem;
    color: var(--rezai-muted);
    margin-bottom: 16px;
}

.rezai-thinking-steps {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.rezai-thinking-steps li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.8125rem;
    color: var(--rezai-muted);
    opacity: 0.4;
    transform: translateX(-8px);
    transition: opacity 0.4s, transform 0.4s, color 0.4s;
}

.rezai-thinking-steps li.is-done {
    opacity: 1;
    transform: translateX(0);
    color: var(--rezai-navy);
}

.rezai-thinking-steps li.is-done::before {
    content: '✓';
    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(34, 197, 94, 0.15);
    color: #16A34A;
    font-size: 0.75rem;
    font-weight: 700;
    flex-shrink: 0;
}

.rezai-thinking-steps li:not(.is-done)::before {
    content: '';
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid #E2E8F0;
    flex-shrink: 0;
}

/* Results */
.rezai-pick-banner {
    padding: 16px;
    margin-bottom: 16px;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.18) 0%, rgba(212, 175, 55, 0.06) 100%);
    border: 1px solid rgba(212, 175, 55, 0.35);
    animation: rezai-msg-in 0.5s ease forwards;
}

.rezai-pick-banner h3 {
    margin: 0 0 8px;
    font-size: 0.9375rem;
    font-weight: 700;
    color: var(--rezai-navy);
}

.rezai-pick-banner p {
    margin: 0;
    font-size: 0.875rem;
    line-height: 1.5;
    color: var(--rezai-navy-mid);
}

.rezai-results {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.rezai-result-card {
    border: 1px solid #E2E8F0;
    border-radius: 18px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.06);
    transition: transform 0.3s, box-shadow 0.3s;
    animation: rezai-msg-in 0.5s ease forwards;
    opacity: 0;
}

.rezai-result-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.1);
}

.rezai-result-card.is-top {
    border-color: rgba(212, 175, 55, 0.5);
    box-shadow: 0 8px 28px rgba(212, 175, 55, 0.15);
}

.rezai-result-img-wrap {
    position: relative;
    height: 130px;
    background: linear-gradient(135deg, #E2E8F0, #F1F5F9);
}

.rezai-result-card img {
    width: 100%;
    height: 130px;
    object-fit: cover;
}

.rezai-score-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 6px 10px;
    border-radius: 10px;
    background: rgba(15, 23, 42, 0.88);
    backdrop-filter: blur(8px);
    color: var(--rezai-gold);
    font-size: 0.75rem;
    font-weight: 700;
}

.rezai-result-body { padding: 14px 16px; }

.rezai-result-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 8px;
}

.rezai-sponsored-badge,
.rezai-verified-badge {
    font-size: 0.625rem;
    padding: 4px 8px;
    border-radius: 6px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.rezai-sponsored-badge {
    background: var(--rezai-gold-soft);
    color: #92680F;
    border: 1px solid rgba(212, 175, 55, 0.4);
}

.rezai-verified-badge {
    background: #ECFDF5;
    color: #047857;
}

.rezai-result-card h4 {
    margin: 0 0 6px;
    font-family: var(--rezai-display);
    font-size: 1.0625rem;
    color: var(--rezai-navy);
}

.rezai-result-meta {
    font-size: 0.8125rem;
    color: var(--rezai-muted);
    margin-bottom: 8px;
}

.rezai-result-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 16px;
    font-size: 0.8125rem;
    color: var(--rezai-navy);
    margin-bottom: 8px;
}

.rezai-result-stats i { color: var(--rezai-gold); margin-right: 4px; }

.rezai-avail {
    font-size: 0.8125rem;
    color: #16A34A;
    font-weight: 500;
    margin-bottom: 10px;
}

.rezai-why-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0;
    border: none;
    background: none;
    color: var(--rezai-gold);
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
    margin-bottom: 8px;
}

.rezai-why-list {
    display: none;
    flex-direction: column;
    gap: 6px;
    margin: 0 0 12px;
    padding: 12px;
    border-radius: 12px;
    background: #F8FAFC;
    list-style: none;
}

.rezai-why-list.is-open { display: flex; }

.rezai-why-list li {
    font-size: 0.8125rem;
    color: var(--rezai-navy-mid);
    padding-left: 18px;
    position: relative;
}

.rezai-why-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #16A34A;
    font-weight: 700;
}

.rezai-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 4px;
}

.rezai-actions a,
.rezai-actions button {
    text-align: center;
    padding: 11px 14px;
    border-radius: 12px;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: transform 0.2s, box-shadow 0.2s;
}

.rezai-btn-detail {
    background: #F1F5F9;
    color: var(--rezai-navy);
}

.rezai-btn-book {
    background: linear-gradient(135deg, var(--rezai-navy-mid), var(--rezai-navy));
    color: #fff;
}

.rezai-btn-book:hover,
.rezai-btn-detail:hover {
    transform: translateY(-1px);
}

.rezai-empty {
    text-align: center;
    padding: 32px 20px;
    color: var(--rezai-muted);
}

.rezai-back-results {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 12px;
    padding: 8px 12px;
    border: 1px solid #E2E8F0;
    border-radius: 10px;
    background: #fff;
    color: var(--rezai-navy);
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.rezai-back-results:hover { background: #F8FAFC; }
