/*
 * Statische Stile für die Seite "Reservierung bearbeiten" im Admin-Bereich.
 * Verwendet dasselbe Kartenlayout wie neue-reservierung.css
 * Dynamische Farbwerte werden per wp_add_inline_style() in PHP hinzugefügt.
 */

/* ============================================
   KARTENLAYOUT FÜR RESERVIERUNG BEARBEITEN
   ============================================ */

/* Kartenlayout für alle Bildschirmgrößen */
.form-table {
    display: block !important;
    border: none !important;
    background: transparent !important;
}

.form-table tbody,
.form-table tr {
    border: none !important;
}

.form-table tr {
    background: #fff;
        border: 2px solid #1a4a8a;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: box-shadow 0.2s;
    margin-bottom: 15px;
}

.form-table tr:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.form-table th,
.form-table td {
    display: table-cell !important;
    width: auto !important;
    padding: 15px 20px !important;
    border: none !important;
    box-sizing: border-box;
    vertical-align: middle;
}

.form-table th {
    font-weight: 600;
    font-size: 14px;
    color: #23282d;
    width: 30% !important;
}

.form-table th label {
    display: inline;
    margin: 0;
}

.form-table td {
    font-size: 14px;
    width: 70% !important;
}

.form-table td input[type="text"],
.form-table td input[type="email"],
.form-table td select,
.form-table td textarea {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
}

.form-table td .description {
    margin-top: 8px;
    font-size: 13px;
    color: #666;
}

/* Submit Button Styling */
.form-table + .button-primary {
    width: 100%;
    padding: 15px;
    font-size: 16px;
    text-align: center;
    margin-top: 20px;
}

/* ============================================
   DATEPICKER STYLES
   ============================================ */

/* Deaktivierte Tage (nicht auswählbar) - Basiszustand von jQuery UI */
.ui-datepicker .ui-state-disabled .ui-state-default {
    opacity: 0.7 !important;
    background: #f5f5f5 !important;
    color: #999 !important;
    cursor: not-allowed !important;
    border: 1px solid #ddd !important;
}

/* Ausgeschlossene Tage (Feiertage/Schließtage aus Einstellungen) */
.ui-datepicker .ausgeschlossener-tag .ui-state-default,
.ui-datepicker .ausgeschlossener-tag span {
    background-color: #ffdddd !important;
    color: #ff0000 !important;
    text-decoration: line-through !important;
    border-color: #ffc0c0 !important;
    opacity: 1 !important;
}

/* Urlaubstage (Betriebsurlaub) */
.ui-datepicker .urlaub-gesperrt-tag .ui-state-default,
.ui-datepicker .urlaub-gesperrt-tag span {
    background-color: #fff3e0 !important;
    color: #e65100 !important;
    border-color: #ffb74d !important;
    cursor: not-allowed !important;
    opacity: 1 !important;
}

/* Spezielle geschlossene Tage */
.ui-datepicker .speziell-geschlossen-tag .ui-state-default,
.ui-datepicker .speziell-geschlossen-tag span {
    background-color: #fce4e4 !important;
    color: #c62828 !important;
    border-color: #e57373 !important;
    cursor: not-allowed !important;
    opacity: 1 !important;
}

/* Deaktivierte Wochentage (z.B. Ruhetage aus Einstellungen) */
.ui-datepicker .deaktivierter-wochentag .ui-state-default,
.ui-datepicker .deaktivierter-wochentag span {
    background-color: #f0f0f0 !important;
    color: #999 !important;
    text-decoration: line-through !important;
    border-color: #e0e0e0 !important;
    opacity: 1 !important;
}

div.ui-datepicker {
    font-size: 14px;
    border-radius: 4px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    z-index: 1000 !important;
    width: 80% !important;
    max-width: 300px;
    margin-left: auto !important;
    margin-right: auto !important;
    padding: 0 !important;
    background-color: #ffffff !important; /* White background for the datepicker container */
    border: 1px solid #ddd !important; /* Border for the datepicker container */
}

#ui-datepicker-div {
    display: none;
}

.ui-datepicker-header {
    background: var(--simpbook-container-bg) !important;
    color: var( --simpbook-text-color) !important;
    border-radius: 4px 4px 0 0;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 5px !important;
    border-bottom: 1px solid #135e96;
}

.ui-datepicker-prev {
    order: 1;
    flex-shrink: 0;
    position: relative !important; top: auto !important; left: auto !important; right: auto !important;
    background-color: var(--simpbook-button-color) !important; border: none !important; cursor: pointer;
    margin-left: 5px !important;
}

.ui-datepicker-title {
    order: 2;
    flex-grow: 1;
    text-align: center !important;
    margin: 0 0.5em !important;
    line-height: 1.8em !important;
    font-weight: bold;
}

.ui-datepicker-next {
    order: 3;
    flex-shrink: 0;
    position: relative !important; top: auto !important; left: auto !important; right: auto !important;
    background-color: var(--simpbook-button-color) !important; border: none !important; cursor: pointer;
    margin-right: 5px !important;
}

.ui-datepicker-prev .ui-icon,
.ui-datepicker-next .ui-icon {
    background-image: none !important;
    text-indent: -9999px !important;
    overflow: hidden;
    width: 1.2em; height: 1.2em;
    display: inline-block; position: relative; vertical-align: middle;
}

.ui-datepicker-prev .ui-icon::before {
    content: ''; display: block; width: 100%; height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23FFFFFF'%3E%3Cpath d='M11.043 1.561a.75.75 0 00-1.061 0L4.779 6.764a.75.75 0 000 1.06L9.982 13.03a.75.75 0 101.06-1.061L6.37 7.294l4.673-4.673a.75.75 0 000-1.06z'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: center center; background-size: contain;
}

.ui-datepicker-next .ui-icon::before {
    content: ''; display: block; width: 100%; height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23FFFFFF'%3E%3Cpath d='M5.018 1.561a.75.75 0 011.061 0l5.203 5.203a.75.75 0 010 1.06l-5.203 5.203a.75.75 0 11-1.06-1.061L9.63 7.294 5.018 2.622a.75.75 0 010-1.06z'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: center center; background-size: contain;
}

.ui-datepicker-calendar {
    width: 100%; border-collapse: collapse; margin: 0;
}

.ui-datepicker-calendar th {
    background-color: #f7f7f7 !important; color: #333 !important;
    padding: 5px 2px !important; font-size: 12px !important; line-height: 1.2 !important;
    text-align: center; font-weight: bold;
}

.ui-datepicker-calendar td {
    padding: 1px !important; border: none;
}

.ui-datepicker-calendar td a.ui-state-default,
.ui-datepicker-calendar td span.ui-state-default {
    display: block !important; box-sizing: border-box !important; width: 100% !important;
    text-align: center !important; text-decoration: none !important;
    padding: 5px 2px !important; font-size: 13px !important; line-height: 1.4em !important;
    border-radius: 3px !important; border: 1px solid #ddd !important;
    color: #333 !important; background: #fdfdfd !important; opacity: 1.0 !important;
}

.ui-datepicker-calendar td a.ui-state-hover {
    background: #e0f7ff !important; border-color: #99d1ff !important; color: #004a7c !important;
}

.ui-datepicker-calendar td.ui-datepicker-today a.ui-state-default,
.ui-datepicker-calendar td.ui-datepicker-today span.ui-state-default {
    background: #fffadd !important; border-color: #fcefae !important; color: #363636 !important; font-weight: bold;
}

.ui-datepicker-calendar td.ui-datepicker-current-day a.ui-state-default,
.ui-datepicker-calendar td.ui-datepicker-current-day span.ui-state-default {
    background: #2271b1 !important; color: #ffffff !important; border-color: #135e96 !important; font-weight: bold;
}

.ui-datepicker-calendar td.ui-state-disabled span.ui-state-default,
.ui-datepicker-calendar td.ui-state-disabled a.ui-state-default {
    background-color: var(--simpbook-container-bg) !important;
    color:rgb(9, 9, 9) !important;
    opacity: 0.9 !important;
    border-color:rgb(128, 117, 118) !important;
}


@media (max-width: 782px) {
    div.ui-datepicker {
        width: 90% !important; max-width: none;
        background-color: #ffffff !important; /* White background for the datepicker container */
        border: 1px solid #ddd !important; /* Border for the datepicker container */
    }
    .ui-datepicker-calendar th {
        padding: 3px 1px !important; font-size: 11px !important;
    }
    .ui-datepicker-calendar td a.ui-state-default,
    .ui-datepicker-calendar td span.ui-state-default {
        font-size: 12px !important; padding: 4px 1px !important;
    }
}
