/* Flatpickr DOB picker - Life Horoscope theme */

.wcpa_form_outer input[type="datetime-local"],
.wcpa_form_outer input[type="date"],
.wcpa_form_outer input[type="time"] {
    width: 100% !important;
    min-height: 48px !important;
    padding: 0 44px 0 16px !important;
    font-size: 15px !important;
    color: #34495e !important;
    background: #f9fafc 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='%23c0392b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2' ry='2'/%3E%3Cline x1='16' y1='2' x2='16' y2='6'/%3E%3Cline x1='8' y1='2' x2='8' y2='6'/%3E%3Cline x1='3' y1='10' x2='21' y2='10'/%3E%3C/svg%3E") no-repeat right 14px center !important;
    background-size: 20px !important;
    border: 1.5px solid #dce1e7 !important;
    border-radius: 10px !important;
    box-sizing: border-box !important;
    cursor: pointer !important;
}

.wcpa_form_outer input[type="datetime-local"]::-webkit-calendar-picker-indicator,
.wcpa_form_outer input[type="date"]::-webkit-calendar-picker-indicator {
    opacity: 0;
    position: absolute;
    right: 0;
    width: 48px;
    height: 100%;
    cursor: pointer;
}

.lh-dob-field .flatpickr-wrapper,
.lh-dob-field .flatpickr-input[readonly] {
    width: 100% !important;
}

.lh-dob-field .flatpickr-wrapper {
    display: block;
}

.lh-dob-field input[type="datetime-local"],
.lh-dob-field input[type="date"],
.lh-dob-field input[type="hidden"],
.lh-dob-field input.flatpickr-input:not(.form-control):not(.wcpa-fp-input),
.lh-dob-field input.lh-dob-original:not(.wcpa-fp-input) {
    position: absolute !important;
    opacity: 0 !important;
    pointer-events: none !important;
    height: 0 !important;
    width: 0 !important;
    min-height: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    margin: 0 !important;
    display: none !important;
}

.lh-dob-field input.wcpa-fp-input {
    position: relative !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    display: block !important;
    width: 100% !important;
    height: auto !important;
    min-height: 48px !important;
}

/* Only style Flatpickr's visible alt input — never the twin/original */
.lh-dob-field .flatpickr-input.form-control,
.lh-dob-field .flatpickr-wrapper > input.form-control {
    width: 100% !important;
    min-height: 48px !important;
    padding: 0 44px 0 16px !important;
    font-size: 15px !important;
    color: #34495e !important;
    background: #f9fafc 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='%23c0392b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2' ry='2'/%3E%3Cline x1='16' y1='2' x2='16' y2='6'/%3E%3Cline x1='8' y1='2' x2='8' y2='6'/%3E%3Cline x1='3' y1='10' x2='21' y2='10'/%3E%3C/svg%3E") no-repeat right 14px center !important;
    background-size: 20px !important;
    border: 1.5px solid #dce1e7 !important;
    border-radius: 10px !important;
    box-sizing: border-box !important;
    cursor: pointer !important;
}

.lh-dob-field .flatpickr-input:focus {
    border-color: #c0392b !important;
    background-color: #ffffff !important;
    box-shadow: 0 0 0 3px rgba(192, 57, 43, 0.12) !important;
    outline: none !important;
}

/* Flatpickr popup styling */
.flatpickr-calendar {
    border-radius: 14px !important;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18) !important;
    border: 1px solid #e8ecf1 !important;
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif !important;
    overflow: hidden;
}

.flatpickr-months {
    background: #fafbfc;
    border-bottom: 1px solid #e8ecf1;
}

.flatpickr-current-month {
    font-weight: 700 !important;
    color: #2c3e50 !important;
}

.flatpickr-day.selected,
.flatpickr-day.startRange,
.flatpickr-day.endRange,
.flatpickr-day.selected:hover {
    background: #c0392b !important;
    border-color: #c0392b !important;
}

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

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

.flatpickr-day:hover {
    background: #fdecea !important;
    border-color: #fdecea !important;
}

.flatpickr-time {
    border-top: 1px solid #e8ecf1 !important;
}

.flatpickr-time input:hover,
.flatpickr-time input:focus,
.flatpickr-time .flatpickr-am-pm:hover,
.flatpickr-time .flatpickr-am-pm:focus {
    background: #fdecea !important;
}

@media (max-width: 520px) {
    .flatpickr-calendar {
        width: calc(100vw - 24px) !important;
        max-width: 340px !important;
    }
}
