/* ========== BASE / COMMON ========== */

.fk-wrapper { font-family:inherit; width:100%; }

.fk-debug-box {
    margin:0 0 1rem;
    padding:.85rem 1rem;
    background:#f4f7fb;
    border:1px solid #c5d4ea;
    color:#1a2a44;
    font-size:.85rem;
    line-height:1.45;
}

.fk-debug-box__hint {
    margin:.35rem 0 .5rem;
    font-size:.8rem;
    opacity:.85;
}

.fk-debug-box__list {
    margin:0;
    padding-left:1.15rem;
}

.fk-debug-box__item.is-hit {
    color:#0d6b2f;
}

.fk-debug-box__item.is-miss {
    color:#9a3b00;
}

.fk-nav {
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:1rem;
    margin-bottom:1rem;
    flex-wrap:wrap;
}

.fk-title { margin:0; font-size:1.4rem; text-align:center; flex:1; }

.fk-nav-form { margin:0; }

.fk-nav-btn {
    display:inline-block;
    padding:.45em .9em;
    background:var(--brand-1);
    color:#fff;
    border:1px solid var(--brand-1);
    border-radius:3px;
    text-decoration:none;
    white-space:nowrap;
    font-size:.9rem;
    font:inherit;
    line-height:1.2;
    cursor:pointer;
    appearance:none;
    -webkit-appearance:none;
    transition:opacity .2s;
}

.fk-nav-btn:hover { opacity:.7; }

/* ========== SUNDAY MODULE ========== */

.fk-sunday-wrapper { width:100%; display:grid; gap:1rem; color:var(--contrast-2); }

.fk-sunday-item { background:transparent; }

.fk-sunday-title { text-transform:capitalize; margin-bottom:0; }

.fk-sunday-content {
    color:var(--contrast-2);
    line-height:1.8;
    overflow-wrap:anywhere;
    list-style:none;
    margin:0;
    padding:0;
}

.fk-sunday-modal-overlay {
    display:none;
    position:fixed;
    inset:0;
    z-index:9999;
    background:rgba(0,0,0,.55);
    padding:1rem;
    align-items:center;
    justify-content:center;
}

.fk-sunday-modal-overlay.fk-sunday-modal-open { display:flex; }

.fk-sunday-modal-box {
    position:relative;
    width:min(96vw, 1200px);
    max-height:92vh;
    overflow:auto;
    background:#fff;
    color:#000;
    font:inherit;
    border-radius:8px;
    padding:1rem;
    box-shadow:0 10px 40px rgba(0,0,0,.25);
}

.fk-sunday-modal-content { color:#000; }

.fk-sunday-modal-content .fk-week-modal-title {
    margin:0 0 .8rem;
}

.fk-sunday-modal-close {
    position:absolute;
    top:.65rem;
    right:.85rem;
    appearance:none;
    -webkit-appearance:none;
    background:none;
    border:none;
    padding:0;
    font-size:2rem;
    font-weight:400;
    line-height:1;
    cursor:pointer;
    color:#666;
}

.fk-sunday-modal-close:hover,
.fk-sunday-modal-close:focus,
.fk-sunday-modal-close:focus-visible,
.fk-sunday-modal-close:active {
    color:#000;
    background:transparent !important;
    border:none !important;
    box-shadow:none !important;
    outline:none !important;
}

.fk-sunday-modal-content .fk-week-modal-grid { display:grid; gap:.6rem; grid-template-columns:1fr; }

.fk-sunday-modal-content .fk-week-modal-day { border:1px solid #ddd; border-radius:6px; padding:.6rem; }

.fk-sunday-modal-content .fk-week-modal-day-title {
    margin:0;
    font-weight:700;
}

.fk-sunday-modal-content .fk-week-modal-day-liturgy {
    margin:.25rem 0 .5rem;
}

.fk-sunday-modal-content .fk-week-modal-events { margin:0; padding:0; list-style:none; }

.fk-sunday-modal-content .fk-week-modal-empty { margin:0; color:#555; }

.fk-sunday-modal-content .fk-week-modal-event { margin:0; }

/* ========== MONTH MODULE ========== */

.fk-table-wrap { overflow-x:auto; }

.fk-table { width:100%; border-collapse:collapse; table-layout:fixed; }

.fk-head {
    padding:.5em .3em;
    text-align:center;
    font-size:.85rem;
    font-weight:600;
    border-bottom:2px solid #ccc;
}

.fk-cell {
    vertical-align:top;
    padding:.45em;
    border:1px solid #e0e0e0;
    min-height:130px;
    background:#fff;
}

.fk-empty { background:#f9f9f9; }

.fk-today { background:#fffbe6; }

.fk-day-num {
    display:block;
    font-size:1rem;
    font-weight:700;
    line-height:1;
    margin-bottom:.3rem;
}

.fk-today .fk-day-num { color:#b00; }

.fk-lit-title {
    margin:0 0 .45rem;
    font-size:.74rem;
    font-weight:700;
    line-height:1.35;
    text-transform:uppercase;
    color:#1f1f1f;
}

.fk-events { list-style:none; margin:0; padding:0; }

.fk-event-item {
    margin:0 0 .2rem;
    font-size:.78rem;
    line-height:1.35;
    color:#1f1f1f;
}

.fk-event-time { font-weight:700; }

.fk-event-text { font-weight:400; }

.fk-day-empty {
    margin:.2rem 0 0;
    font-size:.74rem;
    color:#666;
}

/* ========== RESPONSIVE ========== */

@media (max-width:860px) {
    .fk-cell { min-height:110px; }
    .fk-lit-title { font-size:.7rem; }
    .fk-event-item { font-size:.72rem; }
}

@media (max-width:760px) {
    .fk-table,
    .fk-table tbody,
    .fk-table tr {
        display:block;
        width:100%;
        border:none;
    }

    .fk-table td {
        display:block;
        width:100%;
    }

    .fk-table thead { display:none; }
    .fk-table tbody { display:grid; gap:.55rem; }
    .fk-table tr { display:contents; }

    .fk-cell {
        min-height:0;
        height:auto;
        padding:.65rem .7rem;
        border:1px solid #e0e0e0;
        border-radius:8px;
        background:#fff;
    }

    .fk-empty { display:none !important; }

    .fk-day-num {
        font-size:1rem;
        margin-bottom:.35rem;
    }

    .fk-lit-title {
        font-size:.74rem;
        margin-bottom:.35rem;
    }

    .fk-event-item {
        font-size:.78rem;
        margin-bottom:.22rem;
    }

    .fk-day-empty { font-size:.72rem; }
}
