/* iCal Calendar Plugin – Bludit */

.ical-calendar {
    margin: 0.5em 0;
}

/* ── Year section ─────────────────────────────────────────── */

.ical-year {
    margin-bottom: 1.5em;
    padding: 0;
}

.ical-year__title {
    margin-top: 0;
}

/* ── Table ────────────────────────────────────────────────── */

.ical-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.ical-table {
    width: 100%;
    min-width: 480px;
}

/* Date and time columns: don't wrap */
.ical-table td:first-child,
.ical-table td:nth-child(2),
.ical-table td:nth-child(3) {
    white-space: nowrap;
}

/* ── Event content ────────────────────────────────────────── */

.ical-detail {
    display: block;
    margin-top: 0.25em;
    font-size: 0.9em;
    line-height: 1.4;
    opacity: 0.75;
}

.ical-recur {
    font-size: 0.85em;
    vertical-align: middle;
    opacity: 0.6;
}

/* ── Middle image ─────────────────────────────────────────── */

.ical-middle-image {
    margin: 1em 0;
}

.ical-middle-image img {
    width: 100%;
}

/* ── Status-based row formatting ─────────────────────────── */

.ical-table tr.ical-fmt-bold td,
.ical-table tr.ical-fmt-bold td * {
    font-weight: bold !important;
}

.ical-table tr.ical-fmt-italic td,
.ical-table tr.ical-fmt-italic td * {
    font-style: italic !important;
}

.ical-table tr.ical-fmt-strike td,
.ical-table tr.ical-fmt-strike td * {
    text-decoration: line-through !important;
}
.ical-table tr.ical-fmt-strike td {
    opacity: 0.7;
}

.ical-table tr.ical-fmt-muted td {
    opacity: 0.5 !important;
}

.ical-table tr.ical-fmt-grey-bg td {
    background-color: #eeeeee !important;
}

.ical-table tr.ical-fmt-grey-bg:hover td {
    background-color: #e4e4e4 !important;
}

/* ── Status messages ──────────────────────────────────────── */

.ical-error,
.ical-empty {
    font-style: italic;
    padding: 0.5em 0;
}

/* ── Responsive: stack columns on small screens ───────────── */

@media (max-width: 600px) {
    .ical-table {
        min-width: 0;
    }

    .ical-table thead {
        display: none;
    }

    .ical-table tr {
        display: block;
        margin-bottom: 0.75em;
    }

    .ical-table td {
        display: flex;
        gap: 0.5em;
        white-space: normal;
    }

    .ical-table td::before {
        content: attr(data-label);
        font-weight: 600;
        flex: 0 0 6em;
    }
}
