/* Cards catalogue foil preview controls. */
.foil-preview-control {
    display: grid;
    align-self: auto;
    gap: 5px;
    min-width: min(100%, 292px);
    color: var(--muted);
    font-size: .64rem;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.foil-preview-actions {
    display: grid;
    grid-template-columns: minmax(126px, auto) minmax(148px, 1fr);
    gap: 8px;
}

.toolbar .foil-preview-toggle {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 40px;
    padding: 0 13px;
    border: 1px solid var(--line);
    border-radius: 10px;
    color: var(--cream);
    background: #17120e;
    box-shadow: none;
    font: inherit;
    font-size: .68rem;
    font-weight: 900;
    letter-spacing: .04em;
    text-transform: none;
    transition: border-color .18s ease, background .18s ease, color .18s ease, box-shadow .18s ease;
}

.toolbar .foil-preview-toggle:hover,
.toolbar .foil-preview-toggle:focus-visible {
    border-color: rgba(133, 225, 255, .72);
    outline: none;
}

.foil-preview-toggle i {
    position: relative;
    width: 26px;
    height: 15px;
    flex: 0 0 auto;
    border: 1px solid rgba(255, 255, 255, .22);
    border-radius: 999px;
    background: rgba(255, 255, 255, .08);
}

.foil-preview-toggle i::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #b7aa98;
    transition: transform .18s ease, background .18s ease, box-shadow .18s ease;
}

.toolbar .foil-preview-toggle.is-active {
    border-color: rgba(125, 225, 255, .72);
    color: #fffdf8;
    background:
        linear-gradient(120deg, rgba(76, 116, 255, .28), rgba(224, 84, 255, .24) 48%, rgba(255, 200, 87, .24)),
        #17120e;
    box-shadow: 0 0 18px rgba(123, 199, 255, .15);
}

.foil-preview-toggle.is-active i {
    border-color: rgba(164, 235, 255, .62);
    background: linear-gradient(90deg, rgba(73, 137, 255, .75), rgba(224, 89, 255, .72));
}

.foil-preview-toggle.is-active i::after {
    transform: translateX(11px);
    background: #fff8d7;
    box-shadow: 0 0 8px rgba(126, 229, 255, .9);
}

.foil-preview-toggle b {
    white-space: nowrap;
}

.foil-style-picker {
    min-width: 0;
}

.toolbar .foil-style-picker select {
    width: 100%;
    min-width: 0;
}

.toolbar .foil-style-picker select:disabled {
    cursor: not-allowed;
    opacity: .48;
}

.foil-preview-control small {
    color: var(--muted);
    font-size: .56rem;
    font-weight: 650;
    letter-spacing: .025em;
    line-height: 1.25;
    text-transform: none;
}

body.cards-show-foils .website-card-shell {
    position: relative;
}

body.cards-show-foils .website-card-shell::after {
    content: '';
    position: absolute;
    inset: -2px;
    z-index: -1;
    border-radius: 20px;
    opacity: .28;
    pointer-events: none;
    background: conic-gradient(from 180deg, #79dfff, #a77cff, #ff9bdc, #ffe28b, #7fffd1, #79dfff);
    filter: blur(11px);
}

@media (max-width: 760px) {
    .foil-preview-control {
        width: 100%;
        min-width: 0;
    }

    .foil-preview-actions {
        grid-template-columns: 1fr;
    }
}

@media (prefers-reduced-motion: reduce) {
    .toolbar .foil-preview-toggle,
    .foil-preview-toggle i::after {
        transition: none;
    }
}
