:root {
    --text-color: #3d3c3c;
    --border-color: #e0e0e0;
    --bw-accent: #f95f0e;
    --bw-ink: #0a0e17;
    --bw-bg-soft: #fff9f6;
}

body {
    font-family: 'IBM Plex Sans', sans-serif;
    color: var(--text-color);
    font-weight: 300;
    background-color: #fcfcfc;
}

.form-header {
    margin-bottom: 4rem;
}

.form-header h1 {
    font-weight: 300;
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    color: var(--bw-ink);
    border-bottom: 4px solid var(--bw-accent);
    display: inline-block;
    padding-bottom: 12px;
    margin-bottom: 1.5rem;
}

.form-header p {
    font-size: 1.1rem;
    color: #616161;
}

.form-container {
    border-top: 6px solid var(--bw-accent);
    background-color: #ffffff;
    border-radius: 4px;
}

.border-bottom-dark {
    border-bottom: 2px solid var(--bw-ink);
}

.form-control,
.form-select {
    padding: 12px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.form-control:focus,
.form-select:focus {
    box-shadow: 0 0 0 3px rgba(249, 95, 14, 0.1);
    border-color: var(--bw-accent);
}

.form-check-input:checked {
    background-color: var(--bw-accent);
    border-color: var(--bw-accent);
}

.form-check-label[for="wantsMeeting"] {
    cursor: pointer;
    transition: color 0.3s ease;
    padding: 5px 10px;
    border-radius: 4px;
}

.form-check-label[for="wantsMeeting"]:hover {
    color: var(--bw-accent);
    background: rgba(249, 95, 14, 0.05);
}


.privacy-notice {
    font-size: 0.85rem;
    color: #616161;
    line-height: 1.6;
}

.btn-dark {
    background-color: var(--bw-accent);
    border: none;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    padding: 15px 0;
    transition: all 0.3s ease;
    color: #fff;
    border-radius: 4px;
}

.btn-dark:hover {
    background-color: #e5540c;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(249, 95, 14, 0.3);
    color: #fff;
}

.captcha-container {
    background-color: var(--bw-bg-soft);
    padding: 2rem;
    border: 1px solid rgba(249, 95, 14, 0.2);
    border-left: 5px solid var(--bw-accent);
    margin-bottom: 2rem;
    border-radius: 4px;
}

#captchaQuestion {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--bw-accent);
    font-family: 'IBM Plex Sans', sans-serif;
}

label {
    letter-spacing: 0.5px;
    color: var(--bw-ink);
    margin-bottom: 8px;
}

.form-label.fw-bold {
    color: var(--bw-ink);
    font-size: 0.75rem;
    letter-spacing: 1px;
}

#successModal .modal-content {
    border-top: 6px solid var(--bw-accent);
}

#successModal h3 {
    color: var(--bw-accent);
    font-weight: 600;
}

.text-success {
    color: var(--bw-accent) !important;
}

/* Meeting Scheduling Styles */
#meetingFields {
    background-color: var(--bw-bg-soft) !important;
    border: 1px solid rgba(249, 95, 14, 0.15) !important;
    border-left: 5px solid var(--bw-accent) !important;
    padding: 2.5rem !important;
    margin-top: 1rem;
    border-radius: 8px !important;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

#meetingFields .form-label {
    color: var(--bw-accent);
}

/* Custom Date Input Styling */
input[type="date"] {
    position: relative;
    appearance: none;
    -webkit-appearance: none;
}

input[type="date"]::-webkit-calendar-picker-indicator {
    background: transparent;
    bottom: 0;
    color: transparent;
    cursor: pointer;
    height: auto;
    left: 0;
    position: absolute;
    right: 0;
    top: 0;
    width: auto;
    z-index: 2;
}

#meetingDate {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23f95f0e' class='bi bi-calendar3' viewBox='0 0 16 16'%3E%3Cpath d='M14 0H2a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V2a2 2 0 0 0-2-2zM1 3.857C1 3.384 1.448 3 2 3h12c.552 0 1 .384 1 .857v10.286c0 .473-.448.857-1 .857H2c-.552 0-1-.384-1-.857V3.857z'/%3E%3Cpath d='M6.5 7a1 1 0 1 0 0-2 1 1 0 0 0 0 2zm3 0a1 1 0 1 0 0-2 1 1 0 0 0 0 2zm3 0a1 1 0 1 0 0-2 1 1 0 0 0 0 2zm-9 3a1 1 0 1 0 0-2 1 1 0 0 0 0 2zm3 0a1 1 0 1 0 0-2 1 1 0 0 0 0 2zm3 0a1 1 0 1 0 0-2 1 1 0 0 0 0 2zm3 0a1 1 0 1 0 0-2 1 1 0 0 0 0 2zm-9 3a1 1 0 1 0 0-2 1 1 0 0 0 0 2zm3 0a1 1 0 1 0 0-2 1 1 0 0 0 0 2zm3 0a1 1 0 1 0 0-2 1 1 0 0 0 0 2z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 18px;
    padding-right: 40px;
}

#meetingTime {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23f95f0e' class='bi bi-clock' viewBox='0 0 16 16'%3E%3Cpath d='M8 3.5a.5.5 0 0 0-1 0V9a.5.5 0 0 0 .252.434l3.5 2a.5.5 0 0 0 .496-.868L8 8.71V3.5z'/%3E%3Cpath d='M8 16A8 8 0 1 0 8 0a8 8 0 0 0 0 16zm7-8A7 7 0 1 1 1 8a7 7 0 0 1 14 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 36px center;
    /* Offset because of bootstrap select arrow */
    background-size: 18px;
    padding-right: 60px;
}

/* Flatpickr Premium Theme Styling */
.flatpickr-calendar {
    background: #fff;
    box-shadow: 0 15px 45px rgba(10, 14, 23, 0.15);
    border: 1px solid rgba(249, 95, 14, 0.1);
    border-radius: 12px;
    font-family: 'IBM Plex Sans', sans-serif;
    width: 315px !important;
    /* Standard Flatpickr width */
}

.flatpickr-innerContainer {
    padding: 10px;
}

.flatpickr-day {
    border-radius: 8px !important;
    margin: 2px;
    height: 38px;
    line-height: 38px;
    width: 38px;
    max-width: 38px;
    flex-basis: 38px;
}

.flatpickr-days,
.dayContainer {
    width: 294px !important;
    /* Exactly 7 days * 42px (including margins) */
    min-width: 294px !important;
    max-width: 294px !important;
}

.flatpickr-day.selected,
.flatpickr-day.startRange,
.flatpickr-day.endRange {
    background: var(--bw-accent) !important;
    border-color: var(--bw-accent) !important;
    color: #fff !important;
    box-shadow: 0 4px 12px rgba(249, 95, 14, 0.3);
}

.flatpickr-day.today {
    border-color: var(--bw-accent) !important;
    color: var(--bw-accent) !important;
}

.flatpickr-day.today:hover {
    background: var(--bw-accent) !important;
    color: #fff !important;
}

.flatpickr-day:hover {
    background: rgba(249, 95, 14, 0.1);
    border-color: transparent;
}

.flatpickr-months .flatpickr-month {
    color: var(--bw-ink);
    fill: var(--bw-ink);
    height: 45px;
}

.flatpickr-current-month {
    font-size: 1.1rem;
    padding-top: 15px !important;
}

.flatpickr-monthDropdown-months {
    font-weight: 600 !important;
}

.flatpickr-weekdays {
    height: 35px;
    background: transparent;
}

.flatpickr-weekday {
    color: var(--bw-ink);
    opacity: 0.5;
    font-weight: 700;
    font-size: 11px;
    text-transform: uppercase;
}

.flatpickr-day {
    border-radius: 8px !important;
    margin: 2px;
    height: 38px;
    line-height: 38px;
    width: 38px;
    max-width: 38px;
    flex-basis: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid transparent;
}

.flatpickr-days,
.dayContainer {
    width: 294px !important;
    min-width: 294px !important;
    max-width: 294px !important;
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
}

.flatpickr-calendar.arrowTop:before,
.flatpickr-calendar.arrowTop:after {
    border-bottom-color: #fff;
}

.flatpickr-day.disabled,
.flatpickr-day.disabled:hover {
    color: rgba(10, 14, 23, 0.15) !important;
}

#meetingFields .invalid-feedback {
    background: rgba(220, 53, 69, 0.05);
    padding: 8px;
    border-radius: 4px;
    margin-top: 10px;
}

/* Responsiveness Media Queries */
@media (max-width: 768px) {
    .form-header {
        margin-bottom: 2.5rem;
    }

    .form-container {
        padding: 1.5rem !important;
    }

    .captcha-container {
        padding: 1.5rem;
    }

    #captchaQuestion {
        font-size: 1.1rem;
        margin-bottom: 1rem !important;
        display: block;
    }

    #meetingFields {
        padding: 1.5rem !important;
    }

    .flatpickr-calendar {
        width: 300px !important;
    }

    .flatpickr-days,
    .dayContainer {
        width: 280px !important;
        min-width: 280px !important;
        max-width: 280px !important;
    }

    .flatpickr-day {
        height: 36px;
        line-height: 36px;
        width: 36px;
        max-width: 36px;
        flex-basis: 36px;
    }
}

@media (max-width: 576px) {
    .form-header h1 {
        font-size: 2rem;
    }

    .form-container {
        padding: 1rem !important;
    }

    .captcha-container {
        padding: 1rem;
    }

    .btn-dark {
        padding: 12px 0;
        font-size: 0.9rem;
    }

    #captchaInput {
        width: 100% !important;
        margin-top: 10px;
    }
}