/* =========================================================
   PRIMER 5 — GLOBAL COMPETITION RIBBON
   ========================================================= */

.primer5-competition-ribbon {
    position: relative;
    z-index: 80;
    width: 100%;
    background: #fff;
    border-top: 1px solid rgba(4, 49, 81, .05);
    border-bottom: 1px solid #e2e9ef;
    box-shadow: 0 6px 20px rgba(7, 39, 65, .055);
}

.primer5-competition-ribbon__container {
    min-height: 76px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.primer5-competition-ribbon__track {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scroll-behavior: smooth;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
    padding: 7px 2px;
}

.primer5-competition-ribbon__track::-webkit-scrollbar {
    display: none;
}

.primer5-competition-ribbon__track:focus {
    outline: none;
}

.primer5-competition-ribbon__arrow {
    width: 36px;
    height: 42px;
    flex: 0 0 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 10px;
    color: #7890a2;
    background: #f2f6f8;
    transition: color .2s ease, background .2s ease, opacity .2s ease, transform .2s ease;
}

.primer5-competition-ribbon__arrow:hover:not(:disabled) {
    color: #fff;
    background: #073d66;
    transform: translateY(-1px);
}

.primer5-competition-ribbon__arrow:disabled {
    opacity: .28;
    cursor: default;
}

.primer5-competition-chip {
    position: relative;
    min-width: 390px;
    height: 62px;
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 6px 10px 6px 8px;
    color: #06375d;
    background: #fff;
    border: 1px solid #dde6ed;
    border-radius: 11px;
    text-decoration: none;
    scroll-snap-align: start;
    box-shadow: 0 2px 8px rgba(9, 44, 72, .035);
    transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease, background .2s ease;
}

.primer5-competition-chip:hover {
    color: #06375d;
    border-color: rgba(199, 47, 67, .42);
    box-shadow: 0 7px 18px rgba(9, 44, 72, .09);
    transform: translateY(-1px);
}

.primer5-competition-chip.is-current {
    border-color: rgba(199, 47, 67, .28);
    background: linear-gradient(180deg, #fff 0%, #fff8f9 100%);
}

.primer5-competition-chip.is-selected {
    border-color: #c72f43;
    box-shadow: inset 0 0 0 1px #c72f43, 0 6px 16px rgba(199, 47, 67, .10);
}

.primer5-competition-chip__logo {
    width: 52px;
    height: 52px;
    flex: 0 0 52px;
    display: grid;
    place-items: center;
    overflow: visible;
    border-radius: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
}

.primer5-competition-chip__logo img {
    width: 48px;
    height: 52px;
    object-fit: contain;
}

.primer5-competition-chip__logo strong {
    font-size: 12px;
    font-weight: 900;
    color: #c72f43;
}

.primer5-competition-chip__copy {
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    line-height: 1.05;
}

.primer5-competition-chip__copy strong {
    max-width: none;
    overflow: visible;
    text-overflow: clip;
    white-space: nowrap;
    color: #06375d;
    font-size: 11px;
    font-weight: 900;
}

.primer5-competition-chip__copy small {
    margin-top: 4px;
    color: #8294a3;
    font-size: 9px;
    font-weight: 700;
}

.primer5-competition-chip__badge {
    margin-left: auto;
    flex: 0 0 auto;
    min-width: 66px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 8px;
    border-radius: 8px;
    color: #fff;
    background: #c72f43;
    font-size: 8px;
    font-weight: 900;
    letter-spacing: .025em;
    text-transform: uppercase;
}

@media (min-width: 1200px) {
    .primer5-competition-ribbon__track {
        justify-content: center;
    }

    .primer5-competition-ribbon__track.is-overflowing {
        justify-content: flex-start;
    }
}

@media (max-width: 991.98px) {
    .primer5-competition-ribbon .container {
        max-width: none;
        padding-left: 10px;
        padding-right: 10px;
    }

    .primer5-competition-ribbon__container {
        min-height: 68px;
        gap: 6px;
    }

    .primer5-competition-ribbon__arrow {
        display: none;
    }

    .primer5-competition-ribbon__track {
        gap: 7px;
        padding: 6px 0;
    }

    .primer5-competition-chip {
        min-width: 330px;
        height: 56px;
    }

    .primer5-competition-chip__badge {
        min-width: 58px;
        height: 30px;
    }
}

@media (max-width: 575.98px) {
    .primer5-competition-ribbon .container {
        padding-left: 8px;
        padding-right: 8px;
    }

    .primer5-competition-ribbon__container {
        min-height: 64px;
    }

    .primer5-competition-chip {
        min-width: 300px;
        height: 54px;
        border-radius: 9px;
    }

    .primer5-competition-chip__logo {
        width: 44px;
        height: 44px;
        flex-basis: 44px;
    }

    .primer5-competition-chip__logo img {
        width: 40px;
        height: 44px;
    }

    .primer5-competition-chip__copy strong {
        max-width: 175px;
        font-size: 10px;
        white-space: normal;
        line-height: 1.12;
    }

    .primer5-competition-chip__copy small {
        font-size: 8px;
    }

    .primer5-competition-chip__badge {
        min-width: 48px;
        height: 26px;
        padding: 0 6px;
        font-size: 7px;
    }
}

/* =========================================================
   V3 — LOGO / ROUNDED BORDER POLISH
   Keeps the competition crest fully inside the chip and
   prevents the selected red ring from crossing over it.
   ========================================================= */

.primer5-competition-chip {
    min-width: 420px;
    height: 70px;
    gap: 14px;
    padding: 7px 12px 7px 14px;
    border-radius: 13px;
}

/* Do not draw an inset ring over the content/logo. */
.primer5-competition-chip.is-selected {
    border: 2px solid #c72f43;
    box-shadow: 0 6px 16px rgba(199, 47, 67, .10);
    padding: 6px 11px 6px 13px; /* compensate for 2px border */
}

.primer5-competition-chip__logo {
    position: relative;
    z-index: 2;
    width: 58px;
    height: 58px;
    flex: 0 0 58px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: visible;
    margin-left: 2px;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.primer5-competition-chip__logo img {
    display: block;
    width: 54px;
    height: 58px;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    object-position: center;
}

.primer5-competition-chip__copy {
    position: relative;
    z-index: 2;
}

.primer5-competition-chip__badge {
    position: relative;
    z-index: 2;
}

@media (max-width: 991.98px) {
    .primer5-competition-chip {
        min-width: 360px;
        height: 64px;
        padding: 6px 10px 6px 12px;
    }

    .primer5-competition-chip.is-selected {
        padding: 5px 9px 5px 11px;
    }

    .primer5-competition-chip__logo {
        width: 52px;
        height: 52px;
        flex-basis: 52px;
        margin-left: 1px;
    }

    .primer5-competition-chip__logo img {
        width: 48px;
        height: 52px;
    }
}

@media (max-width: 575.98px) {
    .primer5-competition-ribbon__container {
        min-height: 72px;
    }

    .primer5-competition-ribbon__track {
        padding-top: 7px;
        padding-bottom: 7px;
    }

    .primer5-competition-chip {
        min-width: min(340px, calc(100vw - 32px));
        height: 62px;
        gap: 10px;
        padding: 6px 9px 6px 11px;
        border-radius: 11px;
    }

    .primer5-competition-chip.is-selected {
        padding: 5px 8px 5px 10px;
    }

    .primer5-competition-chip__logo {
        width: 50px;
        height: 50px;
        flex-basis: 50px;
        margin-left: 0;
    }

    .primer5-competition-chip__logo img {
        width: 46px;
        height: 50px;
    }

    .primer5-competition-chip__copy strong {
        max-width: 190px;
        font-size: 10px;
        white-space: normal;
        line-height: 1.12;
    }

    .primer5-competition-chip__badge {
        min-width: 50px;
        height: 27px;
    }
}
