/* Wunschdatum-Feld und flatpickr Styling */

.wwh-delivery-date-field {
    margin: 15px 0;
}

.wwh-delivery-date-field label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
}

.wwh-delivery-date-field input,
.wwh-delivery-date-field input.flatpickr-input,
.wwh-delivery-date-field textarea,
.wwh-wish-text-field textarea {
    font: inherit;
    font-size: 1rem;
    padding: 0.9em 1em;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    border: 1px solid #ccc;
    border-radius: 4px;
    cursor: text;
    box-sizing: border-box;
}

.wwh-delivery-date-field textarea {
    min-height: 120px;
    resize: vertical;
}

.wwh-delivery-date-field input:focus {
    border-color: #0073aa;
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.1);
}

/* flatpickr Calendar Styling für bessere Sichtbarkeit */
.flatpickr-calendar {
    box-shadow: 0 3px 13px rgba(0, 0, 0, 0.08);
    border-radius: 4px;
    background: #fff;
    opacity: 1;
    transform: none;
}

.flatpickr-calendar.open {
    display: inline-block;
    z-index: 99999;
}

/* Header - Monat/Jahr Navigation */
.flatpickr-months {
    padding: 12px;
}

.flatpickr-month {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.flatpickr-current-month {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1 1 auto;
    min-width: 0;
}

.flatpickr-prev-month,
.flatpickr-next-month {
    height: 34px;
    width: 34px;
    padding: 0;
    line-height: 34px;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s;
    font-size: 18px;
    flex: 0 0 auto;
    margin: 0;
}

.flatpickr-prev-month:hover,
.flatpickr-next-month:hover {
    background: #f1f1f1;
}

.cur-month {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.numInputWrapper {
    flex: 0 0 auto;
    padding: 0 6px;
}

.numInputWrapper input {
    font-size: 16px;
    padding: 6px;
    border: 1px solid #ddd;
    border-radius: 3px;
    width: 5em;
    text-align: center;
}

.flatpickr-calendar {
    width: auto;
    min-width: 280px;
    max-width: 100%;
}


/* Wochentage-Header */
.flatpickr-weekdays {
    display: flex;
    padding: 0 12px;
    margin-bottom: 8px;
}

.flatpickr-weekdaycontainer .flatpickr-weekday {
    flex: 1;
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    color: #666;
    padding: 6px 0;
}

/* Tage */
.flatpickr-days {
    padding: 0 12px 12px;
}

.dayContainer {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
}

.flatpickr-day {
    width: 100%;
    padding: 10px 0;
    font-size: 14px;
    border-radius: 3px;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    line-height: 1;
    text-align: center;
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.flatpickr-day:hover:not(.disabled):not(.nextMonthDay):not(.prevMonthDay) {
    background: #e8e8e8;
    color: #333;
}

.flatpickr-day.selected {
    background: #0073aa;
    color: white;
    font-weight: 600;
}

.flatpickr-day.today {
    border: 2px solid #0073aa;
    background: transparent;
    color: #0073aa;
}

.flatpickr-day.disabled,
.flatpickr-day.disabled:hover {
    opacity: 0.35;
    cursor: not-allowed !important;
    text-decoration: line-through;
    background: transparent !important;
    color: #999 !important;
    pointer-events: none;
}

.flatpickr-day.disabled:active {
    pointer-events: none;
}

.flatpickr-day.prevMonthDay,
.flatpickr-day.nextMonthDay {
    color: #ccc;
    background: transparent;
    cursor: default;
}

.flatpickr-day.inRange {
    background: #f0f0f0;
}

/* Footer / Close Button */
.flatpickr-time {
    display: none;
}

/* Mobile responsiv */
@media (max-width: 768px) {
    .flatpickr-day {
        padding: 12px 0;
        min-height: 44px;
        font-size: 16px;
    }

    .flatpickr-calendar {
        position: fixed !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        top: auto !important;
        border-radius: 8px 8px 0 0;
        width: 100% !important;
        max-width: none;
    }

    .flatpickr-calendar.hasTime .numInputWrapper {
        display: none;
    }

    .flatpickr-month {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 12px;
    }

    .flatpickr-months {
        padding: 12px;
    }
}

/* Fehler-Anzeige */
#wwh_wunschdatum-errors {
    color: #dc3545;
    margin-top: 5px;
    font-size: 14px;
    display: block;
}

.wwh-opening-hours-marker {
    text-decoration: underline;
    text-decoration-style: dotted;
    cursor: pointer;
    color: #0366d6;
}

.wwh-opening-hours-marker:hover,
.wwh-opening-hours-marker:focus {
    color: #003d80;
    outline: none;
}

.wwh-opening-hours-tooltip {
    max-width: 260px;
    padding: 10px 12px;
    background: rgba(0, 0, 0, 0.9);
    color: #fff;
    font-size: 13px;
    border-radius: 6px;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.24);
    line-height: 1.4;
    pointer-events: none;
}

