.sponsor-popup-host[hidden] {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

.sponsor-popup-host--closing {
    pointer-events: none !important;
}

.sponsor-popup-host {
    position: fixed;
    inset: 0;
    z-index: 10060;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
    contain: layout style paint;
}

.sponsor-popup-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 32, 0.62);
}

.sponsor-popup-dialog {
    position: relative;
    width: min(44rem, 100%);
    max-height: min(90vh, 720px);
    overflow: auto;
    background: linear-gradient(165deg, #ffffff 0%, #f5f9ff 100%);
    border: 1px solid rgba(0, 71, 171, 0.14);
    border-radius: 20px;
    box-shadow:
        0 24px 64px rgba(0, 71, 171, 0.22),
        0 0 0 1px rgba(255, 255, 255, 0.8) inset;
    animation: sponsor-popup-enter 0.35s ease;
}

.sponsor-popup-dialog::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    border-radius: 20px 20px 0 0;
    background: linear-gradient(90deg, #0047ab, #2a6fd4, #1eb53a);
}

@keyframes sponsor-popup-enter {
    from {
        opacity: 0;
        transform: translateY(1.25rem) scale(0.97);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.sponsor-popup-close {
    position: absolute;
    top: 0.85rem;
    right: 0.85rem;
    width: 2.25rem;
    height: 2.25rem;
    border: none;
    border-radius: 999px;
    background: rgba(0, 71, 171, 0.08);
    color: #1a2b3c;
    font-size: 1.35rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, color 0.2s ease;
    z-index: 1;
}

.sponsor-popup-close:hover {
    background: rgba(0, 71, 171, 0.16);
    color: #0047ab;
}

.sponsor-popup-body {
    padding: 2rem 2rem 1.75rem;
    text-align: center;
}

.sponsor-popup-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #0047ab;
    background: #e8f1ff;
    padding: 0.35rem 0.85rem;
    border-radius: 999px;
    margin-bottom: 0.85rem;
}

.sponsor-popup-title {
    margin: 0;
    font-size: clamp(1.45rem, 3vw, 1.9rem);
    font-weight: 800;
    color: #1a2b3c;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.sponsor-popup-title::after {
    content: "";
    display: block;
    width: 4rem;
    height: 4px;
    margin: 0.75rem auto 0;
    border-radius: 999px;
    background: linear-gradient(90deg, #0047ab, #1eb53a);
}

.sponsor-popup-intro {
    margin: 1rem auto 0;
    max-width: 32rem;
    color: #5c6b7a;
    font-size: 1rem;
    line-height: 1.65;
}

.sponsor-popup-grid {
    list-style: none;
    margin: 1.5rem 0 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(7.5rem, 1fr));
    gap: 0.85rem 1rem;
}

.sponsor-popup-item {
    margin: 0;
}

.sponsor-popup-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    min-height: 6.5rem;
    padding: 0.95rem 0.75rem 0.8rem;
    background: #fff;
    border: 1px solid rgba(0, 71, 171, 0.1);
    border-radius: 14px;
    text-decoration: none;
    box-shadow: 0 4px 14px rgba(26, 43, 60, 0.05);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

a.sponsor-popup-card:hover,
a.sponsor-popup-card:focus-visible {
    border-color: rgba(0, 71, 171, 0.28);
    box-shadow: 0 10px 24px rgba(0, 71, 171, 0.12);
    transform: translateY(-2px);
    outline: none;
    text-decoration: none;
}

.sponsor-popup-card--static {
    cursor: default;
}

.sponsor-popup-logo {
    display: block;
    max-width: 88%;
    max-height: 3rem;
    width: auto;
    height: auto;
    object-fit: contain;
}

.sponsor-popup-name {
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #5c6b7a;
    line-height: 1.3;
    text-align: center;
}

.sponsor-popup-footer {
    padding: 0 2rem 1.75rem;
    text-align: center;
}

.sponsor-popup-dismiss {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 8rem;
    padding: 0.7rem 1.35rem;
    border: none;
    border-radius: 999px;
    background: linear-gradient(125deg, #0047ab 0%, #1a5fbf 45%, #1eb53a 100%);
    color: #fff;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 8px 22px rgba(0, 71, 171, 0.22);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.sponsor-popup-dismiss:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 28px rgba(0, 71, 171, 0.28);
}

body.sponsor-popup-open {
    overflow: hidden;
    touch-action: none;
}

@media (max-width: 576px) {
    .sponsor-popup-body,
    .sponsor-popup-footer {
        padding-left: 1.25rem;
        padding-right: 1.25rem;
    }

    .sponsor-popup-body {
        padding-top: 1.65rem;
    }

    .sponsor-popup-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (prefers-reduced-motion: reduce) {
    .sponsor-popup-dialog {
        animation: none;
    }
}
