/* Reusable Banner Engine styles. Host-specific campaign themes may be removed when copying. */
/* Site-wide rotating affiliate offers */
.affiliate-banner-shell {
    max-width: 1180px;
    margin: 1rem auto 0;
    padding: 0 1rem;
}

.affiliate-banner {
    position: relative;
    overflow: hidden;
    color: #333333;
    background: #ffffff;
    border: 1px solid #dedede;
    border-top: 4px solid #ffca05;
    border-radius: 14px;
    box-shadow: 0 8px 24px rgba(51, 51, 51, 0.08);
}

.affiliate-banner__slide::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

.affiliate-banner__viewport {
    position: relative;
    z-index: 1;
    min-height: 128px;
}

.affiliate-banner__slide {
    position: relative;
    display: none;
    grid-template-columns: minmax(120px, 190px) 1fr auto;
    align-items: center;
    gap: clamp(1rem, 3vw, 2.5rem);
    min-height: 128px;
    padding: 1rem 1.25rem;
    color: #333333;
    text-decoration: none;
}

.affiliate-banner__slide > * {
    position: relative;
    z-index: 1;
}

.affiliate-banner__slide--shopto::before {
    background-image: url('../Assets/Affiliates/gaming-pattern-v2.png');
    background-position: center 44%;
    background-size: 620px auto;
    opacity: 0.28;
}

.affiliate-banner__slide.is-active {
    display: grid;
    animation: affiliateFadeIn 0.45s ease both;
}

.affiliate-banner__slide:hover,
.affiliate-banner__slide:focus {
    color: #333333;
    text-decoration: none;
}

.affiliate-banner__slide:focus-visible {
    outline: 3px solid var(--site-primary);
    outline-offset: -4px;
}

.affiliate-banner__logo-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 64px;
    padding: 0.2rem 0.35rem;
}

.affiliate-banner__slide--shopto .affiliate-banner__logo-wrap {
    background: radial-gradient(ellipse at center, rgba(255, 202, 5, 0.2) 0%, rgba(255, 255, 255, 0.94) 63%, rgba(255, 255, 255, 0) 76%);
}

.affiliate-banner__logo {
    display: block;
    width: 100%;
    max-width: 175px;
    height: 58px;
    object-fit: contain;
}

.affiliate-banner__copy {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.3rem;
}

.affiliate-banner__message {
    font-size: clamp(1rem, 2vw, 1.25rem);
    font-weight: 650;
    line-height: 1.25;
}

.affiliate-banner__note {
    color: #777777;
    font-size: 0.72rem;
    line-height: 1;
}

.affiliate-banner__cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    min-width: 138px;
    padding: 0.65rem 1rem;
    color: #ffffff;
    background: #d9432f;
    border: 1px solid #bd3423;
    border-radius: 999px;
    font-size: 0.92rem;
    font-weight: 700;
    box-shadow: 0 3px 0 #9f2c1e;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.affiliate-banner__slide:hover .affiliate-banner__cta {
    transform: translateY(-1px);
    background: #c93827;
    box-shadow: 0 4px 0 #9f2c1e;
}

.affiliate-banner__slide--exoticca {
    color: #ffffff;
}

.affiliate-banner__slide--exoticca::before {
    background-image: url('../Assets/Affiliates/exoticca-destinations-v2.jpg');
    background-position: center 48%;
    background-size: cover;
    opacity: 1;
}

.affiliate-banner__slide--exoticca:hover,
.affiliate-banner__slide--exoticca:focus {
    color: #ffffff;
}

.affiliate-banner__slide--exoticca .affiliate-banner__logo-wrap {
    padding-right: 1rem;
    padding-left: 1rem;
    background: rgba(18, 18, 18, 0.82);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
}

.affiliate-banner__slide--exoticca .affiliate-banner__logo {
    max-width: 170px;
}

.affiliate-banner__slide--exoticca .affiliate-banner__note {
    color: #e2e2e2;
}

.affiliate-banner__slide--exoticca .affiliate-banner__copy {
    padding: 0.55rem 0.75rem;
    background: rgba(18, 18, 18, 0.82);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.65);
}

.affiliate-banner__slide--exoticca .affiliate-banner__cta {
    color: #121212;
    background: #f8d447;
    border-color: #d7b62f;
    box-shadow: 0 3px 0 #a98d20;
}

.affiliate-banner__slide--exoticca:hover .affiliate-banner__cta {
    color: #121212;
    background: #ffdf5e;
    box-shadow: 0 4px 0 #a98d20;
}

.affiliate-banner__slide--compatibility,
.affiliate-banner__slide--compatibility:hover,
.affiliate-banner__slide--compatibility:focus {
    grid-template-columns: minmax(0, 1fr) auto;
    color: #172033;
    background: #ffffff;
}

.affiliate-banner__slide--compatibility::before {
    background-image: url('../Assets/Banners/compatibility-community-pattern-v3.png');
    background-repeat: repeat-x;
    background-position: center;
    background-size: 380px auto;
    opacity: 0.22;
}

.affiliate-banner__slide--compatibility .affiliate-banner__logo-wrap {
    display: none;
}

.affiliate-banner__slide--compatibility .affiliate-banner__copy {
    width: fit-content;
    padding: 0.6rem 0.85rem;
    color: #ffffff;
    background: #d63384;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(148, 28, 88, 0.18);
}

.affiliate-banner__slide--compatibility .affiliate-banner__message {
    color: #ffffff;
}

.affiliate-banner__slide--compatibility .affiliate-banner__note {
    color: rgba(255, 255, 255, 0.88);
}

.affiliate-banner__slide--compatibility .affiliate-banner__cta {
    color: #ffffff;
    background: #146cda;
    border-color: #0f5fbe;
    box-shadow: 0 3px 0 #0a478f;
}

.affiliate-banner__slide--compatibility:hover .affiliate-banner__cta {
    color: #ffffff;
    background: #0f61c8;
    box-shadow: 0 4px 0 #0a478f;
}

.affiliate-banner__slide--fred-olsen,
.affiliate-banner__slide--fred-olsen:hover,
.affiliate-banner__slide--fred-olsen:focus {
    color: #ffffff;
    background: #001b3d;
}

.affiliate-banner__slide--fred-olsen.is-active {
    display: flex;
    justify-content: center;
    padding: 0;
}

.affiliate-banner__creative-wrap {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

.affiliate-banner__creative {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
}

.admin-section-divider {
    border-top-color: var(--site-primary) !important;
}

.admin-banner-form .form-label {
    margin-bottom: 0.45rem;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.005em;
}

.admin-banner-form .form-control {
    font-size: 0.94rem;
}

.admin-banner-options {
    display: grid;
    gap: 0.9rem;
}

.admin-banner-option {
    margin: 0;
    padding: 0.9rem 1rem 0.9rem 2.8rem;
    border: 1px solid #dfe6ef;
    border-radius: 0.7rem;
    background: #fbfcfe;
}

.admin-banner-option .form-check-input {
    margin-top: 0.2rem;
    margin-left: -1.8rem;
}

.admin-banner-option .form-check-label {
    font-size: 0.94rem;
    font-weight: 600;
    line-height: 1.35;
}

.admin-banner-option .form-text {
    margin-top: 0.3rem;
    font-size: 0.8rem;
    line-height: 1.45;
    color: #667386;
}

.admin-banner-option__setting {
    max-width: 22rem;
    margin-top: 0.8rem;
    padding: 0.75rem 0.85rem;
    border-left: 3px solid #b9d5fb;
    border-radius: 0 0.45rem 0.45rem 0;
    background: #f3f7fc;
}

.admin-banner-number {
    max-width: 10rem;
}

.admin-banner-number:disabled {
    color: #7a8491;
    background-color: #e9edf2;
}

.admin-table-sort {
    display: inline-flex;
    gap: 0.4rem;
    align-items: center;
    color: inherit;
    text-decoration: none;
    white-space: nowrap;
}

.admin-table-sort:hover,
.admin-table-sort:focus {
    color: var(--site-primary);
}

.admin-table-sort .fa-solid {
    width: 0.8rem;
    color: #7a8491;
    font-size: 0.72rem;
    text-align: center;
}

.admin-banner-reorder-help {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
    justify-content: space-between;
    padding: 0.7rem 0.85rem;
    border-bottom: 1px solid var(--site-border);
    background: var(--site-surface-soft);
    color: var(--site-text-muted);
    font-size: 0.85rem;
}

.admin-banner-reorder-help .fa-grip-vertical {
    margin-right: 0.35rem;
}

.admin-banner-reorder-status {
    min-width: 6.5rem;
    color: #198754;
    font-weight: 700;
    text-align: right;
}

.admin-banner-reorder-actions {
    display: inline-flex;
    gap: 0.75rem;
    align-items: center;
    white-space: nowrap;
}

.admin-banner-order-cell {
    display: inline-flex;
    gap: 0.45rem;
    align-items: center;
}

.admin-banner-drag-handle {
    display: inline-grid;
    width: 1.8rem;
    height: 1.8rem;
    padding: 0;
    place-items: center;
    border: 0;
    border-radius: 0.25rem;
    color: #667386;
    background: transparent;
    cursor: grab;
    touch-action: none;
    user-select: none;
}

.admin-banner-drag-handle:hover,
.admin-banner-drag-handle:focus {
    color: var(--site-primary);
    background: #edf3fb;
}

.admin-banner-drag-handle:active {
    cursor: grabbing;
}

[data-banner-row].is-dragging {
    opacity: 0.55;
    background: #eef5ff;
}

.affiliate-banner__creative-note {
    position: absolute;
    right: 0.35rem;
    bottom: 0.2rem;
    padding: 0.2rem 0.45rem;
    color: #ffffff;
    background: rgba(0, 0, 0, 0.78);
    border-radius: 999px;
    font-size: 0.68rem;
    line-height: 1.2;
}

.affiliate-banner__reward-badge {
    position: absolute;
    left: 0.45rem;
    bottom: 0.25rem;
    padding: 0.2rem 0.5rem;
    color: #102a43;
    background: #ffe08a;
    border: 1px solid #d6ad35;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 700;
    line-height: 1.2;
}

.affiliate-banner__reward-inline {
    color: #8a4b00;
    font-size: 0.75rem;
    font-weight: 700;
}

.affiliate-banner__controls {
    position: relative;
    z-index: 3;
    display: grid;
    grid-template-columns: minmax(0, 1fr) max-content;
    align-items: center;
    gap: 0.75rem;
    min-height: 32px;
    padding: 4px 0.75rem;
    background: #ffffff;
}

.affiliate-banner__controls--actions-only {
    grid-template-columns: max-content;
    justify-content: end;
}

.affiliate-banner__reward-message {
    min-width: 0;
    color: #666666;
    font-size: 0.78rem;
    line-height: 1.25;
}

.affiliate-banner__control-actions {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: max-content;
    align-items: center;
    gap: 0.35rem;
    white-space: nowrap;
}

.affiliate-banner__toggle {
    min-width: 58px;
    min-height: 24px;
    padding: 0 8px;
    border: 1px solid #cccccc;
    border-radius: 6px;
    background: #ffffff;
    color: #333333;
    font-size: 0.85rem;
    cursor: pointer;
}

.affiliate-banner__controls button:focus-visible {
    outline: 3px solid #005fcc;
    outline-offset: 2px;
}

.affiliate-banner__dot {
    width: 24px;
    height: 24px;
    padding: 0;
    background: radial-gradient(circle, #999999 0 4px, transparent 5px);
    border: 0;
    border-radius: 50%;
}

.affiliate-banner__dot.is-active {
    background: radial-gradient(circle, #d9432f 0 4px, transparent 5px);
}

@keyframes affiliateFadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
    .affiliate-banner__slide.is-active {
        animation: none;
    }

    .affiliate-banner__cta {
        transition: none;
    }
}

@media (max-width: 640px) {
    .affiliate-banner-shell {
        padding: 0 0.65rem;
    }

    .affiliate-banner__slide,
    .affiliate-banner__slide.is-active {
        grid-template-columns: minmax(100px, 135px) 1fr;
        gap: 0.8rem;
        padding: 0.75rem;
    }

    .affiliate-banner__slide--shopto::before {
        background-size: 450px auto;
        opacity: 0.18;
    }

    .affiliate-banner__slide--exoticca::before {
        background-position: center 48%;
    }

    .affiliate-banner__logo-wrap {
        min-height: 52px;
    }

    .affiliate-banner__logo {
        height: 46px;
    }

    .affiliate-banner__slide--compatibility .affiliate-banner__logo-wrap {
        display: none;
    }

    .affiliate-banner__slide--compatibility,
    .affiliate-banner__slide--compatibility.is-active {
        grid-template-columns: 1fr;
    }

    .affiliate-banner__message {
        font-size: 0.95rem;
    }

    .affiliate-banner__controls {
        align-items: flex-start;
        padding: 5px 0.65rem;
    }

    .affiliate-banner__reward-message {
        font-size: 0.7rem;
    }

    .affiliate-banner__cta {
        grid-column: 1 / -1;
        min-width: 0;
        padding: 0.5rem 0.8rem;
    }

    .affiliate-banner__slide--fred-olsen.is-active {
        display: flex;
        padding: 0;
    }

}
