:root {
    --sw-closure-bar-height: 56px;
}

body.sw-closure-enabled header,
body.sw-closure-enabled .header,
body.sw-closure-enabled header.sticky,
body.sw-closure-enabled .header.sticky {
    top: var(--sw-closure-bar-height);
}

body.sw-modal-open {
    overflow: hidden;
}

.sw-closure-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10020;
    color: #ffffff;
    background: linear-gradient(90deg, #9a0f0f 0%, #c4302b 100%);
    box-shadow: 0 10px 28px rgba(35, 20, 20, 0.26);
    transform: translateY(-110%);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: transform 0.25s ease, opacity 0.25s ease, visibility 0.25s ease;
}

body.sw-bar-visible .sw-closure-bar {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.sw-closure-bar__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 0;
}

.sw-closure-bar__inner p {
    margin: 0;
    font-size: 15px;
    line-height: 1.45;
}

.sw-closure-open-btn {
    border: 0;
    border-radius: 999px;
    padding: 9px 16px;
    font-size: 14px;
    font-weight: 700;
    color: #5f0808;
    background: #fff7df;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.sw-closure-open-btn:hover,
.sw-closure-open-btn:focus-visible {
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(40, 14, 14, 0.22);
}

.sw-closure-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 10030;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 24px 16px;
    background: rgba(23, 22, 31, 0.72);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.sw-closure-modal-backdrop.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.sw-closure-modal {
    position: relative;
    width: min(1180px, 100%);
    max-height: calc(100vh - 48px);
    padding: 26px;
    border-radius: 18px;
    overflow: auto;
    background: #ffffff;
    color: #222432;
    box-shadow: 0 22px 65px rgba(0, 0, 0, 0.35);
    transform: translateY(20px);
    transition: transform 0.25s ease;
}

.sw-closure-modal-backdrop.is-open .sw-closure-modal {
    transform: translateY(0);
}

.sw-closure-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 999px;
    font-size: 26px;
    line-height: 1;
    color: #4a4f68;
    background: #edf0f6;
    cursor: pointer;
}

.sw-closure-modal h2 {
    margin: 0 46px 8px 0;
    font-size: 33px;
    line-height: 1.2;
    color: #111325;
}

.sw-closure-modal h3 {
    margin: 0 0 8px;
    font-size: 20px;
}

.sw-closure-modal p {
    margin: 0;
    line-height: 1.55;
}

.sw-closure-highlight {
    margin: 18px 0 20px;
    padding: 18px;
    border-radius: 14px;
    background: linear-gradient(130deg, #ffe8cf 0%, #fff8ec 100%);
    border: 1px solid #f2cca0;
}

.sw-closure-highlight p + p {
    margin-top: 8px;
}

.sw-closure-highlight a {
    font-weight: 700;
    color: #8f3309;
}

.sw-closure-filters {
    display: grid;
    grid-template-columns: 130px minmax(120px, 230px) 90px minmax(180px, 1fr) auto auto;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    padding: 14px;
    border-radius: 12px;
    background: #f4f7fb;
    border: 1px solid #dae4f0;
}

.sw-closure-filters label {
    font-size: 13px;
    font-weight: 700;
    color: #374a63;
}

.sw-closure-filters select,
.sw-closure-filters input {
    height: 40px;
    border: 1px solid #c5d4e3;
    border-radius: 10px;
    padding: 0 12px;
    font-size: 14px;
    background: #ffffff;
    color: #1e2633;
}

.sw-closure-filters button {
    height: 40px;
    border: 0;
    border-radius: 10px;
    padding: 0 14px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    color: #ffffff;
    background: #335f91;
}

.sw-result-count {
    margin: 0;
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
    color: #1f3a57;
}

.sw-closure-table-wrap {
    border: 1px solid #d9e1ea;
    border-radius: 12px;
    overflow: auto;
    max-height: calc(100vh - 360px);
}

.sw-closure-table {
    width: 100%;
    min-width: 1060px;
    border-collapse: collapse;
    font-size: 13px;
}

.sw-closure-table th,
.sw-closure-table td {
    padding: 11px 10px;
    vertical-align: top;
    text-align: left;
    border-bottom: 1px solid #e8edf3;
}

.sw-closure-table th {
    position: sticky;
    top: 0;
    z-index: 1;
    font-size: 12px;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    background: #eef3f8;
    color: #27374d;
}

.sw-closure-table tr:nth-child(even) {
    background: #fbfcfe;
}

.sw-link {
    color: #245f9f;
    font-weight: 700;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
}

.sw-muted {
    color: #7b8492;
}

.sw-closure-empty {
    margin-top: 14px;
    color: #9f1f14;
    font-weight: 700;
}

.sw-closure-disclaimer {
    margin-top: 20px;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid #efbeb8;
    background: #fff3f2;
    color: #822520;
    font-size: 13px;
    line-height: 1.5;
}

.sw-closure-footnote {
    margin-top: 10px;
    font-size: 13px;
    color: #4a5668;
}

@media (max-width: 1060px) {
    .sw-closure-filters {
        grid-template-columns: 1fr 1fr;
    }

    .sw-result-count {
        grid-column: 1 / -1;
    }
}

@media (max-width: 768px) {
    :root {
        --sw-closure-bar-height: 92px;
    }

    .sw-closure-bar__inner {
        flex-direction: column;
        align-items: flex-start;
        padding: 10px 0;
    }

    .sw-closure-open-btn {
        width: 100%;
        text-align: center;
    }

    .sw-closure-modal-backdrop {
        padding: 10px;
    }

    .sw-closure-modal {
        max-height: calc(100vh - 20px);
        padding: 18px;
        border-radius: 14px;
    }

    .sw-closure-modal h2 {
        font-size: 25px;
    }

    .sw-closure-table-wrap {
        max-height: calc(100vh - 320px);
    }
}
