/* Custom Date Picker Styles */

.custom-date-picker-wrapper {
    position: relative;
    font-family: 'Inter', sans-serif;
    margin-top: 10px;
    width: 100%;
}

/* Hide original input explicitly */
input[name="pickup_date"] {
    display: none !important;
}

/* Label Styling */
.custom-date-label {
    display: block;
    color: #ffffff;
    font-size: 14px;
    font-weight: 500;
    text-transform: uppercase;
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}

.custom-date-label .required-star {
    color: red;
    margin-left: 3px;
}

/* Trigger Box (The "Open" Line) */
.custom-date-input-trigger {
    width: 100%;
    border-bottom: 2px solid #ffffff;
    background: transparent;
    color: #ffffff;
    cursor: pointer;
    padding: 8px 0;
    font-size: 16px;
    min-height: 40px;
    display: flex;
    align-items: center;
    position: relative;
}

.custom-date-display-value {
    color: #ffffff;
    font-size: 16px;
    opacity: 0.8;
}

.custom-date-display-value.has-value {
    opacity: 1;
    font-weight: 600;
}

/* Calendar Popover */
.custom-date-popover {
    display: none;
    position: absolute;
    top: 55px;
    left: 0;
    width: 320px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    z-index: 10001;
    padding: 20px;
    color: #333;
}

.custom-date-popover.open {
    display: block;
}

/* Calendar Header */
.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 0 5px;
}

.calendar-title-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 600;
}

/* Clean Month Select */
.calendar-month-select {
    border: none !important;
    background: transparent !important;
    background-color: transparent !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    font-family: inherit;

    /* Reinforce Black Text */
    color: #000000 !important;
    opacity: 1 !important;
    /* Ensure no transparency */
    -webkit-text-fill-color: #000000 !important;
    /* Webkit override */

    cursor: pointer;
    padding: 5px 25px 5px 5px !important;
    margin: 0 !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    outline: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;

    /* Custom Chevron Arrow - Dark Black */
    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='%23000000' 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") !important;
    background-repeat: no-repeat !important;
    background-position: right 0px center !important;
    background-size: 12px !important;

    width: auto !important;
    min-width: 110px !important;
    text-align: left !important;
}

/* Fix for Firefox showing focus ring */
.calendar-month-select:-moz-focusring {
    color: transparent !important;
    text-shadow: 0 0 0 #000 !important;
}

/* Clean Year Input */
.calendar-year-input {
    border: none !important;
    background: transparent !important;
    background-color: transparent !important;
    width: 60px !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    font-family: inherit;

    /* Reinforce Black Text */
    color: #000000 !important;
    opacity: 1 !important;
    -webkit-text-fill-color: #000000 !important;

    padding: 0 !important;
    text-align: center !important;
    outline: none !important;
    box-shadow: none !important;
    margin-left: 5px !important;
    -moz-appearance: textfield !important;
}

/* Webkit specific to remove or style background if needed */
.calendar-year-input::-webkit-inner-spin-button,
.calendar-year-input::-webkit-outer-spin-button {
    opacity: 1;
    cursor: pointer;
    filter: invert(1);
    /* Make spinners dark */
}

/* Nav Buttons */
.calendar-nav-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 18px;
    color: #000000 !important;
    /* Ensure arrows are black too */
    padding: 0;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.calendar-nav-btn:hover {
    background: #f0f0f0;
}

/* Calendar Grid */
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    gap: 5px;
}

.calendar-day-name {
    font-size: 13px;
    color: #888;
    font-weight: 600;
    margin-bottom: 5px;
}

.calendar-day {
    padding: 0;
    font-size: 15px;
    cursor: pointer;
    border-radius: 50%;
    transition: all 0.2s;
    color: #333;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

.calendar-day:hover:not(.empty):not(.disabled) {
    background: #f0f0f0;
}

.calendar-day.selected {
    background: #000000;
    /* Black selected bg */
    border: 1px solid #000000;
    font-weight: bold;
    color: #ffffff;
    /* White text on black selection */
}

.calendar-day.today {
    color: #000;
    font-weight: bold;
}

.calendar-day.empty {
    cursor: default;
}

.calendar-day.disabled {
    color: #ddd;
    cursor: not-allowed;
}