/* Basic status colors */
.available { background: lightgreen !important; }
.happy { background: greenyellow !important; }
.past { background: lightgray !important;border:none !important;border-radius: 0px !important;}
.vorlauf { background: whitesmoke !important; }
.selected { background: orange !important; }

/* Single booking states */
.booked-full { background: lightsalmon !important; }
.booked-start { background: linear-gradient(to top left, lightsalmon 50%, lightgreen 50%) !important; }
.booked-end { background: linear-gradient(to top right, lightsalmon 50%, lightgreen 50%) !important; }

.pending-full { background: gold !important; }
.pending-start { background: linear-gradient(to top left, gold 50%, lightgreen 50%) !important; }
.pending-end { background: linear-gradient(to top right, gold 50%, lightgreen 50%) !important; }

.past-pending-full { background: #FFF4C2 !important; border:none !important;border-radius: 0px !important;}
.past-pending-start { background: linear-gradient(to top left, #FFF4C2 50%, lightgray 50%) !important; border:none !important;border-radius: 0px !important;}
.past-pending-end { background: linear-gradient(to top right, #FFF4C2 50%, lightgray 50%) !important; border:none !important;border-radius: 0px !important;}

.past-booked-full { background: #E8B8B0 !important; border:none !important;border-radius: 0px !important;}
.past-booked-start { background: linear-gradient(to top left, #E8B8B0 50%, lightgray 50%) !important; border:none !important;border-radius: 0px !important;}
.past-booked-end { background: linear-gradient(to top right, #E8B8B0 50%, lightgray 50%) !important;border:none !important; border-radius: 0px !important;}

.past-booked-booked{ background: linear-gradient(to right, #E8B8B0 35%, lightgray 50%, #E8B8B0 65%) !important; border:none !important; border-radius: 0px !important;}
.past-booked-pending { background: linear-gradient(to right, #E8B8B0 35%, lightgray 50%, #FFF4C2 65%) !important; border:none !important;border-radius: 0px !important;}
.past-pending-booked { background: linear-gradient(to right, #FFF4C2 35%, lightgray 50%, #E8B8B0 65%) !important; border:none !important;border-radius: 0px !important;}
.past-pending-pending { background: linear-gradient(to right, #FFF4C2 35%, lightgray 50%, #FFF4C2 65%) !important;border:none !important; border-radius: 0px !important;}

.booked-blocked     { background: linear-gradient(to right, lightsalmon 35%, whitesmoke 50%, #ffdddd     65%) !important; }  /* booked endet → blocked beginnt */
.pending-blocked    { background: linear-gradient(to right, gold     35%, whitesmoke 50%, #ffdddd     65%) !important; }  /* pending endet → blocked beginnt */
.blocked-booked     { background: linear-gradient(to right, #ffa0a0     35%, whitesmoke 50%, lightsalmon 65%) !important; }  /* blocked endet → booked beginnt */
.blocked-pending    { background: linear-gradient(to right, #ffdddd     35%, whitesmoke 50%, gold     65%) !important; }  /* blocked endet → pending beginnt */
.blocked-blocked    { background: linear-gradient(to right, #ffdddd     35%, whitesmoke 50%, #ffdddd     65%) !important; }  /* blocked endet → blocked beginnt */

.past-booked-blocked  { background: linear-gradient(to right, #E8B8B0 35%, lightgray 50%, #ffdddd 65%) !important; border:none !important;border-radius: 0px !important;}
.past-pending-blocked { background: linear-gradient(to right, #FFF4C2 35%, lightgray 50%, #ffdddd 65%) !important; border:none !important;border-radius: 0px !important;}
.past-blocked-booked  { background: linear-gradient(to right, #ffdddd 35%, lightgray 50%, #E8B8B0 65%) !important; border:none !important;border-radius: 0px !important;}
.past-blocked-pending { background: linear-gradient(to right, #ffdddd 35%, lightgray 50%, #FFF4C2 65%) !important; border:none !important;border-radius: 0px !important;}
.past-blocked-blocked { background: linear-gradient(to right, #ffdddd 35%, lightgray 50%, #ffdddd 65%) !important; border:none !important;border-radius: 0px !important;}

/* Happy Hour-Varianten für Start/Ende – grünlicheres Gradient */
.booked-start-happy { background: linear-gradient(to top left, lightsalmon 50%, greenyellow 50%) !important; }
.booked-end-happy   { background: linear-gradient(to top right, lightsalmon 50%, greenyellow 50%) !important; }

.pending-start-happy { background: linear-gradient(to top left, gold 50%, greenyellow 50%) !important; }
.pending-end-happy   { background: linear-gradient(to top right, gold 50%, greenyellow 50%) !important; }

.blocked-start-happy { background: linear-gradient(to top left, #ffcccc 50%, greenyellow 50%) !important; }
.blocked-end-happy   { background: linear-gradient(to top right, #ffdddd 50%, greenyellow 50%) !important; }

.blocked-full {
    background: 
        repeating-linear-gradient(
            135deg,
            #ffdddd 0px,
            #ffdddd 15px,
            #ffffff 15px,
            #ffffff 30px,
            #ffcccc 30px,
            #ffcccc 45px,
            #ffffff 45px,
            #ffffff 60px
        ),
        linear-gradient(135deg, #ffb3b3 25%, #ffcccc 75%) !important;
    
  
}

.past-blocked-full {
    background: 
        repeating-linear-gradient(
            135deg,
            #ffdddd 0px,
            #ffdddd 15px,
            lightgrey 15px,
            lightgrey 30px,
            #ffcccc 30px,
            #ffcccc 45px,
            lightgrey 45px,
            lightgrey 60px
        ),
        linear-gradient(135deg, #ffb3b3 25%, #ffcccc 75%) !important;
        border:none !important;
        border-radius: 0px !important;
}
.blocked-start { background: linear-gradient(to top left, #ffcccc 50%, lightgreen 50%) !important; }
.blocked-end { background: linear-gradient(to top right, #ffdddd 50%, lightgreen 50%) !important; }
.past-blocked-start { background: linear-gradient(to top left, #ffdddd 50%, lightgrey 50%) !important; border:none !important;border-radius: 0px !important;}
.past-blocked-end { background: linear-gradient(to top right, #ffdddd 50%, lightgrey 50%) !important; border:none !important;border-radius: 0px !important;}


/* Overlapping bookings at boundaries - all combinations */
/* Format: current-next where both end/start at this slot */

/* Both confirmed (red-white-red) */
.booked-booked { 
    background: linear-gradient(to right, lightsalmon 35%, whitesmoke 50%, lightsalmon 65%) !important; 
}

/* First confirmed, second pending (red-white-yellow) */
.booked-pending { 
    background: linear-gradient(to right, lightsalmon 35%, whitesmoke 50%, gold 65%) !important; 
}

/* First pending, second confirmed (yellow-white-red) */
.pending-booked { 
    background: linear-gradient(to right, gold 35%, whitesmoke 50%, lightsalmon 65%) !important; 
}

/* Both pending (yellow-white-yellow) */
.pending-pending { 
    background: linear-gradient(to right, gold 35%, whitesmoke 50%, gold 65%) !important; 
}

/* ========== HAPPY HOUR – exakt wie booked/pending/blocked ========== */

/* Grundfarbe */
.happy-full   { background: greenyellow !important; }

/* Start & Ende */
.happy-start  { background: linear-gradient(to top left, greenyellow 50%, lightgreen 50%) !important; }
.happy-end    { background: linear-gradient(to top right, greenyellow 50%, lightgreen 50%) !important; }

.unavailable {
    background: repeating-linear-gradient(
        45deg,
        #f8f8f8 0px,
        #f8f8f8 10px,
        #e8e8e8 10px,
        #e8e8e8 20px
    ) !important;
    cursor: not-allowed !important;
    opacity: 0.7;
}
.past-unavailable { background: #f0f0f0 !important; border:none !important;border-radius: 0px !important;}




/* Layout styles */
.myboxtitel { 
    font-size: x-large; 
    padding: 10px; 
    background: #4eadf4;
    border: 1px solid black; 
    border-radius: 10px;
}

.mybox { 
    margin: 15px 0; 
}

.reihe { 
    display: grid; 
    grid-template-columns: repeat(12, 1fr); 
    gap: 1px; 
    max-width: 100%; 
    padding: 5px;
    box-sizing: border-box;
}

@media (max-width: 768px) { 
    .reihe { grid-template-columns: repeat(8, 1fr); }
    .zelle { font-size: 0.75em; padding: 2px; min-width: 20px; }
}

.zelle { 
    border: 1px solid #4D4D4D; 
    padding: 3px; 
    text-align: center; 
    cursor: pointer; 
    min-width: 20px; 
    box-sizing: border-box; 
    white-space: nowrap; 
    font-size: 0.85em;
    position: relative;
    overflow: hidden;
    border-radius: 10px;
}

.zelle.selected::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(255, 165, 0, 0.6); /* halbdurchsichtige Orange-Schicht */
    z-index: 20;
}

/* Form styles */

button, button[type="submit"] {
	background:lightblue;
	color:white;
	padding:5px 20px;
	border:1px solid black;
	border-radius:8px;
	margin-top: 15px;
	font-size:20px;
	cursor:pointer;
	text-transform: none;
}

/* Admin: Rote Buttons (z.B. Löschen) – erweitert WordPress .button Klasse */
.admin-color .button.red,
.button.button-small.red,
.button.red {
    color: #fff !important;
    background: #d63638 !important;      /* WP-Standard-Rot (wie "Delete") */
    border-color: #b32d2e !important;
    border-radius:8px;
    box-shadow: 0 1px 0 #b32d2e !important;
    text-shadow: 0 -1px 1px #b32d2e, 1px 0 1px #b32d2e, 0 1px 1px #b32d2e, -1px 0 1px #b32d2e !important;
}

.admin-color .button.red:hover,
.button.button-small.red:hover,
.button.red:hover {
    background: #b32d2e !important;
    border-color: #9e2829 !important;
    color: #fff !important;
    border-radius:8px;
}

.admin-color .button.red:focus,
.button.button-small.red:focus,
.button.red:focus {
    border-color: #8c2022 !important;
    box-shadow: 0 0 0 1px #8c2022 !important;
}

input[type="number"]{
	font-size:1.4em !important;
	border:1px solid black;
}

.booking-form input, .booking-form textarea { 
    width: 100%; 
    margin-bottom: 10px; 
    padding: 8px; 
    box-sizing: border-box; 
}

#booking-success { 
    display: none; 
    color: green; 
    padding: 10px; 
    background: #d4edda; 
    border: 1px solid #c3e6cb; 
    margin: 10px 0; 
}

.refresh-btn { 
    background: #0073aa; 
    color: white; 
    padding: 5px 10px; 
    border: none; 
    cursor: pointer; 
    margin: 10px 0; 
}

#sb-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    display: none;
    z-index: 999999;
}

#sb-overlay-bg {
    position: absolute;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.55);
}

#sb-overlay-box {
    position: relative;
    width: 350px;
    max-width: 90%;
    margin: 100px auto;
    background: #fff;
    padding: 20px;
    border-radius: 6px;
    z-index: 2;
    box-shadow: 0 5px 25px rgba(0,0,0,0.35);
}

.sb-resource-info {
    display: flex;
    gap: 25px;
    margin-bottom: 25px;
    align-items: flex-start;
}

.sb-resource-img img {
    max-width: 260px;
    border-radius: 6px;
    border: 1px solid #ccc;
}

.sb-resource-desc {
    font-size: 1.05rem;
    line-height: 1.5;
    max-width: 600px;
}

/* ========== FORMULAR-OVERLAY – super einfach, ohne Transition ========== */
#booking-form-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.8);
    z-index: 99999;
    justify-content: center;
    align-items: center;
    padding: 20px;
    box-sizing: border-box;
}

#booking-form-overlay.active {
    display: flex;   /* kein !important, keine opacity, kein transition */
}

#booking-form-overlay .booking-form {
    display: block;
}

#booking-form-modal {
    background: white;
    max-width: 520px;
    width: 100%;
    border-radius: 16px;
    padding: 50px 30px 30px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
    position: relative;
}

#booking-form-close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: #c00;
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
}

/* ———————————————————————— MAIN KALENDER LEGENDE – 100% sauber ———————————————————————— */
.esherpa-main-calendar-legend {
    text-align: left;
    margin: 70px auto 40px;
    font-size: 16px;
    color: #333;
    line-height: 2.4;
}

.esherpa-legend-item {
    display: inline-block;
    margin: 0 16px;
    min-width: 150px;
    vertical-align: middle;
}

.esherpa-legend-color {
    display: inline-block;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    margin-right: 12px;
    vertical-align: middle;
    border: 1px solid #4D4D4D;
}

/* ================ GUTHABEN-LEISTE – LINKS BETRAG, RECHTS BUTTON ================ */
.esherpa-balance-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, #2271b1, #135e96);
    color: white;
    padding: 20px 25px;
    border-radius: 12px;
    margin: 20px 0;
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
    font-family: 'Segoe UI', Arial, sans-serif;
}

.balance-amount {
    text-align: left;
}

.balance-amount strong {
    font-size: 16px;
    opacity: 0.95;
}

.big-balance {
    font-size: 32px;
    font-weight: bold;
    letter-spacing: -1px;
    display: block;
    margin-top: 4px;
}

.balance-actions {
    text-align: right;
}

.balance-topup-btn {
    background: #00d1b2 !important;
    border: none !important;
    padding: 14px 28px !important;
    font-size: 17px !important;
    font-weight: bold !important;
    border-radius: 8px !important;
    box-shadow: 0 4px 12px rgba(0,209,178,0.4) !important;
    transition: all 0.3s ease !important;
}

.balance-topup-btn:hover {
    background: #00e6c3 !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,209,178,0.5) !important;
}

/* Mobile – untereinander */
@media (max-width: 600px) {
    .esherpa-balance-bar {
        flex-direction: column;
        text-align: center;
        padding: 25px 20px;
    }
    .balance-actions {
        margin-top: 20px;
    }
    .big-balance {
        font-size: 28px;
    }
}

