/* Base styles */
body { background-color: #F8F8FA; }

/* Custom select dropdown arrow */
select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%232B2B2B' 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 1rem center;
    background-size: 1.25rem;
}
select:focus { outline: none; border-color: rgba(128,216,208,1); }

.section-card {
    background: white;
    border-radius: 20px;
    padding: 1.75rem;
}

.team-note {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: rgba(193,207,218,0.3);
    border-radius: 8px;
    font-size: 0.8rem;
    color: #5A5A5A;
}

/* Desktop: sticky right panel */
@media (min-width: 1024px) {
    .right-panel {
        position: sticky;
        top: 1.5rem;
    }
}

/* Custom checkbox - base styles */
.addon-checkbox {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    min-width: 24px;
    min-height: 24px;
    max-width: 24px;
    max-height: 24px;
    border: 2px solid #E3E6EA;
    border-radius: 6px;
    cursor: pointer;
    flex-shrink: 0;
    flex-grow: 0;
    position: relative;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.addon-checkbox:checked {
    background-color: rgba(128,216,208,1);
    border-color: rgba(128,216,208,1);
}

.addon-checkbox:checked::after {
    content: '';
    position: absolute;
    left: 7px;
    top: 3px;
    width: 6px;
    height: 11px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.addon-card:has(.addon-checkbox:checked),
.addon-card:has(.addon-radio:checked) {
    border-color: rgba(128,216,208,1);
    background-color: rgba(128,216,208,0.08);
}

/* Custom radio - base styles */
.addon-radio {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    min-width: 24px;
    min-height: 24px;
    max-width: 24px;
    max-height: 24px;
    border: 2px solid #E3E6EA;
    border-radius: 50%;
    cursor: pointer;
    flex-shrink: 0;
    flex-grow: 0;
    position: relative;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.addon-radio:checked {
    border-color: rgba(128,216,208,1);
}

.addon-radio:checked::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 5px;
    width: 10px;
    height: 10px;
    background-color: rgba(128,216,208,1);
    border-radius: 50%;
}

/* Flatpickr custom theme */
.flatpickr-calendar {
    font-family: 'Nunito', sans-serif;
    border: 2px solid #E3E6EA;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    padding: 12px;
    width: 320px;
}

.flatpickr-calendar .flatpickr-innerContainer { padding: 8px; }
.flatpickr-days { width: 100%; }
.dayContainer { width: 100%; min-width: 280px; max-width: 300px; }

.flatpickr-day {
    max-width: 40px;
    height: 40px;
    line-height: 40px;
    margin: 2px;
    color: #2B2B2B;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.flatpickr-calendar.arrowTop:before,
.flatpickr-calendar.arrowTop:after { border-bottom-color: #E3E6EA; }
.flatpickr-months { padding: 8px 0; }
.flatpickr-months .flatpickr-month { height: 40px; }

.flatpickr-current-month {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.25rem;
    font-weight: 600;
    color: #2B2B2B;
}

.flatpickr-current-month .flatpickr-monthDropdown-months {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 600;
}

.flatpickr-weekdays { background: transparent; }

.flatpickr-weekday {
    color: #5A5A5A;
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.flatpickr-day:hover {
    background: rgba(128,216,208,0.2);
    border-color: transparent;
}

.flatpickr-day.selected,
.flatpickr-day.selected:hover {
    background: rgba(128,216,208,1);
    border-color: rgba(128,216,208,1);
    color: #2B2B2B;
}

.flatpickr-day.today { border-color: rgba(128,216,208,0.5); }
.flatpickr-day.today:hover {
    background: rgba(128,216,208,0.2);
    border-color: rgba(128,216,208,0.5);
}

.flatpickr-day.disabled,
.flatpickr-day.prevMonthDay,
.flatpickr-day.nextMonthDay { color: #C1CFDA; }

.flatpickr-months .flatpickr-prev-month,
.flatpickr-months .flatpickr-next-month { fill: #2B2B2B; padding: 8px; }

.flatpickr-months .flatpickr-prev-month:hover svg,
.flatpickr-months .flatpickr-next-month:hover svg { fill: rgba(128,216,208,1); }

.numInputWrapper:hover { background: rgba(128,216,208,0.1); }
.flatpickr-current-month input.cur-year {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 600;
}

/* ===== MOBILE STYLES (<1024px) ===== */
@media (max-width: 1023px) {
    /* Main title */
    h1 {
        font-size: 2.5rem !important;
        line-height: 2.75rem !important;
    }

    /* Section titles */
    #calculatorSection .section-card h2 {
        font-size: 1.75rem !important;
    }

    /* Step badges */
    .section-card .flex.items-center.gap-3 > span:first-child {
        width: 2.25rem;
        height: 2.25rem;
        font-size: 1rem;
    }

    /* Subtitle under main title */
    .text-center > p.font-light {
        font-size: 1.25rem !important;
    }

    /* Section subtitles - full width on mobile */
    #calculatorSection p.text-mutedGray,
    #calculatorSection p.ml-10 {
        font-size: 0.9375rem !important;
        margin-left: 0 !important;
        margin-top: 0.5rem !important;
    }

    /* Labels */
    #calculatorSection label {
        font-size: 0.9375rem !important;
    }

    /* Addon card titles */
    .addon-card .font-semibold {
        font-size: 1.25rem !important;
    }

    /* Addon card descriptions */
    .addon-card p.text-sm,
    .addon-card li {
        font-size: 1.0625rem !important;
    }

    /* Team notes */
    .team-note {
        font-size: 1rem;
        padding: 0.625rem 1rem;
    }
    .team-note span {
        font-size: 1rem !important;
    }

    /* Section card padding */
    .section-card {
        padding: 1.5rem;
    }

    /* Addon cards */
    .addon-card {
        padding: 1.25rem;
    }

    /* Addon card header - stack title and price vertically on mobile */
    .addon-card .flex.justify-between {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 0.25rem !important;
    }
    .addon-card .flex.justify-between .text-right {
        text-align: left !important;
    }

    /* Form inputs */
    select {
        padding: 0.875rem 1rem;
        font-size: 1.125rem;
        padding-right: 2.5rem;
    }
    input[type="text"], input[type="email"], input[type="tel"] {
        padding: 0.875rem 1rem;
        font-size: 1.125rem;
    }

    /* Right panel on mobile - normal flow, not sticky */
    .right-panel {
        position: relative;
        top: 0;
    }

    /* Price display */
    #price {
        font-size: 3.5rem !important;
    }

    /* Buttons */
    #ctaButton {
        padding: 1.125rem;
        font-size: 1.25rem;
    }

    /* Flatpickr mobile */
    .flatpickr-calendar {
        width: 300px !important;
        padding: 10px;
    }
    .dayContainer {
        min-width: 260px;
        max-width: 280px;
    }
    .flatpickr-day {
        max-width: 36px;
        height: 36px;
        line-height: 36px;
        margin: 1px;
        font-size: 1rem;
    }
}

/* Tablets (768-1023px) - grid layout for right panel */
@media (min-width: 768px) and (max-width: 1023px) {
    .grid.lg\:grid-cols-5 {
        grid-template-columns: 1fr;
    }
    .right-panel {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 1rem;
    }
    .right-panel > .bg-tiffany { grid-column: 1 / -1; }
    .right-panel > button { grid-column: 1 / -1; }
    .right-panel > p:last-child { grid-column: 1 / -1; }
    #price { font-size: 4rem !important; }
}

/* Large screens (1280px+) */
@media (min-width: 1280px) {
    .max-w-6xl { max-width: 1200px; }
}

/* Safe area insets for notched devices */
@supports (padding: max(0px)) {
    body {
        padding-left: max(1rem, env(safe-area-inset-left));
        padding-right: max(1rem, env(safe-area-inset-right));
        padding-bottom: max(1rem, env(safe-area-inset-bottom));
    }
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Print styles */
@media print {
    .right-panel { position: relative; }
    #ctaButton, #ctaSubtext, #volumeDiscountsSection { display: none; }
}
