.public-calendar-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    display: flex;
    flex-direction: column;
}

.month-calendar-container {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 20px;
    display: flex;
    flex-direction: column;
}

.month-calendar-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    position: relative;
    padding: 0 60px;
    min-height: 60px;
}

.month-year-title {
    margin: 0;
    font-size: 1.5em;
    color: #333;
    text-align: center;
    width: 100%;
    position: relative;
    z-index: 1;
    pointer-events: none;
}

.month-nav-buttons {
    display: flex;
    justify-content: space-between;
    width: 100%;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    left: 0;
    right: 0;
    z-index: 2;
}

.month-nav-btn {
    padding: 8px 16px;
    background: #4CAF50;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    color: white;
    white-space: nowrap;
    display: inline-block;
    text-align: center;
    min-width: 80px;
}

.month-nav-btn:hover {
    background: #45a049;
}

.month-calendar-grid {
    display: flex;
    flex-direction: column;
    border: 1px solid #ddd;
    background-color: #ddd;
    width: 100%;
}

.month-calendar-weekdays {
    display: flex;
    background-color: #f8f9fa;
    border-bottom: 1px solid #ddd;
    width: 100%;
}

.month-calendar-weekdays > div {
    flex: 1;
    min-width: 0;
    padding: 10px;
    text-align: center;
    font-weight: bold;
    background-color: #f8f9fa;
}

.month-calendar-days {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    grid-auto-rows: 112px;
    background-color: white;
    width: 100%;
}

.month-calendar-day {
    background-color: white;
    padding: 5px;
    position: relative;
    border: 1px solid #ddd;
    margin: 0;
    min-width: 0;
    height: 100px;
    cursor: pointer;
}

.month-calendar-day.empty {
    background-color: #f8f9fa;
    cursor: default;
}

.month-calendar-day.today {
    background: #f0f7ff;
}

.month-day-number {
    font-weight: bold;
    margin-bottom: 5px;
}

.month-day-events {
    height: 70px;
    overflow: hidden;
}

.event-item {
    padding: 2px 4px;
    border-radius: 3px;
    color: white;
    font-size: 0.8em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    margin-bottom: 2px;
    pointer-events: none;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .public-calendar-container {
        height: calc(100vh - 20px);
    }

    .month-calendar-container {
        padding: 10px;
        padding-bottom: 20px;
    }

    .month-calendar-days {
        grid-auto-rows: 120px;
    }

    .month-calendar-day {
        height: 120px;
    }

    .month-day-events {
        height: 80px;
    }

    .event-item {
        font-size: 0.7em;
        padding: 1px 3px;
    }

    .month-calendar-weekdays > div {
        padding: 5px;
        font-size: 0.9em;
    }

    .month-calendar-header {
        padding: 0 50px;
        min-height: 50px;
    }

    .month-year-title {
        font-size: 1.2em;
    }

    .month-nav-btn {
        padding: 6px 12px;
        font-size: 0.9em;
        min-width: 70px;
    }
}

.daily-view-container {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 0px;
}

.calendar-header {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-bottom: 0;
    position: sticky;
    top: 0;
    z-index: 5;
    background: #f5f5f5;
    padding: 0px;
    border-radius: 4px 4px 0 0;
}

.calendar-header h2 {
    margin: 0;
    font-size: 1.3em;
    color: #333;
    text-align: center;
}

.calendar-header .nav-buttons-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-btn {
    padding: 8px 16px;
    background: #4CAF50;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    transition: background 0.3s;
}

.nav-btn:hover {
    background: #45a049;
}

.day-nav-buttons {
    display: flex;
    gap: 10px;
}

.daily-events {
    max-height: 800px;
    overflow-y: auto;
    border: 1px solid #ddd;
    margin-top: 0px;
}

.daily-view-header {
    display: flex;
    position: sticky;
    top: 0;
    background: white;
    z-index: 2;
    border-bottom: 2px solid #ddd;
}

.daily-view-row {
    display: flex;
    min-height: 30px;
    border-bottom: 1px solid #eee;
}

.time-column {
    min-width: 40px;
    padding: 5px;
    text-align: right;
    font-size: 0.8em;
    color: #666;
    background: #f8f8f8;
    position: sticky;
    left: 0;
    z-index: 1;
}

.room-column {
    flex: 1;
    min-width: 0;
    padding: 5px;
    text-align: center;
    font-weight: bold;
    border-left: 1px solid #ddd;
    flex-shrink: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
    line-height: 1.2;
    height: 1.2em;
    font-size: 0.9em;
}

.room-cell {
    flex: 1;
    min-width: 0;
    position: relative;
    border-left: 1px solid #ddd;
    min-height: 30px;
    flex-shrink: 1;
}

.daily-event-item {
    position: absolute;
    left: 2px;
    right: 2px;
    padding: 4px;
    padding-top: 0px;
    border-radius: 4px;
    color: white;
    font-size: 0.9em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    cursor: pointer;
    z-index: 1;
    margin: 3px auto;
}

.daily-event-item:hover {
    filter: brightness(1.1);
}

/* Modal styles */
#event-modal {
    display: none !important;
    position: fixed !important;
    z-index: 999999 !important;
    left: 0 !important;
    top: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background-color: rgba(0,0,0,0.4) !important;
    margin: 0 !important;
    padding: 0 !important;
    pointer-events: auto !important;
    max-width: none !important;
    --wp--style--global--content-size: none !important;
}

#event-modal.show {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
}

#event-modal .modal-content {
    background-color: #fefefe !important;
    padding: 20px !important;
    border: 1px solid #888 !important;
    width: 90% !important;
    max-width: 500px !important;
    border-radius: 8px !important;
    position: relative !important;
    margin: 0 !important;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1) !important;
    left: auto !important;
    right: auto !important;
    top: auto !important;
    bottom: auto !important;
    transform: none !important;
    pointer-events: auto !important;
    --wp--style--global--content-size: none !important;
}

#event-modal .close {
    position: absolute !important;
    right: 10px !important;
    top: 10px !important;
    color: #aaa !important;
    font-size: 28px !important;
    font-weight: bold !important;
    cursor: pointer !important;
    z-index: 1000000 !important;
}

#event-modal .close:hover {
    color: black !important;
}

.event-detail-title {
    font-size: 1.5em;
    font-weight: bold;
    margin-bottom: 15px;
}

.event-detail-time,
.event-detail-room,
.event-detail-date {
    margin: 1px 0;
    color: #666;
}

.event-detail-description {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.room-header-container {
    display: flex;
    flex-direction: row;
    gap: 0px;
    margin-bottom: 0px;
    position: sticky;
    top: 90px;
    z-index: 4;
    background: white;
    width: 100%;
    overflow-x: hidden;
    border-top: 1px solid #ddd;
}

.room-header-fixed-item {
    width: 40px;
    min-width: 40px;
    max-width: 40px;
    background: #f5f5f5;
    padding: 5px;
    text-align: center;
    font-weight: bold;
    border-bottom: 1px solid #ddd;
    flex-shrink: 0;
}

.room-header-flex-item {
    flex: 1;
    min-width: 0;
    max-width: 100%;
    background: #f5f5f5;
    padding: 5px;
    text-align: center;
    font-weight: bold;
    border: 1px solid #ddd;
    border-top-left-radius: 4px;
    border-top-right-radius: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex-shrink: 1;
    display: block;
    line-height: 1.2;
    height: 1.2em;
    font-size: 0.9em;
}

.event-detail-link {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.event-detail-link a {
    color: #2196F3;
    text-decoration: none;
    word-break: break-all;
}

.event-detail-link a:hover {
    text-decoration: underline;
}

@media (max-width: 768px) {
    .calendar-header {
        padding: 0px;
        gap: 2px;
    }

    .calendar-header h2 {
        font-size: 1.1em;
    }

    .nav-btn {
        padding: 6px 12px;
        font-size: 0.9em;
    }

    .room-header-container {
        top: 75px;
    }

    .room-header-flex-item,
    .room-column {
        padding: 3px;
        font-size: 0.8em;
    }

    .room-header-fixed-item {
        width: 35px;
        min-width: 35px;
        max-width: 35px;
        padding: 3px;
    }
} 