/**
 * Barbados Travel Theme - Custom Styles
 *
 * Supplements Tailwind CSS with custom styles for specific components.
 */

/* ===== Base Styles ===== */
html {
    scroll-behavior: smooth;
}

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Alpine.js cloak */
[x-cloak] {
    display: none !important;
}

/* ===== Hero Section ===== */
.hero-gradient {
    background: linear-gradient(135deg, rgba(7,15,30,0.85) 0%, rgba(30,58,95,0.7) 50%, rgba(7,15,30,0.6) 100%);
}

/* ===== Form Card ===== */
.form-card {
    backdrop-filter: blur(10px);
    background: rgba(255,255,255,0.95);
}

/* ===== Step Progress ===== */
.step-active {
    background: linear-gradient(135deg, #2563eb, #3b82f6);
}

/* ===== Custom Scrollbar ===== */
.custom-scrollbar::-webkit-scrollbar {
    width: 6px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: #3b82f6;
    border-radius: 10px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: #2563eb;
}

/* ===== Prose Styles for AI Itinerary ===== */
.prose h1,
.prose h2,
.prose h3 {
    color: #0f2341;
    font-family: 'Playfair Display', serif;
    margin-top: 1.5em;
    margin-bottom: 0.5em;
}

.prose p {
    margin-bottom: 1em;
    line-height: 1.6;
}

.prose ul {
    list-style-type: disc;
    padding-left: 1.5em;
    margin-bottom: 1em;
}

.prose ol {
    list-style-type: decimal;
    padding-left: 1.5em;
    margin-bottom: 1em;
}

.prose li {
    margin-bottom: 0.25em;
}

.prose strong {
    color: #0f2341;
}

/* ===== Animations ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* ===== Responsive Adjustments ===== */
@media (max-width: 640px) {
    .font-display {
        font-size: 2rem !important;
    }
    
    .form-card {
        padding: 1.5rem !important;
    }
}

/* ===== Card Hover Effects ===== */
.group:hover .group-hover\:scale-105 {
    transform: scale(1.05);
}

/* ===== Navigation Active State ===== */
.nav-active {
    color: white;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 0.5rem;
}

/* ===== Stripe Elements Container ===== */
#payment-element,
#ai-payment-element,
#express-checkout-element {
    min-height: 40px;
}

/* ===== Select and Date Input Overrides ===== */
select,
input[type="date"],
input[type="time"],
input[type="datetime-local"] {
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
    background-color: #ffffff !important;
    border-radius: 0.75rem;
    color-scheme: light;
    cursor: pointer;
    font-size: 1rem;
    line-height: 1.5;
}

select {
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1.25em 1.25em;
    padding-right: 2.5rem !important;
}

input[type="date"] {
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3crect x='3' y='4' width='18' height='18' rx='2' ry='2'%3e%3c/rect%3e%3cline x1='16' y1='2' x2='16' y2='6'%3e%3c/line%3e%3cline x1='8' y1='2' x2='8' y2='6'%3e%3c/line%3e%3cline x1='3' y1='10' x2='21' y2='10'%3e%3c/line%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1.25em 1.25em;
    padding-right: 2.5rem !important;
    position: relative;
}

input[type="date"]:invalid,
input[type="date"][value=""] {
    color: #9ca3af;
}

input[type="date"]::-webkit-calendar-picker-indicator {
    opacity: 0;
    position: absolute;
    right: 0;
    top: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

/* ===== WordPress Admin Bar Offset ===== */
body.admin-bar nav.fixed {
    top: 32px;
}

@media (max-width: 782px) {
    body.admin-bar nav.fixed {
        top: 46px;
    }
}

/* ===== Print Styles ===== */
@media print {
    nav, footer, .no-print {
        display: none !important;
    }
    
    main {
        padding-top: 0 !important;
    }
}
