/**
 * Pilot Customer Profile — branded Flatpickr theme for the 生日 picker.
 *
 * Loads after flatpickr.min.css so these rules win without !important
 * for properties Flatpickr only sets once. We still use !important on
 * a few high-traffic selectors (.flatpickr-day variants) because the
 * vendor CSS uses similarly high specificity for hover/active states.
 *
 * Palette: brand orange #cd5618, neutral text #1d1d1f, soft grey #e5e5e7.
 */

.flatpickr-calendar {
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    border: 1px solid #e5e5e7;
    font-family: inherit;
    padding: 4px;
    background: #ffffff;
}

.flatpickr-calendar.arrowTop:before,
.flatpickr-calendar.arrowBottom:before {
    border-bottom-color: #e5e5e7;
}
.flatpickr-calendar.arrowTop:after,
.flatpickr-calendar.arrowBottom:after {
    border-bottom-color: #ffffff;
}

.flatpickr-months {
    background: #ffffff;
    border-radius: 10px 10px 0 0;
    padding: 6px 4px 4px;
}

.flatpickr-month {
    color: #1d1d1f;
    height: 40px;
    overflow: hidden;
}

.flatpickr-current-month {
    padding-top: 6px;
    font-size: 0.9375rem;
    font-weight: 600;
}

.flatpickr-current-month .flatpickr-monthDropdown-months,
.flatpickr-current-month input.cur-year {
    font-weight: 600;
    color: #1d1d1f;
    font-size: 0.9375rem;
}

.flatpickr-current-month .flatpickr-monthDropdown-months {
    border-radius: 6px;
    padding: 4px 6px;
    transition: background 0.15s ease;
}

.flatpickr-current-month .flatpickr-monthDropdown-months:hover {
    background: rgba(205, 86, 24, 0.08);
}

.flatpickr-current-month input.cur-year {
    background: transparent;
    border-radius: 6px;
    padding: 2px 6px;
    width: 58px !important;  /* enough for "2026" at any system font scale */
    max-width: none !important;
    transition: background 0.15s ease;
}

.flatpickr-current-month input.cur-year:hover,
.flatpickr-current-month input.cur-year:focus {
    background: rgba(205, 86, 24, 0.08);
}

.flatpickr-monthDropdown-month {
    color: #1d1d1f;
    background: #ffffff;
}

.flatpickr-prev-month,
.flatpickr-next-month {
    padding: 10px 12px;
    color: #6e6e6e;
    transition: color 0.15s ease;
}

.flatpickr-prev-month:hover svg,
.flatpickr-next-month:hover svg {
    fill: #cd5618;
}

.flatpickr-weekdays {
    background: #ffffff;
    padding-top: 4px;
}

span.flatpickr-weekday {
    color: #6e6e6e;
    font-weight: 500;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
}

.flatpickr-days {
    border-radius: 0 0 10px 10px;
}

.dayContainer {
    padding: 4px;
}

.flatpickr-day {
    border-radius: 8px !important;
    color: #1d1d1f;
    font-size: 0.875rem;
    font-weight: 400;
    height: 38px;
    line-height: 38px;
    transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.flatpickr-day:hover,
.flatpickr-day:focus {
    background: rgba(205, 86, 24, 0.08) !important;
    border-color: transparent !important;
    color: #cd5618 !important;
}

.flatpickr-day.today {
    border-color: #cd5618 !important;
    color: #cd5618 !important;
    font-weight: 500;
}

.flatpickr-day.today:hover,
.flatpickr-day.today:focus {
    background: #cd5618 !important;
    color: #ffffff !important;
}

.flatpickr-day.selected,
.flatpickr-day.selected:hover,
.flatpickr-day.selected:focus,
.flatpickr-day.startRange,
.flatpickr-day.endRange {
    background: #cd5618 !important;
    border-color: #cd5618 !important;
    color: #ffffff !important;
    box-shadow: 0 2px 6px rgba(205, 86, 24, 0.30);
}

.flatpickr-day.prevMonthDay,
.flatpickr-day.nextMonthDay {
    color: #c6c6c8 !important;
}

.flatpickr-day.flatpickr-disabled,
.flatpickr-day.flatpickr-disabled:hover {
    color: #d8d8da !important;
    background: transparent !important;
    cursor: not-allowed;
}

/* The Flatpickr-controlled input: after init, the original input's
   type becomes "text" so the existing `.pcp-fields input[type="date"]`
   rule in myaccount.css stops matching. Re-apply the same card look
   here so the field appearance is stable regardless of Flatpickr state. */
.pcp-fields .flatpickr-input,
.pcp-fields input[type="text"][data-pcp-birthday] {
    width: 100%;
    padding: 12px 16px;
    font-size: 15px;
    color: #1d1d1f;
    background: #fafafa;
    border: 2px solid #e5e5e7;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-family: inherit;
}

.pcp-fields .flatpickr-input:focus,
.pcp-fields input[type="text"][data-pcp-birthday]:focus {
    outline: none;
    border-color: #cd5618;
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(205, 86, 24, 0.10);
}

/* Year input spinner arrows are ugly defaults — hide them; user clicks
   the up/down buttons Flatpickr ships, or types the year. */
.flatpickr-current-month input.cur-year[disabled],
.flatpickr-current-month input.cur-year[disabled]:hover {
    color: #c6c6c8;
    background: transparent;
}
