/* CalDav Calendar Viewer – Front-end Styles */

.caldcavi-calendar,
.caldcavi-calendar *,
.caldcavi-calendar *::before,
.caldcavi-calendar *::after {
    box-sizing: border-box;
}

.caldcavi-calendar {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    max-width: 720px;
    margin: 0 auto 2rem;
    clear: both;
    float: none;
    overflow: hidden;
    position: relative;
    width: 100%;
}

/* Day group */
.caldcavi-day-group {
    margin-bottom: 1.5rem;
    clear: both;
    overflow: hidden;
}

.caldcavi-day-heading {
    font-size: 1rem;
    font-weight: 600;
    color: #1d2327;
    margin: 0 0 0.5rem;
    padding: 0 0 4px;
    border-bottom: 2px solid #dcdcde;
    float: none;
    width: auto;
}

.caldcavi-today .caldcavi-day-heading {
    color: #2271b1;
    border-bottom-color: #2271b1;
}

/* Event list */
.caldcavi-event-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.caldcavi-event {
    background: #f0f6fc;
    border-left: 3px solid #2271b1;
    border-right: none;
    border-top: none;
    border-bottom: none;
    border-radius: 0 4px 4px 0;
    padding: 8px 12px;
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.4;
    color: #1d2327;
    float: none;
    width: auto;
    display: block;
}

.caldcavi-event a {
    color: #1d2327;
    text-decoration: none;
    display: block;
}

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

.caldcavi-event-time {
    font-weight: 600;
    color: #2271b1;
}

.caldcavi-event-title {
    font-weight: 500;
}

.caldcavi-event-location {
    opacity: 0.7;
    font-style: italic;
}

/* Error & empty states */
.caldcavi-error,
.caldcavi-no-events {
    padding: 1rem;
    border-left: 4px solid #d63638;
    background: #fcf0f1;
    color: #50575e;
    margin: 1rem 0;
    clear: both;
    overflow: hidden;
}

.caldcavi-no-events {
    border-left-color: #dba617;
    background: #fcf9e8;
}

/* Responsive */
@media (max-width: 600px) {
    .caldcavi-event {
        font-size: 0.8rem;
        padding: 6px 10px;
    }
}
