/* ==========================================================================
   ZWANGS-CSS: BUCHUNGSSEITE & POPUPS (Desktop & Global)
   ========================================================================== */

.bike-rental-app,
.bike-rental-app * {
    box-sizing: border-box;
}
.bike-rental-app {
    width: 100%; max-width: 100%; clear: both; float: none;
}
.bike-rental-app .bre-search-bar.search-row {
    width: 100%; max-width: 100%;
}

/* --- 1. Suchleiste --- */
.bre-search-bar {
    margin-bottom: 40px; background: #ffffff; padding: 24px; border-radius: 20px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.06); border: 1px solid #f1f5f9;
}

.label_search_row {
    display: block; font-size: 12px; font-weight: 800; color: #64748b; 
    margin-bottom: 8px; text-transform: uppercase; letter-spacing: 0.5px;
}

.bre-input-field {
    width: 100%; padding: 0 20px; border-radius: 14px; border: 2px solid #e2e8f0 !important; 
    outline: none; height: 60px; box-sizing: border-box; background: #f8fafc !important;
    color: #1e293b !important; font-size: 15px; font-weight: 600; transition: all 0.3s ease;
    cursor: pointer; appearance: none; -webkit-appearance: none;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="%2364748b" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="6 9 12 15 18 9"></polyline></svg>') !important;
    background-repeat: no-repeat !important; background-position: right 15px center !important; background-size: 18px !important;
}

.bre-input-field:focus {
    border-color: #bd0000 !important; background: #ffffff !important; box-shadow: 0 0 0 4px rgba(189,0,0,0.1) !important;
}

.bre-date-wrapper {
    display: flex; align-items: center; border: 2px solid #e2e8f0; border-radius: 14px;
    height: 60px; background: #f8fafc; padding: 0 20px; transition: all 0.3s ease;
}

.bre-date-wrapper:focus-within {
    border-color: #bd0000; background: #ffffff; box-shadow: 0 0 0 4px rgba(189,0,0,0.1);
}

.bre-date-wrapper svg { margin-right: 12px; fill: #bd0000; width: 20px; height: 20px; }

.bre-date-wrapper input, #f_date { 
    border: none !important; box-shadow: none !important; outline: none !important; 
    background: transparent !important; margin: 0 !important; width: 100%;
    font-size: 15px; font-weight: 600; color: #1e293b; cursor: pointer;
}

.bre-date-reset { cursor: pointer; font-weight: 900; color: #bd0000; margin-left: 10px; font-size: 18px; transition: transform 0.2s; }
.bre-date-reset:hover { transform: scale(1.2); }

/* --- 2. Sticky Bar Unten --- */
.bre-sticky-bar { 
    position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%) translateY(150%); 
    width: 95%; max-width: 1100px; background: #ffffff !important; 
    box-shadow: 0 -10px 30px rgba(0,0,0,0.15) !important; z-index: 9999; 
    padding: 15px 25px; border-radius: 20px; border-top: 4px solid #bd0000 !important; 
    transition: all 0.4s ease; display: flex; align-items: center; justify-content: space-between; 
}

.bre-sticky-reset { position: absolute; top: -15px; right: 10px; background: #000; color: #fff; width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; font-weight: bold; border: 2px solid #fff; box-shadow: 0 2px 10px rgba(0,0,0,0.2); z-index: 10; }
.bre-sticky-info-wrap { display: flex; align-items: center; gap: 15px; flex: 1; }
.bre-sticky-img { width: 70px; height: 50px; background: #f5f5f5; border-radius: 12px; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.bre-sticky-title { font-weight: 900; font-size: 16px; color: #000; }
.bre-sticky-period { font-size: 12px; color: #888; font-weight: 700; }
.bre-sticky-icons { display: flex; gap: 8px; margin: 0 20px; flex-wrap: wrap; justify-content: center; }
.bre-sticky-actions-wrap { display: flex; align-items: center; gap: 20px; }
.bre-sticky-price-wrap { text-align: right; }
.bre-sticky-price-label { font-size: 10px; color: red; text-transform: uppercase; font-weight: 800; }
.bre-sticky-price-val { font-size: 28px; font-weight: 900; color: #000; line-height: 1; }
.bre-sticky-buttons { display: flex; gap: 10px; align-items: center; }

/* Warenkorb Button */
.bre-cart-floating-btn { position: relative; background: #000; color: #fff; width: 55px; height: 55px; border-radius: 15px; display: flex; align-items: center; justify-content: center; text-decoration: none; transition: transform 0.2s; }
.bre-cart-floating-btn .dashicons { font-size: 26px; opacity: 0.8; }
.bre-cart-count { position: absolute; top: 0; right: -5px; background: #fff; color: red; font-size: 12px; font-weight: 900; min-width: 20px; height: 20px; border-radius: 50%; display: flex; align-items: center; justify-content: center; border: 2px solid red; box-shadow: 0 2px 5px rgba(0,0,0,0.3); z-index: 2; }

/* Extras Reminder */
.bre-extra-reminder { background: #fff1f1; color: red; font-size: 10px; font-weight: 900; padding: 8px 12px; border-radius: 10px; border: 1px dashed red; animation: pulse 2s infinite; cursor: pointer; transition: transform 0.2s ease;}
@keyframes pulse { 0% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.05); opacity: 0.8; } 100% { transform: scale(1); opacity: 1; } }
#extra_reminder:active { transform: scale(0.95); }

/* --- 3. Frontend Popups --- */
.bre-modal-bg { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.8); z-index: 10000; align-items: center; justify-content: center; backdrop-filter: blur(4px); }
.bre-modal-box { background: #fff; padding: 30px; border-radius: 25px; position: relative; box-shadow: 0 20px 50px rgba(0,0,0,0.3); font-family: sans-serif; }
.bre-modal-wide { max-width: 650px; width: 90%; max-height: 85vh; overflow-y: auto; }
.bre-modal-slim { max-width: 450px; width: 90%; }
.bre-modal-title { margin: 0 0 20px 0; font-size: 22px; font-weight: 900; color: #000; }

.bre-extras-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 20px; margin-bottom: 30px; }
.bre-extra-card { border: 1px solid #eee; border-radius: 10px; padding: 15px; text-align: center; display: flex; flex-direction: column; justify-content: space-between; cursor: pointer; transition: all 0.2s; }
.bre-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; margin-bottom: 15px; }
.bre-form-label { font-size: 10px; font-weight: 900; color: #888; display: block; margin-bottom: 5px; text-transform: uppercase; }

/* Abbrechen Link im Popup */
.abort-booking {
    background: #f0f0f0 !important; color: #333 !important; border: none !important; border-radius: 12px !important; height: 50px !important; font-size: 14px !important; font-weight: 800 !important; text-transform: uppercase !important; display: flex !important; align-items: center !important; justify-content: center !important; text-decoration: none !important; box-shadow: none !important;
}

/* ==========================================================================
   FRONTEND KALENDER POPUP - BEAUTY UPGRADE
   ========================================================================== */
#avail_modal .bre-modal-box {
    max-width: 750px !important; width: 95% !important; border-radius: 24px !important; padding: 30px !important; border: none !important; box-shadow: 0 20px 50px rgba(0,0,0,0.2) !important;
}
#avail_calendar_wrapper .flatpickr-calendar { box-shadow: none !important; border: none !important; margin: 0 auto; padding: 10px 0; }

.bre-day-free { background: #f0fdf4 !important; border: 1px solid #22c55e !important; color: #15803d !important; font-weight: 700 !important; border-radius: 8px !important; transition: all 0.2s ease; }
.bre-day-free:hover { background: #22c55e !important; border-color: #22c55e !important; color: #ffffff !important; transform: scale(1.05); }

.bre-day-booked { background: #fef2f2 !important; border: 1px solid #fca5a5 !important; color: #ef4444 !important; text-decoration: line-through !important; opacity: 0.5 !important; border-radius: 8px !important; cursor: not-allowed !important; }

#avail_calendar_wrapper .flatpickr-day.selected, #avail_calendar_wrapper .flatpickr-day.startRange, #avail_calendar_wrapper .flatpickr-day.endRange, #avail_calendar_wrapper .flatpickr-day.selected.inRange, #avail_calendar_wrapper .flatpickr-day.startRange.inRange, #avail_calendar_wrapper .flatpickr-day.endRange.inRange, #avail_calendar_wrapper .flatpickr-day.selected:focus, #avail_calendar_wrapper .flatpickr-day.startRange:focus, #avail_calendar_wrapper .flatpickr-day.endRange:focus, #avail_calendar_wrapper .flatpickr-day.selected:hover, #avail_calendar_wrapper .flatpickr-day.startRange:hover, #avail_calendar_wrapper .flatpickr-day.endRange:hover {
    background: #1e3a8a !important; border-color: #1e3a8a !important; color: #ffffff !important; border-radius: 8px !important; font-weight: 900 !important;
}

#avail_calendar_wrapper .flatpickr-day.inRange { background: #eff6ff !important; border-color: #dbeafe !important; color: #1e3a8a !important; border-radius: 0 !important; box-shadow: none !important; }

/* ==========================================================================
   MOBILE RESPONSIVENESS (Handy & Tablet)
   ========================================================================== */
@media (max-width: 1024px) {
    .ds-flyer-nav.bre-hide-menu { transform: translateY(100%) !important; opacity: 0 !important; pointer-events: none !important; transition: all 0.4s ease-in-out !important; }
}

@media (max-width: 768px) {
    .bre-search-bar { padding: 16px; gap: 10px; }
    
    .bre-sticky-bar {
        flex-direction: column !important; align-items: stretch !important; gap: 12px !important; padding: 15px !important; bottom: 85px !important; left: 50% !important; width: 100% !important; max-width: 100% !important; border-radius: 20px 20px 0 0 !important; box-shadow: 0 -10px 30px rgba(0,0,0,0.15) !important; border-top: 4px solid #bd0000 !important; background: #fff !important; z-index: 99999 !important;
    }

    .bre-sticky-info-wrap { display: flex !important; justify-content: flex-start !important; align-items: center !important; gap: 15px !important; width: 100% !important; text-align: left !important; border-bottom: 1px solid #f0f0f0; padding-bottom: 10px; }
    .bre-sticky-img { width: 60px !important; height: 40px !important; }
    .bre-sticky-title { font-size: 14px !important; line-height: 1.1; margin:0; }
    .bre-sticky-period { font-size: 10px !important; }

    .bre-sticky-actions-wrap { display: flex !important; flex-direction: row !important; justify-content: space-between !important; align-items: center !important; gap: 10px !important; width: 100% !important; border: none !important; padding-top: 0 !important; }
    .bre-sticky-price-wrap { flex: 1 !important; text-align: left !important; }
    .bre-sticky-price-val { font-size: 22px !important; }
    .bre-sticky-price-label { font-size: 9px !important; }
    .bre-sticky-buttons { display: flex !important; gap: 8px !important; align-items: center !important; justify-content: flex-end !important; }

    .bre-extra-reminder#extra_reminder { position: static !important; display: inline-flex !important; align-items: center !important; justify-content: center !important; height: 48px !important; margin: 0 !important; padding: 0 10px !important; font-size: 10px !important; white-space: nowrap !important; flex: 0 1 auto !important; order: 1 !important; }
    .bre-btn-secondary#st_open_extras { order: 2 !important; height: 48px !important; padding: 0 15px !important; font-size: 13px !important; flex: 0 1 auto !important; min-width: 80px !important; }
    .bre-cart-floating-btn#st_cart_btn { order: 3 !important; width: 48px !important; height: 48px !important; min-width: 48px !important; background: #000 !important; border-radius: 12px !important; }
    .bre-cart-floating-btn .dashicons { font-size: 24px !important; width: 24px !important; height: 24px !important; color: #fff !important; }

    .bre-sticky-reset#st_reset { position: absolute !important; top: -15px !important; right: 15px !important; width: 32px !important; height: 32px !important; display: flex !important; background: #000 !important; z-index: 99999 !important; flex: none !important; }

    .bre-form-grid { grid-template-columns: 1fr; gap: 10px; }
    .bre-modal-box { padding: 20px; }
    .bre-modal-title { font-size: 18px !important; margin-bottom: 15px !important; padding-right: 30px !important; }

    .modal-overlay.bre-modal-bg { z-index: 9999999 !important; background: rgba(0,0,0,0.85) !important; }

    .extras-modal.bre-modal-box { width: 92% !important; max-height: 80vh !important; margin-top: 10vh !important; padding: 20px 15px !important; border-radius: 20px !important; }
    .bre-modal-slim { width: 92% !important; }
    .bre-modal-wide { width: 95% !important; padding: 20px !important; }

    .bre-extras-grid { display: grid !important; grid-template-columns: 1fr 1fr !important; gap: 10px !important; margin-bottom: 20px !important; }
    .bre-extra-card { padding: 10px !important; border: 1px solid #eee !important; background: #fff !important; box-shadow: 0 2px 8px rgba(0,0,0,0.05) !important; }
    .bre-extra-img-wrap { height: 70px !important; }
    .bre-extra-img-wrap img { max-height: 70px !important; }
    .bre-extra-title { font-size: 12px !important; min-height: 32px; display: flex; align-items: center; justify-content: center; }
    .bre-extra-price { font-size: 13px !important; margin-bottom: 10px !important; }
    .bre-extra-status { font-size: 10px !important; padding: 6px !important; }
}

@media (max-width: 480px) {
    .bre-extras-grid { grid-template-columns: 1fr; }
    .bre-sticky-price-val { font-size: 18px !important; }
    .bre-btn-secondary#st_open_extras { padding: 0 8px !important; font-size: 11px !important; }
}