/*
 * AI Travel Pros — Custom Styles
 *
 * Most styling is handled by Tailwind CSS utility classes.
 * This file contains custom animations, overrides, and
 * component-specific styles that don't fit in utilities.
 */

/* ── Smooth scroll ────────────────────────────────────────── */
html {
    scroll-behavior: smooth;
}

/* ── Chat typing indicator ────────────────────────────────── */
@keyframes chatBounce {
    0%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-6px); }
}

/* ── Custom scrollbar for chat ────────────────────────────── */
#chat-messages::-webkit-scrollbar {
    width: 6px;
}
#chat-messages::-webkit-scrollbar-track {
    background: transparent;
}
#chat-messages::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}
#chat-messages::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* ── Voice recording pulse ────────────────────────────────── */
@keyframes voicePulse {
    0%   { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); }
    70%  { box-shadow: 0 0 0 10px rgba(239, 68, 68, 0); }
    100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}
.voice-recording {
    animation: voicePulse 1.5s infinite;
}

/* ── Itinerary card transitions ───────────────────────────── */
.itinerary-card {
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}
.itinerary-card:hover {
    box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.12);
}

/* ── Leaflet map container (prevent flicker) ──────────────── */
#itinerary-map,
#itin-leaflet-map {
    z-index: 1;
}

/* ── Print styles ─────────────────────────────────────────── */
@media print {
    header, footer, #chat-interface, .no-print {
        display: none !important;
    }
    .itinerary-card {
        box-shadow: none;
        border: 1px solid #e5e7eb;
    }
    details {
        display: block;
    }
    details > summary {
        display: none;
    }
    details > div {
        display: block !important;
    }
}

/* ── Loading skeleton shimmer ─────────────────────────────── */
@keyframes shimmer {
    0%   { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}
.skeleton {
    background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 0.5rem;
}

/* ── Quick-prompt chips hover lift ─────────────────────────── */
button[class*="rounded-full"]:hover {
    transform: translateY(-1px);
}

/* ── Trip confirmation panel in chat ───────────────────────── */
.trip-confirm {
    background: linear-gradient(135deg, #f0f9ff 0%, #f5f3ff 100%);
    border: 1px solid #c7d2fe;
    border-radius: 0.75rem;
    padding: 1rem;
    max-width: 100%;
}
.trip-confirm input,
.trip-confirm select {
    background: white;
}
.trip-confirm input:disabled,
.trip-confirm select:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}
.trip-confirm button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ── Trip confirmation – mobile adjustments ────────────────── */
@media (max-width: 480px) {
    .trip-confirm {
        padding: 0.75rem;
    }
    /* Stack the two-column date & budget rows on small screens */
    .trip-confirm .grid.grid-cols-2 {
        grid-template-columns: 1fr;
    }
    /* Shrink emoji icons so they don't eat space */
    .trip-confirm .text-lg {
        font-size: 1rem;
        line-height: 1;
    }
    /* Let date inputs shrink properly */
    .trip-confirm input[type="date"] {
        min-width: 0;
        font-size: 0.8125rem;
    }
    .trip-confirm select {
        font-size: 0.8125rem;
    }
    /* Buttons: full-width stacked */
    .trip-confirm .flex.gap-2.mt-3 {
        flex-direction: column;
    }
    .trip-confirm .flex.gap-2.mt-3 button {
        width: 100%;
        text-align: center;
    }
}

/* ── Focus ring for accessibility ─────────────────────────── */
:focus-visible {
    outline: 2px solid #2b91ff;
    outline-offset: 2px;
    border-radius: 4px;
}
