/* ================================
   Planzer Materialvermietung Calendar
   ================================ */

.timeline {
    padding: 0 !important;
    position: relative;
}

.timeline-inner {
    position: relative;
    height: 47px;
}

.timeline-inner > .empty-bar:first-child {
    border-left: 0;
}

.planzer-calendar {
    position: relative;
}

.empty-bar {
    position: absolute;
    top: 0;
    width: 75px;
    height: 100%;
    border-left: 1px solid #ccc;
    z-index: 1;
    transition: all 0.3s ease;
    cursor: copy;
}

.empty-bar:hover {
    background-color: #cdcaca !important;
    border-color: #ccc;
}

.booking-bar {
    position: absolute;
    top: 0;
    height: 47px;
    background: #A71923;
    padding: 7px 10px;
    overflow: hidden;
    white-space: nowrap;
    border: 2px solid white;
    border-left: 1px solid #ccc;
}

.calendar-matrix-wrapper {
    overflow-x: auto;
    /* Required for sticky thead to work inside a scrollable container */
    overflow-y: auto;
    max-height: 80vh;
}

.calendar-matrix {
    border-collapse: collapse;
    width: 100%;
    min-width: 1000px;
}

.calendar-matrix th,
.calendar-matrix td {
    border: 1px solid #ddd;
    padding: 4px;
    text-align: left;
    vertical-align: top;
}

/* Sticky thead */
.calendar-matrix thead th {
    position: sticky;
    top: 0;
    background: #f4f4f4;
    z-index: 3;
    border: none;
}

/* Top-left corner cell: sticky both horizontally and vertically */
.calendar-matrix thead th.asset-col {
    left: -2px;
    z-index: 4;
}

.asset-col {
    position: sticky;
    left: -2px;
    background: #f4f4f4;
    z-index: 2;
    min-width: 240px;
    text-align: left !important;
    white-space: nowrap;
    max-width: 240px;
    overflow: hidden;
}

.date-col {
    min-width: 75px;
    font-weight: 600;
    text-align: center !important;
}

.date-col-weekend {
    background-color: #dbdbdb;
}

.empty-bar-weekend {
    background-color: #dbdbdb;
}

.asset-category-row {
    background: #cccccc;
}

.filters {
    display: flex;
    gap: 24px;
    margin-bottom: 24px;
}

/* ================================
   Asset Label Truncation & Popup
   ================================ */
   
.asset-label-trigger {
    transition: all 0.3s ease;
    cursor: pointer;
}

.asset-label-trigger {
    cursor: pointer;
    display: block;
    max-width: 220px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.asset-label-trigger:hover {
    color: #A71923;
}

/* Overlay */
.asset-popup-overlay {
    display: none;
    position: absolute;
    top: 50%;
    left: 50%;
    inset: 0;
    background: transparent;
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

.asset-popup-overlay.is-visible {
    display: flex;
}

/* Popup box */
.asset-popup {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.18);
    padding: 28px 24px;
    min-width: 280px;
    max-width: 480px;
    width: 90%;
    position: relative;
}

.asset-popup-close {
    position: absolute;
    top: 12px;
    right: 16px;
    background: none;
    border: none;
    font-size: 22px;
    cursor: pointer;
    color: #666;
    line-height: 1;
    padding: 0;
    display: none;
}

.asset-popup-close:hover {
    color: #A71923;
}

.asset-popup-name {
    font-size: 16px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0;
    word-break: break-word;
}