/* =====================================================
   Kajak Booking Plugin - Unified Styles
   ===================================================== */

:root {
    /* Wird dynamisch per JS gesetzt. Fallback: Blau */
    --selected-kajak-color-solid: #3498db; 
}

/* -----------------------------------------------------
   Hauptlayout & Container
----------------------------------------------------- */
.kb-booking-layout {
    max-width: 900px;
    margin: 0 auto;
    font-family: inherit;
}

#kajak-rental-calendar, 
#kajak-resource-calendar {
    background: #ffffff;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 25px;
    font-family: inherit;
}

#kajak-rental-calendar { height: 650px; }
#kajak-resource-calendar { 
    max-width: 1200px; 
    margin: 40px auto; 
    min-height: 500px; 
}

/* -----------------------------------------------------
   Kajak Auswahl (Wiederhergestellt)
----------------------------------------------------- */
.kb-kajak-select {
    text-align: center;
    margin-bottom: 20px;
}

.kb-kajak-select select {
    width: 280px;
    padding: 8px 12px;
    font-size: 16px;
    border-radius: 4px;
    border: 1px solid #ccc;
    background: #fff;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.kb-kajak-select select:focus {
    border-color: var(--selected-kajak-color-solid);
    outline: none;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2); /* Sanfter Fokus-Ring */
}

/* -----------------------------------------------------
   DYNAMISCHE FARBEN & SELEKTION (Kein Rot mehr!)
----------------------------------------------------- */

/* 1. Die aktive Auswahl-Fläche (Highlight) */
.fc .fc-highlight {
    background-color: var(--selected-kajak-color-solid) !important;
    opacity: 0.3 !important;
}

/* 2. Die Vorschau beim Klicken (Mirror) - Das war vorher rot */
.fc-event-mirror,
.fc-event-mirror .fc-event-main,
.fc-v-event.fc-event-mirror {
    background-color: var(--selected-kajak-color-solid) !important;
    border-color: var(--selected-kajak-color-solid) !important;
    background: var(--selected-kajak-color-solid) !important;
    opacity: 0.7 !important;
    color: #fff !important;
}

/* 3. Bestehende Buchungen (Events) im Buchungskalender */
#kajak-rental-calendar .fc-event,
#kajak-rental-calendar .fc-event-main {
    /* Hier wird die Farbe im JS per eventBackgroundColor gesetzt */
    border: none !important;
    font-family: inherit !important;
    font-size: 0.85rem !important;
    color: #fff !important;
}

/* -----------------------------------------------------
   Interaktion (Slots & Cursor)
----------------------------------------------------- */
.fc-timegrid-slot {
    height: 40px !important;
    cursor: crosshair !important;
}

.fc-timegrid-slot:hover {
    background-color: rgba(0, 0, 0, 0.02) !important;
}

/* -----------------------------------------------------
   Infobox (Feedback Bereich)
----------------------------------------------------- */
#kb-selection-display {
    background-color: #fffdf0; /* Ganz leichtes Creme-Gelb */
    border-left: 4px solid var(--selected-kajak-color-solid);
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 4px;
    font-size: 0.95rem;
    transition: border-color 0.3s ease;
}

#kb-cancel-selection {
    color: #e74c3c !important;
    text-decoration: none !important;
    font-weight: bold;
    font-size: 0.9rem;
    border: 1px solid #e74c3c;
    padding: 4px 10px;
    border-radius: 4px;
    white-space: nowrap;
    transition: all 0.2s ease;
}

#kb-cancel-selection:hover {
    background: #e74c3c !important;
    color: #fff !important;
}

/* -----------------------------------------------------
   Buchungs-Button
----------------------------------------------------- */
#kb-submit {
    width: 100%;
    padding: 12px 40px;
    font-size: 18px;
    cursor: pointer;
    border-radius: 6px;
    border: none;
    background-color: var(--selected-kajak-color-solid) !important;
    color: #fff;
    transition: all 0.3s ease;
}

#kb-submit:disabled {
    background-color: #ccc !important;
    opacity: 0.6;
    cursor: not-allowed;
}

/* -----------------------------------------------------
   FullCalendar UI-Cleanups (Header, Schrift, Buttons)
----------------------------------------------------- */
.fc-col-header-cell, .fc-col-header-cell a {
    font-weight: normal !important;
    text-decoration: none !important;
    color: inherit !important;
}

.fc-button {
    all: unset !important;
    cursor: pointer !important;
    padding: 6px 12px !important;
    background: #eee !important;
    border-radius: 4px !important;
    font-size: 0.9rem !important;
    margin: 2px !important;
}

.fc-button:hover { background: #ddd !important; }

/* -----------------------------------------------------
   Spezial: Vertikale Boot-Namen (Ressourcen-Kalender)
----------------------------------------------------- */
.fc-resource-header-cell {
    height: 160px !important;
    width: 85px !important;
    min-width: 85px !important;
}

.fc-resource-header-cell .fc-col-header-cell-frame {
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-end !important;
    align-items: center !important;
    height: 100% !important;
    padding-bottom: 10px;
}

.fc-resource-header-cell .fc-col-header-cell-cushion {
    writing-mode: vertical-rl !important;
    transform: rotate(180deg) !important;
    white-space: nowrap !important;
    text-decoration: none !important;
}

/* Zeitachse (08:00...) schützen */
.fc .fc-timegrid-axis-frame {
    writing-mode: horizontal-tb !important;
    transform: none !important;
    width: 55px !important;
    display: flex !important;
    justify-content: center;
}

/* -----------------------------------------------------
   Mobile Optimierung
----------------------------------------------------- */
@media (max-width: 768px) {
    #kajak-resource-calendar .fc-view-harness {
        overflow-x: auto !important;
    }

    .fc-col-header, .fc-timegrid-body, .fc-timegrid-slots table {
        min-width: 800px !important;
    }

    .fc .fc-timegrid-axis {
        position: sticky !important;
        left: 0 !important;
        background: #ffffff !important;
        z-index: 100 !important;
        box-shadow: 2px 0 5px rgba(0,0,0,0.1);
    }
}