/* ==========================================================================
   Duo Creative Labs — Symmetric Rotating Client Banner & Wait Counter (v3)
   High-specificity override of flow-field.js grid on .duo-lead-magnet-card
   while preserving 100% of the page's original font, background & layout.
   ========================================================================== */

body .duo-lead-magnet-card.duo-rotator-active,
[data-theme="dark"] .duo-lead-magnet-card.svelte-hr0qzm.duo-rotator-active,
[data-theme="light"] .duo-lead-magnet-card.svelte-hr0qzm.duo-rotator-active {
    position: relative !important;
    width: 100% !important;
    max-width: 720px !important;
    min-height: 184px !important;
    box-sizing: border-box !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    align-items: stretch !important;
    gap: 14px !important;
    padding: 22px 26px 16px !important;
    border-radius: 22px !important;
    border: 1.5px solid var(--duo-border, rgba(241, 190, 72, 0.55)) !important;
    box-shadow: 0 16px 45px rgba(0, 0, 0, 0.72), 0 0 28px var(--duo-glow, rgba(241, 190, 72, 0.14)) !important;
    overflow: hidden !important;
    transition: border-color 0.35s ease, box-shadow 0.35s ease !important;
}

body .duo-lead-magnet-card.duo-rotator-active:hover,
[data-theme="dark"] .duo-lead-magnet-card.svelte-hr0qzm.duo-rotator-active:hover,
[data-theme="light"] .duo-lead-magnet-card.svelte-hr0qzm.duo-rotator-active:hover {
    border-color: var(--duo-accent, #F1BE48) !important;
    box-shadow: 0 20px 52px rgba(0, 0, 0, 0.82), 0 0 36px var(--duo-glow-strong, rgba(241, 190, 72, 0.24)) !important;
}

.duo-rotator-inner {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 22px !important;
    width: 100% !important;
    min-height: 104px !important;
    transition: opacity 0.24s ease, transform 0.24s ease;
}

.duo-rotator-inner.fading {
    opacity: 0;
    transform: translateY(4px);
}

.duo-rotator-left {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 16px !important;
    flex: 1 1 auto !important;
    min-width: 0 !important;
    text-align: left !important;
}

.duo-rotator-logo-wrap {
    flex: 0 0 64px !important;
    width: 64px !important;
    height: 64px !important;
    border-radius: 16px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 6px !important;
    box-sizing: border-box !important;
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid var(--duo-border, rgba(255, 255, 255, 0.18)) !important;
    overflow: hidden !important;
}

[data-theme="light"] .duo-rotator-logo-wrap {
    background: #14141b !important;
    border: 1px solid var(--duo-border, rgba(0, 0, 0, 0.14)) !important;
}

.duo-rotator-logo-wrap img {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    display: block !important;
}

.duo-rotator-monogram {
    font-size: 22px !important;
    font-weight: 800 !important;
    letter-spacing: -0.5px !important;
    line-height: 1 !important;
}

.duo-rotator-copy {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 5px !important;
}

.duo-rotator-tag {
    display: block !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    letter-spacing: 1.1px !important;
    text-transform: uppercase !important;
    line-height: 1.25 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

.duo-rotator-title {
    margin: 0 !important;
    font-size: 16.5px !important;
    font-weight: 700 !important;
    line-height: 1.28 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    color: #ffffff !important;
}

[data-theme="light"] .duo-rotator-title {
    color: #111116 !important;
}

.duo-rotator-sub {
    margin: 0 !important;
    font-size: 13px !important;
    line-height: 1.42 !important;
    color: rgba(255, 255, 255, 0.74) !important;
}

[data-theme="light"] .duo-rotator-sub {
    color: rgba(17, 17, 22, 0.72) !important;
}

.duo-rotator-actions {
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
    flex: 0 0 176px !important;
    width: 176px !important;
}

.duo-rotator-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    height: 38px !important;
    padding: 0 14px !important;
    border-radius: 10px !important;
    font-size: 12.5px !important;
    font-weight: 700 !important;
    text-decoration: none !important;
    white-space: nowrap !important;
    cursor: pointer !important;
    transition: transform 0.16s ease, filter 0.16s ease, border-color 0.16s ease !important;
    box-sizing: border-box !important;
}

.duo-rotator-btn.primary {
    color: #0b0b0f !important;
    border: 1px solid transparent !important;
}

.duo-rotator-btn.primary:hover {
    transform: translateY(-1px) !important;
    filter: brightness(1.08) !important;
}

.duo-rotator-btn.secondary {
    background: rgba(255, 255, 255, 0.06) !important;
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.18) !important;
}

[data-theme="light"] .duo-rotator-btn.secondary {
    background: rgba(0, 0, 0, 0.05) !important;
    color: #111116 !important;
    border: 1px solid rgba(0, 0, 0, 0.16) !important;
}

.duo-rotator-btn.secondary:hover {
    transform: translateY(-1px) !important;
    border-color: var(--duo-accent, #F1BE48) !important;
}

/* Carousel Bottom Bar (Full Width, Below Content) */
.duo-rotator-bar {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100% !important;
    gap: 12px !important;
    padding-top: 12px !important;
    border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
}

[data-theme="light"] .duo-rotator-bar {
    border-top: 1px solid rgba(0, 0, 0, 0.08) !important;
}

.duo-rotator-badge {
    font-size: 11px !important;
    color: rgba(255, 255, 255, 0.56) !important;
    letter-spacing: 0.25px !important;
    white-space: nowrap !important;
}

[data-theme="light"] .duo-rotator-badge {
    color: rgba(17, 17, 22, 0.6) !important;
}

.duo-rotator-controls {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    flex-shrink: 0 !important;
}

.duo-rotator-dots {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
}

.duo-rotator-dot {
    width: 7px !important;
    height: 7px !important;
    border-radius: 99px !important;
    border: none !important;
    padding: 0 !important;
    cursor: pointer !important;
    background: rgba(255, 255, 255, 0.24) !important;
    transition: width 0.25s ease, background 0.25s ease !important;
}

[data-theme="light"] .duo-rotator-dot {
    background: rgba(0, 0, 0, 0.2) !important;
}

.duo-rotator-dot.active {
    width: 22px !important;
    background: var(--duo-accent, #F1BE48) !important;
}

.duo-rotator-nav {
    width: 26px !important;
    height: 26px !important;
    border-radius: 7px !important;
    border: 1px solid rgba(255, 255, 255, 0.16) !important;
    background: rgba(255, 255, 255, 0.04) !important;
    color: rgba(255, 255, 255, 0.78) !important;
    font-size: 14px !important;
    line-height: 1 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    padding: 0 !important;
    transition: border-color 0.15s ease, color 0.15s ease !important;
}

[data-theme="light"] .duo-rotator-nav {
    border-color: rgba(0, 0, 0, 0.16) !important;
    color: #111116 !important;
}

.duo-rotator-nav:hover {
    border-color: var(--duo-accent, #F1BE48) !important;
    color: var(--duo-accent, #F1BE48) !important;
}

/* Live Download Progress & Counter Pill */
#duo-wait-tracker {
    display: none;
    width: 100%;
    max-width: 720px;
    box-sizing: border-box;
    margin-top: 10px;
    margin-bottom: 6px;
    padding: 12px 16px;
    border-radius: 14px;
    background: rgba(241, 190, 72, 0.09);
    border: 1px solid rgba(241, 190, 72, 0.38);
    color: #ffffff;
}

#duo-wait-tracker.visible {
    display: block;
    animation: duoFadeIn 0.22s ease;
}

.duo-wait-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    font-size: 12.5px;
    font-weight: 500;
    margin-bottom: 8px;
}

.duo-wait-timer {
    font-variant-numeric: tabular-nums;
    font-weight: 700;
    color: #f1be48;
    flex-shrink: 0;
}

.duo-wait-bar-bg {
    width: 100%;
    height: 5px;
    border-radius: 99px;
    background: rgba(255, 255, 255, 0.12);
    overflow: hidden;
}

.duo-wait-bar-fill {
    height: 100%;
    width: 12%;
    border-radius: 99px;
    background: linear-gradient(90deg, #f1be48, #ffdc7a);
    transition: width 0.5s ease;
}

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

/* ==========================================================================
   MOBILE RESPONSIVE (<= 680px) — 6-Point Native App Polish (v7)
   ========================================================================== */
@media screen and (max-width: 680px) {
    #cobalt-save-container {
        padding-bottom: 92px !important;
    }

    /* 1. Anchor ES/EN + theme controls to top of page (no overlap on scroll) */
    body .top-utility-bar,
    body .top-utility-bar.svelte-hr0qzm {
        position: absolute !important;
        top: 12px !important;
        right: 12px !important;
        z-index: 20 !important;
    }

    body .brand-hero,
    body .brand-hero.svelte-hr0qzm {
        margin-top: 44px !important;
        margin-bottom: 12px !important;
    }

    /* 2. Remove dead gap inside download box */
    body #omnibox,
    body #omnibox.svelte-1xipo2g {
        padding: 12px !important;
        gap: 8px !important;
        margin-bottom: 10px !important;
    }

    body #input-container,
    body #input-container.svelte-1xipo2g {
        min-height: 46px !important;
        margin-bottom: 0 !important;
    }

    body #action-container,
    body #action-container.svelte-1xipo2g {
        padding-top: 0 !important;
        border-top: none !important;
        gap: 8px !important;
    }

    /* 3. Crisp segmented control for Auto | Audio | Mute */
    body #action-container .switcher,
    body .switcher.svelte-15vshmj {
        background: rgba(255, 255, 255, 0.05) !important;
        border: 1px solid rgba(255, 255, 255, 0.1) !important;
        border-radius: 11px !important;
        padding: 3px !important;
        gap: 3px !important;
    }

    body #action-container .switcher button,
    body #action-container .switcher .button {
        height: 36px !important;
        border-radius: 8px !important;
        border: 1px solid transparent !important;
        position: relative !important;
    }

    body #action-container .switcher button:not(:last-child)::after {
        content: "";
        position: absolute;
        right: -2px;
        top: 22%;
        height: 56%;
        width: 1px;
        background: rgba(255, 255, 255, 0.12);
    }

    body #action-container .switcher button.active,
    body #action-container .switcher button[aria-pressed="true"] {
        background: rgba(241, 190, 72, 0.22) !important;
        border: 1px solid rgba(241, 190, 72, 0.55) !important;
        color: #F1BE48 !important;
        font-weight: 700 !important;
        box-shadow: 0 0 12px rgba(241, 190, 72, 0.18) !important;
    }

    body #action-container .switcher button.active::after,
    body #action-container .switcher button[aria-pressed="true"]::after {
        display: none !important;
    }

    /* 4. Sleeker, tighter platform chips so client banner fits higher */
    body .supported-platforms-bar,
    body .supported-platforms-bar.svelte-hr0qzm {
        gap: 5px !important;
        margin: 0 auto 12px auto !important;
        padding: 0 !important;
    }

    body .platform-item,
    body .platform-item.svelte-hr0qzm {
        padding: 4px 4px !important;
        font-size: 10px !important;
        border-radius: 7px !important;
        background: rgba(255, 255, 255, 0.03) !important;
        border: 1px solid rgba(255, 255, 255, 0.07) !important;
    }

    /* 5. Compact pro-level client card (logo left + copy right, buttons 50/50 below) */
    body .duo-lead-magnet-card.duo-rotator-active,
    [data-theme="dark"] .duo-lead-magnet-card.svelte-hr0qzm.duo-rotator-active,
    [data-theme="light"] .duo-lead-magnet-card.svelte-hr0qzm.duo-rotator-active {
        min-height: 204px !important;
        padding: 15px 14px 12px !important;
        border-radius: 16px !important;
        gap: 10px !important;
        margin-bottom: 14px !important;
    }

    .duo-rotator-inner {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 11px !important;
        min-height: 138px !important;
    }

    .duo-rotator-left {
        flex-direction: row !important;
        align-items: center !important;
        text-align: left !important;
        gap: 12px !important;
    }

    .duo-rotator-logo-wrap {
        flex: 0 0 48px !important;
        width: 48px !important;
        height: 48px !important;
        border-radius: 12px !important;
        padding: 6px !important;
    }

    .duo-rotator-copy {
        align-items: flex-start !important;
        text-align: left !important;
        gap: 3px !important;
    }

    .duo-rotator-tag {
        font-size: 9.5px !important;
        letter-spacing: 0.8px !important;
        white-space: nowrap !important;
    }

    .duo-rotator-title {
        font-size: 14.5px !important;
        line-height: 1.24 !important;
        white-space: normal !important;
        text-wrap: balance !important;
    }

    .duo-rotator-sub {
        font-size: 11.5px !important;
        line-height: 1.38 !important;
    }

    .duo-rotator-actions {
        flex: 0 0 auto !important;
        width: 100% !important;
        flex-direction: row !important;
        gap: 8px !important;
    }

    .duo-rotator-btn {
        flex: 1 1 0 !important;
        height: 38px !important;
        font-size: 12px !important;
        padding: 0 10px !important;
    }

    .duo-rotator-bar {
        flex-direction: row !important;
        align-items: center !important;
        justify-content: space-between !important;
        gap: 6px !important;
        padding-top: 9px !important;
    }

    .duo-rotator-badge {
        font-size: 9.5px !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }

    /* 6. Single-line centered footer + clearer legal text */
    body #duo-footer,
    body #duo-footer.svelte-1uha8ag {
        margin-top: 12px !important;
        margin-bottom: 16px !important;
        padding-bottom: 12px !important;
        align-items: center !important;
        text-align: center !important;
        gap: 6px !important;
    }

    body #duo-footer .footer-links {
        justify-content: center !important;
        flex-wrap: nowrap !important;
        font-size: 10.5px !important;
        gap: 5px !important;
        white-space: nowrap !important;
    }

    body #duo-footer .footer-disclaimer-sub {
        text-align: center !important;
        font-size: 9.5px !important;
        opacity: 0.72 !important;
        line-height: 1.45 !important;
    }
}
