/* Baby Walz Corporate Design Integration - CI Compliant */
@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@300;400;600;700&display=swap');

:root {
    /* Baby Walz CI - Primary Colors */
    --color-primary: #006FB9;
    --color-primary-hover: #338CC7;
    --color-primary-light: #E5F2FA;

    /* Baby Walz CI - Text & Neutral */
    --color-neutral: #3B3B3B;
    --color-neutral-80: #5A5A5A;
    --color-neutral-60: #999999;
    --color-neutral-40: #EBEBEB;
    --color-neutral-20: #F7F7F7;
    --color-white: #FFFFFF;

    /* Baby Walz CI - Functional Colors */
    --color-success: #3F8E3E;
    --color-success-light: #ECF4EC;
    --color-danger: #CB0E0E;
    --color-danger-light: #FAE7E7;
    --color-warning: #F27F14;
    --color-warning-light: #FEF3E8;
    --color-shop: #29856C;

    /* Schatten */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);

    /* Border Radius - Soft Shapes */
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;

    /* Typography */
    --font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-size-xs: 12px;
    --font-size-sm: 14px;
    --font-size-base: 16px;
    --font-size-lg: 18px;
    --font-size-xl: 20px;
    --font-size-2xl: 24px;
    --font-size-3xl: 32px;
    --letter-spacing-headline: 0.05em;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    font-weight: 400;
    background: linear-gradient(to bottom, var(--color-neutral-20) 0%, var(--color-white) 300px);
    color: var(--color-neutral);
    line-height: 1.6;
    min-height: 100vh;
}

header {
    background-color: var(--color-white);
    color: var(--color-neutral);
    padding: 24px 32px;
    border-bottom: 1px solid var(--color-neutral-40);
    box-shadow: var(--shadow-sm);
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 24px;
}

.logo {
    height: 48px;
    width: auto;
}

.header-text {
    flex: 1;
}

header h1 {
    font-weight: 700;
    font-size: var(--font-size-2xl);
    color: var(--color-neutral);
    margin: 0;
    text-transform: uppercase;
    letter-spacing: var(--letter-spacing-headline);
}

header h1 .brand {
    color: var(--color-primary);
    font-weight: 700;
}

.header-subtitle {
    font-size: var(--font-size-sm);
    color: var(--color-neutral-60);
    font-weight: 400;
    margin-top: 4px;
}

.btn-logout {
    margin-left: auto;
    padding: 8px 18px;
    background: transparent;
    color: var(--color-neutral-60);
    border: 1.5px solid var(--color-neutral-40);
    border-radius: var(--radius-md);
    font-family: var(--font-family);
    font-size: var(--font-size-sm);
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
    white-space: nowrap;
}

.btn-logout:hover {
    background: var(--color-danger-light);
    color: var(--color-danger);
    border-color: var(--color-danger);
}

.supplier-badge {
    margin-top: 16px;
    padding: 12px 20px;
    background: var(--color-primary-light);
    border-radius: var(--radius-lg);
    border-left: 4px solid var(--color-primary);
    display: flex;
    align-items: center;
    gap: 12px;
}

.supplier-badge p {
    margin: 0;
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: var(--color-neutral);
}

.supplier-badge .supplier-number {
    font-size: var(--font-size-xs);
    opacity: 0.95;
    margin-top: 2px;
}

main {
    max-width: 1400px;
    margin: 32px auto;
    padding: 0 32px;
}

.section {
    background: var(--color-white);
    border-radius: var(--radius-lg);
    padding: 32px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--color-neutral-40);
}

.section h2 {
    margin-bottom: 20px;
    color: var(--color-neutral);
    font-weight: 700;
    font-size: var(--font-size-xl);
    text-transform: uppercase;
    letter-spacing: var(--letter-spacing-headline);
}

.section h2::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 24px;
    background: var(--color-primary);
    margin-right: 12px;
    vertical-align: middle;
    border-radius: 2px;
}

.location-selector {
    display: flex;
    flex-direction: row;
    gap: 24px;
    align-items: stretch;
}

.map-container {
    width: 50%;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--color-neutral-40);
}

#location-map {
    height: 500px;
    width: 100%;
    border-radius: var(--radius-lg);
    background-color: var(--color-white);
}

.dropdown-container {
    width: 50%;
    display: flex;
    flex-direction: column;
    gap: 8px;
    justify-content: center;
}

/* Responsive - unter 768px wieder untereinander */
@media (max-width: 768px) {
    .location-selector {
        flex-direction: column;
    }

    .map-container,
    .dropdown-container {
        width: 100%;
    }
}

.dropdown-label {
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: var(--color-neutral);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.location-dropdown {
    padding: 14px 18px;
    font-size: var(--font-size-base);
    font-family: var(--font-family);
    border: 2px solid var(--color-neutral-40);
    border-radius: var(--radius-md);
    background-color: white;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
    max-width: 400px;
    font-weight: 500;
    color: var(--color-neutral);
}

.location-dropdown:hover {
    border-color: var(--color-primary);
    box-shadow: var(--shadow-sm);
}

.location-dropdown:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(0, 111, 185, 0.15);
}

/* Standort Kontaktinfo */
.location-contact-info {
    margin-top: 16px;
    padding: 14px 16px;
    background-color: var(--color-neutral-10);
    border: 1px solid var(--color-neutral-40);
    border-radius: var(--radius-md);
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 400px;
}

.location-contact-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: var(--font-size-sm);
    color: var(--color-neutral);
}

.location-contact-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    color: var(--color-primary);
}

.location-contact-email {
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 500;
}

.location-contact-email:hover {
    text-decoration: underline;
}

/* Leaflet Marker Custom Styles */
.custom-marker {
    background: transparent;
    border: none;
}

/* Leaflet Popup anpassen */
.leaflet-popup-content-wrapper {
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.leaflet-popup-content {
    margin: 12px;
    font-family: var(--font-family);
}

.resource-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.resource-item {
    padding: 15px;
    border: 2px solid #ddd;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.resource-item:hover {
    border-color: var(--color-primary);
    background-color: var(--color-primary-20);
}

.resource-item.selected {
    border-color: var(--color-primary);
    background-color: var(--color-primary);
    color: white;
}

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

.calendar-day {
    aspect-ratio: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s;
}

.calendar-day.available {
    background-color: var(--color-success-light);
    border-color: var(--color-success);
}

.calendar-day.available:hover {
    background-color: var(--color-primary-lighter);
}

.calendar-day.booked {
    background-color: var(--color-danger-light);
    border-color: var(--color-danger);
    cursor: not-allowed;
}

.calendar-day.inactive {
    background-color: #f5f5f5;
    color: #999;
    cursor: not-allowed;
}

.calendar-day.selected {
    background-color: var(--color-primary);
    border-color: var(--color-primary);
    color: white;
    font-weight: 700;
}

.calendar-day.selected:hover {
    background-color: var(--color-primary-80);
}

.book-button {
    background: var(--color-primary);
    color: white;
    border: none;
    padding: 16px 32px;
    font-size: var(--font-size-base);
    font-weight: 600;
    border-radius: var(--radius-md);
    cursor: pointer;
    margin-top: 20px;
    transition: all 0.2s ease;
    font-family: var(--font-family);
    box-shadow: 0 2px 8px rgba(0, 111, 185, 0.25);
    text-transform: uppercase;
    letter-spacing: var(--letter-spacing-headline);
}

.book-button:hover {
    background: var(--color-primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 111, 185, 0.35);
}

.book-button:active {
    transform: translateY(0);
}

.book-button:disabled {
    background: var(--color-neutral-40);
    cursor: not-allowed;
    box-shadow: none;
}

.loading {
    text-align: center;
    padding: 60px 40px;
    color: var(--color-neutral-60);
    font-size: var(--font-size-lg);
    font-weight: 500;
}

.error {
    background-color: var(--color-danger-light);
    color: var(--color-danger);
    padding: 16px 20px;
    border-radius: var(--radius-md);
    margin-bottom: 20px;
    font-weight: 500;
    border-left: 4px solid var(--color-danger);
    box-shadow: var(--shadow-sm);
}

/* Booking Matrix Styles */
.selection-info {
    background: var(--color-secondary-lighter);
    padding: 16px 20px;
    border-radius: var(--radius-md);
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 500;
    border-left: 4px solid var(--color-secondary);
    box-shadow: var(--shadow-sm);
}

.clear-button {
    background: var(--color-danger);
    color: white;
    border: none;
    padding: 10px 18px;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: var(--font-size-sm);
    font-weight: 600;
    transition: all 0.2s ease;
    font-family: var(--font-family);
}

.clear-button:hover {
    background: var(--color-danger);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
    filter: brightness(0.9);
}

/* ===================================================================
   BOOKING MATRIX - Komplett neu aufgebaut für 40px Zeilenhöhe
   =================================================================== */

.booking-matrix-container {
    overflow-x: hidden;
    overflow-y: visible;
    margin-bottom: 20px;
}

.booking-matrix {
    display: table;
    border-collapse: collapse;
    width: 100%;
    border: 1px solid var(--color-neutral-40);
}

/* Header Row */
.matrix-header {
    display: table-row;
}

.header-cell {
    display: table-cell;
    padding: 10px;
    background-color: var(--color-neutral-20);
    color: var(--color-neutral);
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    border: 1px solid var(--color-neutral-40);
    vertical-align: middle;
    text-align: center;
    position: sticky;
    top: 0;
    z-index: 10;
    white-space: nowrap;
    overflow: hidden;
}

.header-cell.resource-column {
    text-align: left;
    position: sticky;
    left: 0;
    z-index: 15;
}

.header-cell.action-column {
    position: sticky;
    right: 0;
    z-index: 15;
}

/* Data Rows - FIXE 40px Höhe */
.matrix-row {
    display: table-row;
}

.matrix-cell {
    display: table-cell;
    height: 40px;
    max-height: 40px;
    padding: 0 10px;
    border: 1px solid var(--color-neutral-40);
    vertical-align: middle;
    text-align: center;
    font-size: 13px;
    overflow: hidden;
    white-space: nowrap;
}

/* Resource Column (erste Spalte) */
.resource-column {
    width: 180px;
    max-width: 180px;
    text-align: left;
    background-color: white;
    position: sticky;
    left: 0;
    z-index: 5;
}

/* Preis-Spalte (zweite sticky Spalte) */
.price-column {
    width: 110px;
    min-width: 110px;
    max-width: 110px;
    text-align: right;
    background-color: white;
    position: sticky;
    left: 180px;
    z-index: 5;
    padding-right: 12px;
}

.header-cell.price-column {
    text-align: right;
    position: sticky;
    left: 180px;
    z-index: 15;
}

.price-na {
    color: var(--color-neutral-60);
    font-size: 12px;
}

.resource-info {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
}

.resource-icon {
    flex-shrink: 0;
    color: var(--color-primary);
    width: 20px;
    height: 20px;
}

/* Thumbnail des ersten Ressourcen-Bildes (ersetzt das Kategorie-Icon) */
.resource-thumb {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    border: 1px solid #e5e7eb;
    cursor: pointer;
    transition: transform 0.1s ease, box-shadow 0.2s ease;
}

.resource-thumb:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-sm);
}

.resource-icon svg {
    width: 20px;
    height: 20px;
}

/* Resource Thumbnail (wenn Bild vorhanden) */
.resource-thumbnail {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    cursor: pointer;
    display: block;
}

.resource-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: filter 0.2s ease;
}

.resource-thumbnail:hover img {
    filter: brightness(1.1);
}

/* Detail-Modal (Produktdetail-Ansicht: Galerie + Infos) */
.detail-modal-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.75);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 24px;
}

.detail-modal {
    position: relative;
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 0;
    width: 100%;
    max-width: 960px;
    max-height: 90vh;
    background: var(--color-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.detail-modal-close {
    position: absolute;
    top: 12px;
    right: 14px;
    z-index: 2;
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 34px;
    height: 34px;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

.detail-modal-close:hover {
    background: rgba(0, 0, 0, 0.8);
}

/* Ressourcen-Navigation (äußere Pfeile auf dem Overlay: vorherige/nächste Fläche) */
.detail-resource-nav {
    flex: 0 0 auto;
    background: rgba(255, 255, 255, 0.9);
    color: var(--color-neutral);
    border: none;
    border-radius: 50%;
    width: 52px;
    height: 52px;
    font-size: 34px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
    transition: background 0.2s ease, transform 0.1s ease;
}

.detail-resource-nav:hover {
    background: #fff;
    transform: scale(1.06);
}

.detail-resource-nav.prev { margin-right: 20px; }
.detail-resource-nav.next { margin-left: 20px; }

/* Positionszähler ("Fläche 3 / 12") */
.detail-position {
    margin: 0 0 6px;
    font-size: var(--font-size-xs);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--color-neutral);
    opacity: 0.55;
}

/* --- Galerie (linke Spalte) --- */
.detail-gallery {
    display: flex;
    flex-direction: column;
    background: #f4f5f6;
    min-width: 0;
}

.detail-gallery-main {
    position: relative;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 320px;
    padding: 16px;
}

.detail-gallery-img {
    max-width: 100%;
    max-height: 52vh;
    object-fit: contain;
    border-radius: var(--radius-sm);
}

.detail-gallery-placeholder {
    color: var(--color-neutral);
    opacity: 0.5;
    font-size: var(--font-size-sm);
}

.detail-gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.85);
    color: var(--color-neutral);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-sm);
    transition: background 0.2s ease;
}

.detail-gallery-nav:hover {
    background: #fff;
}

.detail-gallery-nav.prev { left: 12px; }
.detail-gallery-nav.next { right: 12px; }

.detail-gallery-counter {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    font-size: var(--font-size-xs);
    padding: 3px 10px;
    border-radius: 999px;
}

.detail-gallery-thumbs {
    display: flex;
    gap: 8px;
    padding: 12px 16px;
    overflow-x: auto;
    background: #fff;
    border-top: 1px solid #eee;
}

.detail-thumb {
    flex: 0 0 auto;
    width: 60px;
    height: 60px;
    padding: 0;
    border: 2px solid transparent;
    border-radius: var(--radius-sm);
    overflow: hidden;
    cursor: pointer;
    background: #f4f5f6;
    transition: border-color 0.2s ease;
}

.detail-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.detail-thumb.active {
    border-color: var(--color-primary);
}

/* --- Info (rechte Spalte) --- */
.detail-info {
    padding: 40px 28px 28px;
    overflow-y: auto;
    min-width: 0;
}

.detail-title {
    margin: 0 0 4px;
    font-size: var(--font-size-xl);
    color: var(--color-neutral);
}

.detail-subtitle {
    margin: 0 0 16px;
    color: var(--color-primary);
    font-size: var(--font-size-sm);
    font-weight: 600;
}

.detail-price {
    font-size: var(--font-size-lg);
    font-weight: 700;
    color: var(--color-neutral);
    margin-bottom: 20px;
}

.detail-price-unit {
    font-size: var(--font-size-sm);
    font-weight: 400;
    color: var(--color-neutral);
    opacity: 0.7;
}

.detail-specs {
    margin: 0 0 20px;
    padding: 0;
}

.detail-spec-row {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 8px 0;
    border-top: 1px solid #eee;
}

.detail-spec-row dt {
    color: var(--color-neutral);
    opacity: 0.7;
    font-size: var(--font-size-sm);
}

.detail-spec-row dd {
    margin: 0;
    font-weight: 600;
    font-size: var(--font-size-sm);
    text-align: left;
    white-space: pre-line;
}

.detail-description h3 {
    margin: 0 0 8px;
    font-size: var(--font-size-base);
    color: var(--color-neutral);
}

.detail-description p {
    margin: 0;
    color: var(--color-neutral);
    font-size: var(--font-size-sm);
    line-height: 1.6;
    white-space: pre-line;
}

/* Responsive: unter 720px Galerie oben, Infos unten */
@media (max-width: 720px) {
    .detail-modal-overlay {
        padding: 12px;
    }
    .detail-modal {
        grid-template-columns: 1fr;
        max-height: 92vh;
        overflow-y: auto;
    }
    .detail-gallery-main {
        min-height: 220px;
    }
    .detail-gallery-img {
        max-height: 40vh;
    }
    .detail-resource-nav {
        width: 38px;
        height: 38px;
        font-size: 24px;
    }
    .detail-resource-nav.prev { margin-right: 6px; }
    .detail-resource-nav.next { margin-left: 6px; }
}

.resource-details {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.resource-details strong {
    display: block;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
}

.resource-description-row {
    display: flex;
    align-items: center;
    gap: 3px;
    min-width: 0;
    position: relative;
}

.resource-description-text {
    display: block;
    font-size: 10px;
    color: #666;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
    min-width: 0;
}

.info-icon {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 13px;
    height: 13px;
    border-radius: 50%;
    background: #bbb;
    color: #fff;
    font-size: 9px;
    font-style: italic;
    font-weight: 700;
    cursor: pointer;
    line-height: 1;
    user-select: none;
    position: relative;
}

.info-icon:hover {
    background: #888;
}

.description-popup {
    position: absolute;
    z-index: 100;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    padding: 8px 10px;
    font-size: 11px;
    color: #333;
    line-height: 1.4;
    max-width: 220px;
    white-space: normal;
    left: 0;
    top: calc(100% + 4px);
    pointer-events: none;
}

/* Month Columns */
.month-column {
    width: 50px;
    min-width: 50px;
    max-width: 50px;
    overflow: hidden;
}

/* Erster Monat ist sticky wie ein Aktenordner-Reiter */
.month-column.first-month {
    position: sticky;
    left: 290px; /* Nach Resource-Spalte (250px) + Preis-Spalte (90px) */
    z-index: 8;
    background-color: var(--color-neutral-20);
    box-shadow: 2px 0 4px rgba(0, 0, 0, 0.1);
}

.month-year {
    font-size: 9px;
    font-weight: normal;
    opacity: 0.7;
    white-space: nowrap;
}

/* Month Cells - Klickbare Felder */
.month-cell {
    position: relative;
    cursor: pointer;
    transition: background-color 0.15s ease;
    width: 50px;
    min-width: 50px;
    max-width: 50px;
}

/* Erste Monat-Zelle ist sticky */
.month-cell.first-month {
    position: sticky;
    left: 290px;
    z-index: 8;
    box-shadow: 2px 0 4px rgba(0, 0, 0, 0.05);
}

/* Erste Monat-Zelle behält ihren Hintergrund */
.month-cell.first-month.available {
    background-color: var(--color-success-light);
}

.month-cell.first-month.own-booking {
    background-color: var(--color-primary-light);
}

.month-cell.first-month.other-booking {
    background-color: var(--color-danger-light);
}

.month-cell svg {
    width: 18px;
    height: 18px;
    pointer-events: none;
}

.month-cell.available {
    background-color: var(--color-success-light);
    color: var(--color-success);
}

.month-cell.available:hover {
    background-color: var(--color-primary-light);
}

.month-cell.booked {
    cursor: not-allowed;
}

.month-cell.own-booking {
    background-color: var(--color-primary-light);
    color: var(--color-primary);
}

.month-cell.other-booking {
    background-color: var(--color-danger-light);
    color: var(--color-danger);
}

.month-cell.selected {
    background-color: var(--color-primary) !important;
    color: white !important;
    font-weight: bold;
}

.plus-icon {
    width: 18px;
    height: 18px;
    opacity: 0.5;
    color: var(--color-success);
    pointer-events: none;
}

.month-cell.available:hover .plus-icon {
    opacity: 1;
}

/* Abweichender Monatspreis: auffälliger Zellenrahmen, Preis erscheint per Hover-Tooltip
   (Tooltip-Mechanik analog zum permission-matrix-tooltip-Muster im Admin-Backend).
   .matrix-cell setzt overflow:hidden - hier aufgehoben, sonst würde die Zelle selbst
   den frei schwebenden Tooltip abschneiden. */
.month-cell.price-override {
    overflow: visible;
    box-shadow: inset 0 0 0 2px var(--color-warning);
}

/* Schwebt oberhalb der Zelle - Matrix-Container erlaubt dafür overflow-y: visible
   (siehe .booking-matrix-container), horizontal bleibt weiterhin geclippt. */
.price-override-tooltip {
    display: none;
    position: absolute;
    z-index: 20;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    width: 170px;
    padding: 8px 10px;
    background: var(--color-neutral);
    color: var(--color-white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    font-size: 12px;
    font-weight: 600;
    line-height: 1.4;
    white-space: normal;
    text-align: center;
    pointer-events: none;
}

.month-cell.price-override:hover .price-override-tooltip {
    display: block;
}

.price-override-tooltip-default {
    display: block;
    margin-top: 3px;
    color: var(--color-neutral-40);
    font-weight: 400;
    font-size: 11px;
}

/* Action Column (letzte Spalte) */
.action-column {
    width: 160px;
    max-width: 160px;
    background-color: white;
    position: sticky;
    right: 0;
    z-index: 5;
}

.book-resource-button {
    padding: 8px 12px;
    background: var(--color-neutral-40);
    color: var(--color-neutral-60);
    border: none;
    border-radius: var(--radius-md);
    font-size: 11px;
    font-weight: 600;
    cursor: not-allowed;
    width: 100%;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.2s ease;
}

.book-resource-button.active {
    background: var(--color-primary);
    color: white;
    cursor: pointer;
}

/* Preis in der Preis-Spalte */
.resource-price {
    font-size: 12px;
    font-weight: 600;
    color: var(--color-primary);
    white-space: nowrap;
}

/* Preis im Reservieren-Button */
.book-resource-button.active {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1px;
}

.button-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.button-price {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0;
    text-transform: none;
}

.button-price-original {
    font-size: 10px;
    font-weight: 400;
    opacity: 0.7;
    text-decoration: line-through;
    margin-right: 3px;
}

.book-resource-button.active:hover {
    background: var(--color-primary-hover);
}

.book-resource-button:disabled {
    background: var(--color-neutral-40);
    color: var(--color-neutral-60);
    cursor: not-allowed;
}

.book-resource-button:hover {
    background: var(--color-primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 111, 185, 0.35);
}

.legend {
    margin: 20px 0;
}

.legend h4 {
    margin-bottom: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: var(--letter-spacing-headline);
    color: var(--color-neutral);
}

.legend-items {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.legend-box {
    width: 30px;
    height: 30px;
    border: 1px solid #ddd;
    border-radius: 3px;
}

.legend-box.available {
    background-color: var(--color-success-light);
    border-color: var(--color-success);
}

.legend-box.own-booking {
    background-color: var(--color-primary-light);
    border-color: var(--color-primary);
    position: relative;
}

.legend-box.own-booking::after {
    content: '★';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--color-primary);
    font-size: 16px;
}

.legend-box.other-booking {
    background-color: var(--color-danger-light);
    border-color: var(--color-danger);
    position: relative;
}

.legend-box.other-booking::after {
    content: '●';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--color-danger);
    font-size: 12px;
}

.legend-box.selected {
    background: var(--color-primary);
    border-color: var(--color-primary);
}

/* =================================================================
   Location Filter Section - Background Image
   ================================================================= */

.location-filter-section {
    position: relative;
    overflow: visible;
}

.location-filter-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100vw;
    height: 100%;
    background-image: url('/assets/images/backgrounds/filters_format(avif)_quality(45).avif');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: -1;
}

/* =================================================================
   Category Filter
   ================================================================= */

.category-filters {
    margin-top: 32px;
    margin-bottom: 32px;
}

.category-filters h3 {
    font-size: var(--font-size-lg);
    font-weight: 700;
    color: var(--color-neutral);
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: var(--letter-spacing-headline);
}

.category-filters-row {
    display: flex;
    gap: 32px;
    align-items: flex-start;
}

.category-filters-column {
    flex: 1;
}

.budget-column {
    flex: 0 0 auto;
    padding-left: 32px;
    border-left: 1px solid var(--color-neutral-40);
}

.budget-badge {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.budget-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.budget-label {
    font-size: var(--font-size-xs);
    color: var(--color-neutral-80);
    white-space: nowrap;
}

.budget-value {
    font-size: var(--font-size-sm);
    font-weight: 700;
    color: var(--color-neutral);
    white-space: nowrap;
}

.budget-value.budget-negative {
    color: var(--color-danger);
}

.category-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.category-filter-button {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    background-color: var(--color-white);
    border: 2px solid var(--color-neutral-40);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: var(--font-size-base);
    font-weight: 500;
    color: var(--color-neutral);
    box-shadow: var(--shadow-sm);
}

.category-filter-button:hover {
    border-color: var(--color-primary);
    background-color: var(--color-primary-light);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.category-filter-button.active {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: var(--color-white);
    box-shadow: var(--shadow-md);
}

.category-filter-button.active .category-icon {
    color: var(--color-white);
    opacity: 1;
}

.category-filter-button.reset-button {
    border-color: var(--color-neutral-40);
    color: var(--color-neutral-80);
}

.category-filter-button.reset-button:hover {
    background-color: var(--color-neutral-20);
    border-color: var(--color-neutral-60);
}

.category-filter-button.reset-button .category-icon {
    color: var(--color-neutral-80);
}

.category-icon {
    line-height: 1;
    color: var(--color-primary);
    display: flex;
    align-items: center;
    justify-content: center;
}

.category-icon svg {
    width: 24px;
    height: 24px;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.category-label {
    font-weight: 500;
}

/* SVG Icon Utility Classes */
.w-5 {
    width: 20px;
}

.h-5 {
    height: 20px;
}

.w-6 {
    width: 24px;
}

.h-6 {
    height: 24px;
}

.mx-auto {
    margin-left: auto;
    margin-right: auto;
}

/* =================================================================
   Meine Buchungen
   ================================================================= */

.my-bookings-loading,
.my-bookings-empty {
    color: var(--color-neutral-80);
    padding: 16px 0;
}

.my-bookings-error {
    color: var(--color-danger);
    padding: 16px 0;
}

.my-bookings-table-wrap {
    overflow-x: auto;
}

.my-bookings-table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--font-size-sm);
}

.my-bookings-table th,
.my-bookings-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--color-neutral-40);
    white-space: nowrap;
}

.my-bookings-table th {
    color: var(--color-neutral-80);
    font-weight: 700;
    text-transform: uppercase;
    font-size: var(--font-size-xs);
    letter-spacing: var(--letter-spacing-headline);
}

.my-bookings-table tbody tr:hover {
    background-color: var(--color-neutral-20);
}

.my-bookings-table .text-end {
    text-align: right;
}

.my-bookings-status {
    display: inline-block;
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    font-size: var(--font-size-xs);
    font-weight: 700;
}

.my-bookings-status.status-active {
    background: var(--color-success-light);
    color: var(--color-success);
}

.my-bookings-status.status-cancelled,
.my-bookings-status.status-deleted {
    background: var(--color-danger-light);
    color: var(--color-danger);
}

.my-bookings-status.status-completed {
    background: var(--color-neutral-40);
    color: var(--color-neutral-80);
}

/* Responsive */
@media (max-width: 768px) {
    .my-bookings-table th,
    .my-bookings-table td {
        padding: 10px 12px;
    }

    .category-filter {
        flex-direction: column;
    }

    .category-filter-button {
        width: 100%;
        justify-content: center;
    }

    .category-filters-row {
        flex-direction: column;
        gap: 24px;
    }

    .budget-column {
        padding-left: 0;
        border-left: none;
        border-top: 1px solid var(--color-neutral-40);
        padding-top: 24px;
    }
}

/* Notifications */
.notification {
    position: relative;
    padding: 16px 50px 16px 20px;
    margin-bottom: 20px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    justify-content: space-between;
    animation: slideDown 0.3s ease-out;
}

.notification-success {
    background-color: var(--color-success-light);
    border-left: 4px solid var(--color-success);
    color: var(--color-success);
}

.notification-error {
    background-color: var(--color-danger-light);
    border-left: 4px solid var(--color-danger);
    color: var(--color-danger);
}

.notification-content {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.notification-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.notification-message {
    font-size: var(--font-size-base);
    font-weight: 600;
    color: var(--color-neutral);
}

.notification-close {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 24px;
    color: var(--color-neutral-60);
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
}

.notification-close:hover {
    background-color: rgba(0, 0, 0, 0.05);
    color: var(--color-neutral);
}

/* Animations */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-enter-active, .fade-leave-active {
    transition: opacity 0.3s, transform 0.3s;
}

.fade-enter-from, .fade-leave-to {
    opacity: 0;
    transform: translateY(-10px);
}

/* Matrix Loading Overlay */
.booking-matrix-container {
    position: relative;
}

.booking-matrix-container.is-reloading {
    opacity: 0.6;
    pointer-events: none;
}

.matrix-loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(2px);
}

.loading-spinner {
    text-align: center;
}

.spinner {
    width: 50px;
    height: 50px;
    margin: 0 auto 20px;
    border: 4px solid var(--color-neutral-40);
    border-top: 4px solid var(--color-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-text {
    font-size: var(--font-size-lg);
    font-weight: 600;
    color: var(--color-primary);
    margin: 0;
}

/* Account-Bestätigung Modal */
.account-confirm-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(3px);
}

.account-confirm-modal {
    background: var(--color-white);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    padding: 48px 40px 40px;
    max-width: 480px;
    width: 90%;
    text-align: center;
}

.account-confirm-icon {
    font-size: 40px;
    margin-bottom: 16px;
}

.account-confirm-title {
    font-size: var(--font-size-2xl);
    font-weight: 700;
    color: var(--color-neutral);
    margin-bottom: 8px;
    letter-spacing: var(--letter-spacing-headline);
}

.account-confirm-subtitle {
    font-size: var(--font-size-sm);
    color: var(--color-neutral-60);
    margin-bottom: 20px;
}

.account-confirm-name {
    font-size: var(--font-size-xl);
    font-weight: 700;
    color: var(--color-primary);
    background: var(--color-primary-light);
    border: 2px solid var(--color-primary);
    border-radius: var(--radius-md);
    padding: 16px 24px;
    margin-bottom: 8px;
    line-height: 1.3;
}

.account-confirm-number {
    font-size: var(--font-size-sm);
    color: var(--color-neutral-60);
    margin-bottom: 24px;
}

.account-confirm-question {
    font-size: var(--font-size-base);
    font-weight: 600;
    color: var(--color-neutral);
    margin-bottom: 24px;
}

.account-confirm-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.account-btn-cancel {
    flex: 1;
    padding: 12px 20px;
    border: 2px solid var(--color-neutral-40);
    border-radius: var(--radius-md);
    background: var(--color-white);
    color: var(--color-neutral-80);
    font-size: var(--font-size-sm);
    font-weight: 600;
    cursor: pointer;
    font-family: var(--font-family);
    transition: all 0.2s;
}

.account-btn-cancel:hover {
    border-color: var(--color-danger);
    color: var(--color-danger);
    background: var(--color-danger-light);
}

.account-btn-confirm {
    flex: 1;
    padding: 12px 20px;
    border: 2px solid var(--color-primary);
    border-radius: var(--radius-md);
    background: var(--color-primary);
    color: var(--color-white);
    font-size: var(--font-size-sm);
    font-weight: 600;
    cursor: pointer;
    font-family: var(--font-family);
    transition: all 0.2s;
}

.account-btn-confirm:hover {
    background: var(--color-primary-hover);
    border-color: var(--color-primary-hover);
}

/* E-Mail Modal Input */
.email-modal-input {
    width: 100%;
    padding: 10px 14px;
    margin-top: 12px;
    border: 1px solid var(--color-neutral-40);
    border-radius: var(--radius-md);
    font-size: 15px;
    font-family: var(--font-family);
    box-sizing: border-box;
    outline: none;
    transition: border-color 0.2s;
}

.email-modal-input:focus {
    border-color: var(--color-primary);
}

.email-modal-error {
    color: var(--color-danger);
    font-size: 13px;
    margin-top: 6px;
    margin-bottom: 0;
}

/* Footer */
.site-footer {
    margin-top: 48px;
    border-top: 1px solid var(--color-neutral-40);
    background-color: var(--color-white);
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 16px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.footer-copy {
    font-size: var(--font-size-sm);
    color: var(--color-neutral-60);
}

.footer-link {
    font-size: var(--font-size-sm);
    color: var(--color-primary);
    text-decoration: none;
}

.footer-link:hover {
    text-decoration: underline;
}

.price-column-hint {
    font-size: 9px;
    font-weight: 400;
    color: var(--color-neutral-60);
    text-transform: none;
    letter-spacing: 0;
}

.price-notice {
    font-size: 11px;
    color: var(--color-neutral-60);
    margin-bottom: 12px;
}
