/* SBC League Manager — Frontend League Loader CSS */

/* =========================================================
   League header
   ========================================================= */

.sbc-league-hero {
    margin: 0 0 20px;
    color: inherit;
}

.sbc-league-hero--with-banner {
    display: grid;
    gap: 14px;
}

.sbc-league-page .page-header,
.sbc-league-page .entry-title {
    display: none !important;
}

.sbc-league-hero__media {
    position: relative;
    overflow: hidden;
    min-height: clamp(280px, 42vw, 520px);
    max-height: 520px;
    background: #1f2933;
}

.sbc-league-hero__image {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 0;
    object-fit: cover;
    object-position: center center;
}

.sbc-league-hero__scrim {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(15, 23, 42, 0.08) 0%, rgba(15, 23, 42, 0.22) 34%, rgba(15, 23, 42, 0.72) 100%);
}

.sbc-league-hero__body {
    display: grid;
    gap: 12px;
    color: inherit;
}

.sbc-league-hero__body--overlay {
    position: absolute;
    inset: auto 0 0;
    z-index: 2;
    width: 100%;
    max-width: 820px;
    padding: clamp(22px, 3.6vw, 42px);
    color: #fff;
}

.sbc-league-hero__eyebrow {
    margin: 0;
}

.sbc-league-hero__eyebrow .sbc-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: #ae2427;
    font-family: inherit;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    line-height: 1.2;
    text-transform: uppercase;
}

.sbc-league-hero--with-banner .sbc-league-hero__eyebrow .sbc-tag {
    color: #fff;
}

.sbc-league-page .sbc-league-hero__title,
.sbc-league-page .sbc-league-hero .elementor-heading-title.sbc-league-hero__title {
    margin: 0;
    color: #2e2e2e !important;
    font-family: inherit;
    font-size: clamp(1.25rem, 2vw, 1.7rem);
    font-weight: 700;
    line-height: 1.18;
    text-transform: none;
}

.sbc-league-page .sbc-league-hero--with-banner .sbc-league-hero__title,
.sbc-league-page .sbc-league-hero--with-banner .sbc-league-hero .elementor-heading-title.sbc-league-hero__title {
    color: #fff !important;
    font-size: clamp(1.8rem, 3vw, 2.75rem);
    text-shadow: 0 1px 2px rgba(15, 23, 42, 0.4);
}

.sbc-league-hero__intro {
    display: grid;
    gap: 10px;
}

.sbc-league-hero__description {
    max-width: 62ch;
    color: #4b5563;
    font-family: inherit;
    font-size: 0.95rem;
    line-height: 1.55;
}

.sbc-league-hero--with-banner .sbc-league-hero__description {
    max-width: 58ch;
    color: rgba(255, 255, 255, 0.92);
    text-shadow: 0 1px 1px rgba(15, 23, 42, 0.28);
}

.sbc-league-hero__description > :first-child {
    margin-top: 0;
}

.sbc-league-hero__description > :last-child {
    margin-bottom: 0;
}

.sbc-league-hero__actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sbc-league-hero .sbc-register-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.sbc-league-hero__meta {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.sbc-league-hero--with-banner .sbc-league-hero__meta {
    margin-top: -32px;
    position: relative;
    z-index: 3;
}

.sbc-league-hero__meta-card {
    min-width: 0;
    padding: 12px 14px;
    border: 1px solid #ece6db;
    background: #f8f5ef;
}

.sbc-league-hero__meta-label {
    margin-bottom: 4px;
    color: #6b7280;
    font-family: inherit;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    line-height: 1.2;
    text-transform: uppercase;
}

.sbc-league-hero__meta-value {
    color: #2e2e2e;
    font-family: inherit;
    font-size: 0.92rem;
    font-weight: 600;
    line-height: 1.35;
}

/* =========================================================
   Widget wrapper
   ========================================================= */

.sbc-widgets-wrap {
    display: block;
    width: 100%;
    max-width: 100%;
    overflow-x: clip;
}

.sbc-widget-group {
    max-width: 100%;
    overflow-x: clip;
    --sbc-sticky-top: 72px;
}

.sbc-widget-toolbar {
    position: sticky;
    top: var(--sbc-sticky-top);
    z-index: 25;
    display: grid;
    gap: 10px;
    margin: 0 0 14px;
    padding: 10px 0 12px;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid #ece6db;
}

.sbc-widget-toolbar__league {
    color: #2e2e2e;
    font-family: inherit;
    font-size: 0.98rem;
    font-weight: 700;
    line-height: 1.2;
}

.sbc-widget-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0;
}

.sbc-widget-tab {
    appearance: none;
    border: 1px solid #d9d1c4;
    background: #f8f5ef;
    color: #2e2e2e;
    font: inherit;
    font-size: 0.88rem;
    font-weight: 600;
    line-height: 1.2;
    padding: 10px 14px;
    cursor: pointer;
}

.sbc-widget-tab:hover,
.sbc-widget-tab:focus-visible {
    background: #4b5563;
    border-color: #4b5563;
    color: #fff;
    outline: none;
}

.sbc-widget-tab.is-active {
    background: #ae2427;
    border-color: #ae2427;
    color: #fff;
}

.sbc-league-hero .sbc-register-btn:hover,
.sbc-league-hero .sbc-register-btn:focus-visible {
    background: #4b5563;
    border-color: #4b5563;
    color: #fff;
}

.sbc-widget-wrap {
    position: relative;
    width: 100%;
    max-width: 100%;
    overflow-x: clip;
}

.sbc-widget-wrap:not(.is-active) {
    display: none;
}

/* =========================================================
   Loading bar
   ========================================================= */

.sbc-loader {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 2;
    width: 100%;
    background: #f8f5ef;
    border: 1px solid #ece6db;
    overflow: hidden;
    padding: 12px 14px 10px;
    box-sizing: border-box;
}

.sbc-loader-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(174, 36, 39, 0.2);
    border-top-color: #ae2427;
    border-radius: 50%;
    animation: sbc-spin 0.8s linear infinite;
}

.sbc-loader-bar {
    height: 4px;
    background: #ae2427;
    border-radius: 2px;
    width: 0;
    animation: sbc-load 2.5s ease-out forwards;
}

.sbc-loader-text {
    margin: 8px 0 0;
    color: #5b6472;
    font-size: 13px;
    line-height: 1.4;
}

@keyframes sbc-load {
    0%   { width: 0%; }
    35%  { width: 55%; }
    65%  { width: 72%; }
    100% { width: 72%; }
}

@keyframes sbc-spin {
    to {
        transform: rotate(360deg);
    }
}

.sbc-loader.complete .sbc-loader-bar {
    width: 100%;
    transition: width 0.3s ease;
}

.sbc-loader.hidden {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.sbc-widget {
    position: relative;
    display: block;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    background: #fff;
}

.sbc-widget iframe {
    display: block;
    max-width: 100% !important;
}

.sbc-widget-error {
    margin-bottom: 10px;
    padding: 14px;
    border: 1px solid #e5c8c9;
    background: #fbf1f1;
    color: #4a2324;
}

.sbc-widget-error__title {
    margin: 0 0 6px;
    font-size: 0.95rem;
    font-weight: 700;
}

.sbc-widget-error__text,
.sbc-widget-error__actions {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.45;
}

.sbc-widget-error__actions {
    margin-top: 8px;
}

.sbc-widget-error__actions a {
    color: #ae2427;
    font-weight: 600;
}

/* =========================================================
   Widget container / iframe
   ========================================================= */

.sbc-widget {
    width: 100%;
    max-width: 100%;
    min-height: 600px;
}

.sbc-widget iframe {
    width: 100%;
    max-width: 100% !important;
    border: none;
    display: block;
}

/* =========================================================
   Coming soon state
   ========================================================= */

.sbc-coming-soon {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 260px;
    text-align: center;
    padding: 36px 24px;
    background: #f7f7f7;
    border: 1px solid #e0e0e0;
}

.sbc-coming-soon h3 {
    font-size: 20px;
    font-weight: 800;
    text-transform: uppercase;
    color: #111;
    margin-bottom: 8px;
}

.sbc-coming-soon p {
    color: #767676;
    font-size: 14px;
}

.sbc-cs-bar {
    width: 32px;
    height: 3px;
    background: #ae2427;
    margin: 16px auto 0;
    animation: sbc-pulse 1.8s ease-in-out infinite;
}

@keyframes sbc-pulse {
    0%,
    100% {
        width: 24px;
        opacity: 0.4;
    }
    50% {
        width: 56px;
        opacity: 1;
    }
}

@media (max-width: 900px) {
    .sbc-league-hero__meta {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .sbc-widget-group {
        --sbc-sticky-top: 56px;
    }

    .sbc-league-hero {
        margin-bottom: 16px;
    }

    .sbc-league-hero__media {
        min-height: 240px;
        max-height: 340px;
    }

    .sbc-league-hero__body {
        gap: 10px;
    }

    .sbc-league-hero__body--overlay {
        padding: 18px 16px;
    }

    .sbc-league-hero__title {
        font-size: clamp(1.1rem, 4.8vw, 1.35rem);
        line-height: 1.2;
    }

    .sbc-league-hero--with-banner .sbc-league-hero__title {
        font-size: clamp(1.45rem, 7vw, 2rem);
    }

    .sbc-league-hero__description {
        font-size: 0.92rem;
        line-height: 1.5;
    }

    .sbc-league-hero__actions,
    .sbc-league-hero .sbc-register-btn {
        width: 100%;
    }

    .sbc-league-hero__meta {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .sbc-league-hero--with-banner .sbc-league-hero__meta {
        margin-top: 0;
    }

    .sbc-league-hero__meta-card {
        padding: 10px 12px;
    }

    .sbc-widget-tabs {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 6px;
    }

    .sbc-widget-tab {
        font-size: 0.82rem;
        min-width: 0;
        padding: 8px 10px;
        text-align: center;
    }

    .sbc-widget-toolbar {
        gap: 8px;
        margin-bottom: 10px;
        padding: 8px 0 10px;
    }

    .sbc-widget-toolbar__league {
        font-size: 0.92rem;
    }

    .sbc-loader {
        padding: 10px 12px 9px;
    }

    .sbc-widget {
        min-height: 640px;
    }
}
