/* Kalender */
.calendar-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 1rem;
    font-size: 0.85rem;
    color: #555;
    align-items: center;
}

.legend-item {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.legend-dot {
    display: inline-block;
    width: 0.8rem;
    height: 0.8rem;
    border-radius: 50%;
    border: 1px solid rgba(0, 0, 0, 0.15);
}

.legend-dot--gelb { background-color: #ffc107; }
.legend-dot--gruen { background-color: #28a745; }
.legend-dot--frei { background-color: #f1f1f1; }

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
}

/* Interaktive Kacheln (Klick/Ziehen) - unabhaengig von der Kachelgroesse */
.calendar-day--interactive,
.calendar-day--interactive * {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
}

.calendar-day--interactive {
    cursor: pointer;
    touch-action: none;
}

.calendar-day.is-selected {
    background-color: #cfe2ff;
    border-color: #9ec5fe;
}

.calendar-day.is-selected-start,
.calendar-day.is-selected-end {
    background-color: #0d6efd;
    border-color: #0d6efd;
}

.calendar-day.is-selected-start .calendar-day__num,
.calendar-day.is-selected-end .calendar-day__num {
    color: #fff;
}

/* Kleinere Kachelgroesse fuer die Kalender-Seitenleiste im Buchungsformular */
.calendar-grid--compact .calendar-day {
    min-height: 54px;
    padding: 4px;
}

.calendar-grid--compact .calendar-day__num {
    font-size: 0.75rem;
}

.calendar-grid--compact .cal-badge {
    font-size: 0.8rem;
    padding: 1px 3px;
}

.calendar-grid__weekday {
    text-align: center;
    font-weight: 600;
    font-size: 0.8rem;
    color: #777;
    padding-bottom: 4px;
}

.calendar-day {
    display: block;
    min-height: 78px;
    background: #fff;
    border: 1px solid #e6e6e6;
    border-radius: 6px;
    padding: 6px;
    text-decoration: none;
    color: inherit;
    transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.calendar-day:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
    color: inherit;
}

.calendar-day--empty {
    background: transparent;
    border: none;
}

.calendar-day__num {
    font-size: 0.85rem;
    font-weight: 600;
    color: #444;
    margin-bottom: 4px;
}

.calendar-day__badges {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.cal-badge {
    display: inline-flex;
    align-items: center;
    font-size: 0.95rem;
    line-height: 1;
    padding: 2px 5px;
    border-radius: 5px;
    border: 1px solid transparent;
}

.cal-badge sup {
    font-size: 0.55rem;
    font-weight: 700;
    margin-left: 1px;
}

.cal-badge--frei {
    opacity: 0.3;
    filter: grayscale(1);
}

.cal-badge--gelb {
    background-color: #fff3cd;
    border-color: #ffe08a;
}

.cal-badge--gruen {
    background-color: #d4edda;
    border-color: #9bd8ac;
}

/* Admin-Kalender: Tageskacheln mit Buchungen (Name), Klick oeffnet Detail-Popup */
.calendar-day--admin {
    min-height: 78px;
    cursor: default;
}

.calendar-day--admin:hover {
    box-shadow: none;
    transform: none;
}

.calendar-day__events {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.res-chip {
    display: flex;
    align-items: center;
    gap: 3px;
    width: 100%;
    border: 1px solid transparent;
    border-radius: 4px;
    padding: 2px 4px;
    font-size: 0.72rem;
    line-height: 1.2;
    text-align: left;
    cursor: pointer;
}

.res-chip__name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.res-chip sup {
    margin-left: auto;
    font-size: 0.6rem;
    font-weight: 700;
}

.res-chip--gelb {
    background-color: #fff3cd;
    border-color: #ffe08a;
}

.res-chip--gelb:hover {
    background-color: #ffe8a1;
}

.res-chip--gruen {
    background-color: #d4edda;
    border-color: #9bd8ac;
}

.res-chip--gruen:hover {
    background-color: #bfe6cb;
}

@media (max-width: 576px) {
    .calendar-day {
        min-height: 58px;
        padding: 4px;
    }
    .calendar-day__num {
        font-size: 0.75rem;
    }
    .cal-badge {
        font-size: 0.8rem;
        padding: 1px 3px;
    }
    .sponsor-banner__label {
        display: none;
    }
    .sponsor-banner__name {
        font-size: 0.82rem;
    }
    .sponsor-banner__address {
        font-size: 0.72rem;
    }
}

/* Sponsoren-Banner */
.sponsor-banner {
    margin: 1.5rem 0;
    padding: 0.75rem 1rem;
    background: #f8f9fa;
    border: 1px solid #eee;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.sponsor-banner__label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #999;
    white-space: nowrap;
}

.sponsor-banner__viewport {
    position: relative;
    height: 56px;
    flex: 1;
    min-width: 0;
}

.sponsor-banner__slide {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.8s ease;
}

.sponsor-banner__slide.is-active {
    opacity: 1;
}

.sponsor-banner__logo-btn {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    max-width: 100%;
    text-align: left;
}

.sponsor-banner__logo-btn img {
    max-height: 44px;
    max-width: 90px;
    object-fit: contain;
    flex-shrink: 0;
}

.sponsor-banner__info {
    display: flex;
    flex-direction: column;
    min-width: 0;
    line-height: 1.25;
}

.sponsor-banner__name {
    font-weight: 700;
    color: #333;
    font-size: 0.9rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sponsor-banner__address {
    font-size: 0.78rem;
    color: #777;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Popup soll sich an Bild bzw. Textinhalt orientieren statt an der festen
   Bootstrap-Standardbreite (500px) - dadurch kein leerer Rand um kleine Logos
   und keine Ueberlagerung bei grossen Logos. */
.sponsor-modal-dialog {
    max-width: min(92vw, 480px);
    width: -webkit-fit-content;
    width: fit-content;
}

.sponsor-modal-dialog .modal-content {
    width: auto;
    min-width: 280px;
    max-width: 100%;
    margin: 0 auto;
}

.sponsor-modal__logo {
    display: block;
    margin: 0 auto;
    max-height: min(35vh, 180px);
    max-width: 100%;
    object-fit: contain;
}
