/**
 * Fleet Terminplan Modal Styles - OVERRIDE
 * Diese CSS lädt ZULETZT und kann NICHT überschrieben werden
 * Spezifisch für Modal-Dialoge
 */

/* ================================================
   MODAL CONTAINER - Höchste Spezifität
   ================================================ */
#booking-modal.fleet-modal {
    position: fixed !important;
    z-index: 999999 !important;
    left: 0 !important;
    top: 0 !important;
    width: 100% !important;
    height: 100% !important;
    overflow: auto !important;
    background-color: rgba(0, 0, 0, 0.8) !important;
    align-items: center !important;
    justify-content: center !important;
    /* display wird von JavaScript gesteuert - KEIN !important hier! */
}

/* Wenn das Modal NICHT display:none hat, dann flex */
#booking-modal.fleet-modal[style*="display: block"],
#booking-modal.fleet-modal[style*="display: flex"] {
    display: flex !important;
}

/* MODAL CONTENT - DUNKLER HINTERGRUND */
#booking-modal.fleet-modal .fleet-modal-content {
    background-color: #2C3E50 !important;
    margin: auto !important;
    padding: 40px !important;
    border-radius: 16px !important;
    border: 2px solid rgba(23, 134, 135, 0.3) !important;
    width: 90% !important;
    max-width: 600px !important;
    max-height: 90vh !important;
    overflow-y: auto !important;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5) !important;
    position: relative !important;
}

/* MODAL TITEL */
#booking-modal.fleet-modal h2 {
    color: #178687 !important;
    margin: 0 0 20px 0 !important;
    font-size: 1.8rem !important;
    font-weight: 700 !important;
}

/* ================================================
   FORMULAR LABELS
   ================================================ */
#booking-modal .form-row label {
    display: block !important;
    margin-bottom: 8px !important;
    font-weight: 600 !important;
    color: rgba(255, 255, 255, 0.9) !important;
    font-size: 0.9rem !important;
}

/* ================================================
   EINGABEFELDER - IDENTISCH WIE KONTAKT-SEITE
   ================================================ */
#booking-modal .form-row input[type="text"],
#booking-modal .form-row input[type="email"],
#booking-modal .form-row input[type="tel"],
#booking-modal .form-row select,
#booking-modal .form-row textarea {
    width: 100% !important;
    padding: 14px 16px !important;
    background: rgba(15, 25, 35, 0.7) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 8px !important;
    color: #ffffff !important;
    font-size: 1rem !important;
    font-family: inherit !important;
    transition: border-color 0.3s !important;
    box-sizing: border-box !important;
}

/* PLACEHOLDER */
#booking-modal .form-row input::placeholder,
#booking-modal .form-row select::placeholder,
#booking-modal .form-row textarea::placeholder {
    color: rgba(255, 255, 255, 0.3) !important;
}

/* FOCUS STATE */
#booking-modal .form-row input:focus,
#booking-modal .form-row select:focus,
#booking-modal .form-row textarea:focus {
    outline: none !important;
    border-color: #178687 !important;
    box-shadow: 0 0 0 3px rgba(23, 134, 135, 0.15) !important;
}

/* SELECT OPTIONS */
#booking-modal .form-row select option {
    background: #2C3E50 !important;
    color: #ffffff !important;
}

/* TEXTAREA */
#booking-modal .form-row textarea {
    min-height: 120px !important;
    resize: vertical !important;
}

/* ================================================
   BOOKING DATETIME DISPLAY
   ================================================ */
#booking-modal .booking-datetime {
    background: rgba(23, 134, 135, 0.15) !important;
    border: 1px solid rgba(23, 134, 135, 0.3) !important;
    padding: 15px !important;
    border-radius: 8px !important;
    margin-bottom: 20px !important;
    text-align: center !important;
    font-weight: 600 !important;
    color: #178687 !important;
    font-size: 16px !important;
}

/* ================================================
   SLOTS (Zeitauswahl)
   ================================================ */
#booking-modal .slots-container {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)) !important;
    gap: 10px !important;
    margin: 20px 0 !important;
    padding: 15px !important;
    background: rgba(23, 134, 135, 0.08) !important;
    border-radius: 8px !important;
}

#booking-modal .slot-button {
    padding: 12px !important;
    background: rgba(15, 25, 35, 0.5) !important;
    border: 2px solid rgba(23, 134, 135, 0.3) !important;
    border-radius: 8px !important;
    cursor: pointer !important;
    transition: all 0.3s !important;
    font-weight: 500 !important;
    color: rgba(255, 255, 255, 0.9) !important;
}

#booking-modal .slot-button:hover {
    background: rgba(23, 134, 135, 0.2) !important;
    border-color: #178687 !important;
    transform: translateY(-2px) !important;
}

#booking-modal .slot-button.selected {
    background: #178687 !important;
    color: #1a2535 !important;
    border-color: #178687 !important;
    font-weight: 700 !important;
}

/* ================================================
   BUTTONS
   ================================================ */
#booking-modal .button-primary {
    background: #178687 !important;
    color: #1a2535 !important;
    padding: 16px 24px !important;
    border: none !important;
    border-radius: 8px !important;
    font-size: 1.1rem !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    transition: all 0.3s !important;
}

#booking-modal .button-primary:hover {
    background: #147273 !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(23, 134, 135, 0.4) !important;
}

#booking-modal .button-secondary {
    background: transparent !important;
    color: #178687 !important;
    border: 2px solid #178687 !important;
    padding: 16px 24px !important;
    border-radius: 8px !important;
    font-size: 1.1rem !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    transition: all 0.3s !important;
}

#booking-modal .button-secondary:hover {
    background: rgba(23, 134, 135, 0.15) !important;
}

/* ================================================
   FORM ACTIONS
   ================================================ */
#booking-modal .form-actions {
    display: flex !important;
    gap: 10px !important;
    margin-top: 25px !important;
    padding-top: 20px !important;
    border-top: 2px solid rgba(23, 134, 135, 0.2) !important;
}

/* ================================================
   BOOKING NOTICE
   ================================================ */
#booking-modal .booking-notice {
    margin-top: 15px !important;
    font-size: 13px !important;
    color: rgba(255, 255, 255, 0.6) !important;
    font-style: italic !important;
}

/* ================================================
   CLOSE BUTTON
   ================================================ */
#booking-modal .fleet-modal-close {
    position: absolute !important;
    right: 20px !important;
    top: 20px !important;
    color: #aaa !important;
    font-size: 28px !important;
    font-weight: bold !important;
    cursor: pointer !important;
    transition: color 0.3s !important;
    z-index: 10 !important;
}

#booking-modal .fleet-modal-close:hover {
    color: #178687 !important;
}

/* ================================================
   RESPONSIVE
   ================================================ */
@media (max-width: 768px) {
    #booking-modal .fleet-modal-content {
        padding: 30px 20px !important;
        width: 95% !important;
    }

    #booking-modal .form-actions {
        flex-direction: column !important;
    }

    #booking-modal .button {
        width: 100% !important;
    }

    #booking-modal .slots-container {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)) !important;
        gap: 8px !important;
    }
}
