@use 'variables' as *;

// ─── Methodology link ─────────────────────────────────────────────────────────
.methodology-link {
    text-align: center;
    margin-top: 16px;

    a {
        display: inline-flex;
        align-items: center;
        gap: 4px;
        color: $red-light;
        font-size: 0.85rem;
        font-family: inherit;
        text-decoration: underline;
        text-underline-offset: 3px;

        svg { flex-shrink: 0; }

        &:hover { color: $red-primary; }
    }
}

// ─── Modal overlay ────────────────────────────────────────────────────────────
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: $z-modal;
    justify-content: center;
    align-items: center;
    padding: 20px;

    &.open { display: flex; }
}

.modal-content {
    background: $white;
    border-radius: 16px;
    max-width: 700px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    padding: 32px;
    position: relative;

    h3 {
        font-size: 1.3rem;
        margin-bottom: 16px;
        color: $navy;
    }

    h4 {
        font-size: 1rem;
        margin: 18px 0 8px;
        color: $red-primary;
    }

    p,
    li {
        font-size: 0.88rem;
        color: $gray-700;
        line-height: 1.7;
    }

    ul {
        padding-left: 20px;
        margin-bottom: 8px;
    }

    table {
        width: 100%;
        border-collapse: collapse;
        margin: 8px 0 16px;
        font-size: 0.82rem;
    }

    th,
    td {
        text-align: left;
        padding: 6px 10px;
        border-bottom: 1px solid $gray-200;
    }

    th {
        font-weight: 700;
        color: $gray-500;
        font-size: 0.75rem;
        text-transform: uppercase;
        letter-spacing: 0.05em;
    }
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: $gray-100;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: $gray-500;
}
