/* CoinsCapture — interactive cookie consent */

.cc-cookie {
    position: fixed;
    z-index: 10050;
    left: 16px;
    right: 16px;
    bottom: max(16px, env(safe-area-inset-bottom, 0px));
    width: auto;
    max-width: 420px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    pointer-events: none;
}

/* Beat legacy .cookie-bar rules from style.css */
.cc-cookie.cookie-bar,
.cc-cookie.alert {
    background: transparent;
    border: 0;
    border-radius: 0;
    padding: 0;
    margin: 0;
    width: auto;
    position: fixed;
}

.cc-cookie span {
    color: inherit;
    font-size: inherit;
    font-weight: inherit;
}

.cc-cookie[hidden] {
    display: none !important;
}

.cc-cookie.is-open {
    pointer-events: auto;
}

.cc-cookie__card {
    position: relative;
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-areas:
        "mascot copy"
        "prefs prefs"
        "actions actions";
    gap: 10px 14px;
    padding: 18px 18px 16px;
    border-radius: 22px;
    background:
        linear-gradient(145deg, color-mix(in srgb, var(--cc-surface, #fff) 92%, #f7931b) 0%, var(--cc-surface, #fff) 42%),
        var(--cc-surface, #fff);
    color: var(--cc-ink, #110b29);
    border: 1px solid color-mix(in srgb, var(--cc-accent, #f7931b) 28%, var(--cc-border, #e5e7eb));
    box-shadow:
        0 18px 50px rgba(17, 11, 41, 0.18),
        0 4px 14px rgba(247, 147, 27, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.45);
    transform: translateY(28px) scale(0.96);
    opacity: 0;
    transition:
        transform 480ms cubic-bezier(0.34, 1.45, 0.64, 1),
        opacity 280ms ease;
    overflow: hidden;
}

.cc-cookie.is-open .cc-cookie__card {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.cc-cookie.is-leaving .cc-cookie__card {
    transform: translateY(40px) scale(0.92);
    opacity: 0;
    transition:
        transform 320ms cubic-bezier(0.4, 0, 1, 1),
        opacity 240ms ease;
}

.cc-cookie__card::before {
    content: "";
    position: absolute;
    inset: -40% -20% auto;
    height: 120px;
    background: radial-gradient(ellipse at center, rgba(247, 147, 27, 0.22), transparent 70%);
    pointer-events: none;
}

.cc-cookie__dismiss {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 2;
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 999px;
    background: color-mix(in srgb, var(--cc-surface-2, #eff2f5) 80%, transparent);
    color: var(--cc-muted, #6b7280);
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}

.cc-cookie__dismiss:hover {
    background: var(--cc-surface-2, #eff2f5);
    color: var(--cc-ink, #110b29);
    transform: rotate(90deg);
}

.cc-cookie__mascot {
    grid-area: mascot;
    position: relative;
    width: 72px;
    height: 72px;
    align-self: start;
    margin-top: 2px;
    filter: drop-shadow(0 8px 12px rgba(196, 106, 10, 0.35));
    animation: cc-cookie-float 3.2s ease-in-out infinite;
    transform-origin: 50% 80%;
}

.cc-cookie__svg {
    display: block;
    width: 72px;
    height: 72px;
}

.cc-cookie__face {
    transform-origin: 40px 40px;
}

.cc-cookie.is-wink .cc-cookie__eye--r {
    ry: 0.6;
}

.cc-cookie__spark {
    position: absolute;
    top: 4px;
    right: 2px;
    width: 10px;
    height: 10px;
    border-radius: 2px;
    background: var(--cc-accent, #f7931b);
    transform: rotate(45deg) scale(0);
    opacity: 0;
}

.cc-cookie.is-open .cc-cookie__spark {
    animation: cc-cookie-spark 2.4s ease-in-out 0.6s infinite;
}

.cc-cookie__copy {
    grid-area: copy;
    padding-right: 24px;
    min-width: 0;
}

.cc-cookie__kicker {
    margin: 0 0 2px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--cc-accent, #f7931b);
}

.cc-cookie__title {
    margin: 0 0 6px;
    font-size: 18px;
    font-weight: 800;
    line-height: 1.25;
    letter-spacing: -0.02em;
    color: var(--cc-ink, #110b29);
}

.cc-cookie__lead {
    margin: 0;
    font-size: 13px;
    line-height: 1.45;
    color: var(--cc-muted, #6b7280);
}

.cc-cookie__prefs {
    grid-area: prefs;
    display: grid;
    gap: 8px;
    padding: 4px 0 2px;
}

.cc-cookie__prefs[hidden] {
    display: none !important;
}

.cc-cookie__prefs.is-visible {
    display: grid;
    animation: cc-cookie-prefs-in 280ms ease;
}

.cc-cookie__toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 0;
    padding: 10px 12px;
    border-radius: 14px;
    background: var(--cc-surface-2, #eff2f5);
    border: 1px solid transparent;
    cursor: pointer;
    user-select: none;
    transition: border-color 160ms ease, transform 160ms ease, background 160ms ease;
}

.cc-cookie__toggle:hover:not(.cc-cookie__toggle--locked) {
    border-color: color-mix(in srgb, var(--cc-accent, #f7931b) 40%, transparent);
    transform: translateY(-1px);
}

.cc-cookie__toggle--locked {
    cursor: default;
    opacity: 0.88;
}

.cc-cookie__toggle-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.cc-cookie__toggle-meta strong {
    font-size: 13px;
    font-weight: 700;
    color: var(--cc-ink, #110b29);
}

.cc-cookie__toggle-meta small {
    font-size: 11px;
    color: var(--cc-muted, #6b7280);
}

.cc-cookie__toggle input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
    pointer-events: none;
}

.cc-cookie__switch {
    position: relative;
    flex-shrink: 0;
    width: 42px;
    height: 24px;
    border-radius: 999px;
    background: #c5cad3;
    transition: background 180ms ease;
}

.cc-cookie__switch::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
    transition: transform 200ms cubic-bezier(0.34, 1.45, 0.64, 1);
}

.cc-cookie__toggle input:checked + .cc-cookie__switch {
    background: var(--cc-accent, #f7931b);
}

.cc-cookie__toggle input:checked + .cc-cookie__switch::after {
    transform: translateX(18px);
}

.cc-cookie__toggle--locked .cc-cookie__switch {
    background: color-mix(in srgb, var(--cc-accent, #f7931b) 55%, #c5cad3);
}

.cc-cookie__actions {
    grid-area: actions;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    align-items: center;
    margin-top: 2px;
}

.cc-cookie__policy {
    grid-column: 1 / -1;
    justify-self: start;
    font-size: 12px;
    font-weight: 600;
    color: var(--cc-muted, #6b7280);
    text-decoration: underline;
    text-underline-offset: 2px;
    order: -1;
}

.cc-cookie__policy:hover {
    color: var(--cc-accent, #f7931b);
}

.cc-cookie__btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 42px;
    padding: 10px 14px;
    border-radius: 12px;
    border: 0;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    overflow: hidden;
    transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease, color 160ms ease;
}

.cc-cookie__btn:active {
    transform: scale(0.97);
}

.cc-cookie__btn--ghost {
    grid-column: 1 / -1;
    background: transparent;
    color: var(--cc-ink, #110b29);
    border: 1px dashed color-mix(in srgb, var(--cc-accent, #f7931b) 45%, var(--cc-border, #e5e7eb));
}

.cc-cookie__btn--ghost:hover,
.cc-cookie__btn--ghost.is-active {
    background: color-mix(in srgb, var(--cc-accent, #f7931b) 10%, transparent);
    border-style: solid;
}

.cc-cookie__btn--soft {
    background: var(--cc-surface-2, #eff2f5);
    color: var(--cc-ink, #110b29);
}

.cc-cookie__btn--soft:hover {
    background: color-mix(in srgb, var(--cc-surface-2, #eff2f5) 70%, var(--cc-accent, #f7931b));
}

.cc-cookie__btn--primary {
    background: linear-gradient(135deg, #f9a54c 0%, #f7931b 55%, #e07f0f 100%);
    color: #fff;
    box-shadow: 0 8px 20px rgba(247, 147, 27, 0.35);
}

.cc-cookie__btn--primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 28px rgba(247, 147, 27, 0.42);
}

.cc-cookie__btn-crumb {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.cc-cookie__crumbs {
    position: absolute;
    inset: 0;
    overflow: visible;
    pointer-events: none;
}

.cc-cookie__crumb {
    position: absolute;
    width: 8px;
    height: 8px;
    border-radius: 50% 40% 55% 45%;
    background: var(--cc-accent, #f7931b);
    opacity: 0;
    left: 50%;
    bottom: 40%;
}

.cc-cookie.is-bursting .cc-cookie__crumb {
    animation: cc-cookie-crumb 700ms cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

@keyframes cc-cookie-float {
    0%, 100% { transform: translateY(0) rotate(-2deg); }
    50% { transform: translateY(-6px) rotate(2deg); }
}

@keyframes cc-cookie-spark {
    0%, 100% { transform: rotate(45deg) scale(0); opacity: 0; }
    40% { transform: rotate(45deg) scale(1); opacity: 1; }
    70% { transform: rotate(45deg) scale(0.6); opacity: 0.4; }
}

@keyframes cc-cookie-prefs-in {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes cc-cookie-crumb {
    0% { opacity: 1; transform: translate(0, 0) scale(1); }
    100% { opacity: 0; transform: translate(var(--dx), var(--dy)) scale(0.2); }
}

@media (min-width: 480px) {
    .cc-cookie {
        left: 24px;
        right: auto;
        bottom: max(24px, env(safe-area-inset-bottom, 0px));
    }

    .cc-cookie__actions {
        grid-template-columns: auto 1fr 1fr;
    }

    .cc-cookie__btn--ghost {
        grid-column: auto;
    }

    .cc-cookie__policy {
        grid-column: auto;
        order: 0;
        align-self: center;
    }
}

@media (max-width: 379.98px) {
    .cc-cookie__card {
        grid-template-columns: 1fr;
        grid-template-areas:
            "mascot"
            "copy"
            "prefs"
            "actions";
        justify-items: start;
    }

    .cc-cookie__mascot {
        margin: 0 auto;
    }

    .cc-cookie__copy {
        padding-right: 28px;
        text-align: left;
    }
}

@media (prefers-reduced-motion: reduce) {
    .cc-cookie__mascot,
    .cc-cookie__spark,
    .cc-cookie__card,
    .cc-cookie__prefs.is-visible,
    .cc-cookie__crumb {
        animation: none !important;
        transition: opacity 160ms ease !important;
    }

    .cc-cookie.is-open .cc-cookie__card {
        transform: none;
    }
}

[data-theme="dark"] .cc-cookie__card {
    box-shadow:
        0 18px 50px rgba(0, 0, 0, 0.45),
        0 4px 14px rgba(247, 147, 27, 0.18),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

[data-theme="dark"] .cc-cookie__switch {
    background: #4b5563;
}
