/**
 * Shois Chat Button — T12 Vinyl Record Template
 *
 * Record player / music aesthetic with dark background,
 * gold accent, spinning record grooves, waveform visualizer bars,
 * and conic-gradient vinyl avatars.
 * Type: Bubble Popup
 *
 * @package ShoisChatButton
 */

/* ─── Design Tokens ─────────────────────────────────── */
.shcb-template-vinyl {
    --scb-primary: #E8C547;
    --scb-secondary: #C4A632;
    --scb-bg: #161414;
    --shcb-header-bg: #161414;
    --shcb-header-text: rgba(255,255,255,0.88);
    --scb-text: rgba(255,255,255,0.82);
    --scb-text-light: rgba(255,255,255,0.38);
    --shcb-cta-bg: #E8C547;
    --shcb-cta-text: #0A0A0A;
    --scb-shadow: 0 0 0 1px rgba(255,255,255,0.03), 0 24px 55px rgba(0,0,0,0.7);
    --scb-shadow-btn: 0 0 0 1px rgba(255,255,255,0.06), 0 6px 24px rgba(0,0,0,0.6);
    --scb-radius-btn: 50%;
    --scb-radius-popup: 4px;
    --scb-icon-color: #111111;
    --scb-font: 'Space Grotesk', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

    --_dim: rgba(255,255,255,0.08);
    --_sub: rgba(255,255,255,0.38);
}


/* ─── Trigger Button — Vinyl Record ─────────────────── */
.shcb-template-vinyl .shcb-trigger-btn {
    background:
        radial-gradient(circle at 50% 50%, transparent 0%, transparent 17%,
            rgba(26,24,24,0.6) 17%, rgba(26,24,24,0.6) 20%,
            transparent 20%, transparent 25%,
            rgba(26,24,24,0.5) 25%, rgba(26,24,24,0.5) 28%,
            transparent 28%, transparent 33%,
            rgba(26,24,24,0.4) 33%, rgba(26,24,24,0.4) 36%,
            transparent 36%),
        conic-gradient(
            rgba(40,38,38,1) 0deg, rgba(28,26,26,1) 30deg,
            rgba(40,38,38,1) 60deg, rgba(28,26,26,1) 90deg,
            rgba(40,38,38,1) 120deg, rgba(28,26,26,1) 150deg,
            rgba(40,38,38,1) 180deg, rgba(28,26,26,1) 210deg,
            rgba(40,38,38,1) 240deg, rgba(28,26,26,1) 270deg,
            rgba(40,38,38,1) 300deg, rgba(28,26,26,1) 330deg,
            rgba(40,38,38,1) 360deg
        );
    border: none;
    box-shadow: 0 0 0 1px rgba(255,255,255,0.06), 0 6px 24px rgba(0,0,0,0.6);
    animation: shcb-vinyl-spin 3s linear infinite;
    animation-play-state: paused;
}

.shcb-template-vinyl .shcb-trigger-btn:hover {
    animation-play-state: running;
}

@keyframes shcb-vinyl-spin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

/* Gold center label overlay */
.shcb-template-vinyl .shcb-trigger-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--scb-primary);
    box-shadow: 0 0 0 2px rgba(255,255,255,0.1), 0 0 12px rgba(232,197,71,0.4);
    z-index: 2;
    pointer-events: none;
}

.shcb-template-vinyl .shcb-trigger-icon {
    position: relative;
    z-index: 3;
}

.shcb-template-vinyl .shcb-trigger-icon svg {
    fill: rgba(0,0,0,0.75);
    width: 14px;
    height: 14px;
}

/* Trigger label */
.shcb-template-vinyl .shcb-trigger-label {
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 1.5px;
    color: var(--_sub);
    background: rgba(20,18,18,0.9);
    border: 1px solid var(--_dim);
    border-radius: 0;
}

/* Pulse ring — gold glow */
.shcb-template-vinyl .shcb-pulse-ring {
    border-color: rgba(232,197,71,0.12);
}


/* ─── Popup ─────────────────────────────────────────── */
.shcb-template-vinyl .shcb-popup {
    background: #161414;
    border: 1px solid var(--_dim);
    border-radius: 4px;
    box-shadow: 0 0 0 1px rgba(255,255,255,0.03), 0 24px 55px rgba(0,0,0,0.7);
}

/* Subtle gold top glow */
.shcb-template-vinyl .shcb-popup::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 4px;
    pointer-events: none;
    background: radial-gradient(ellipse 60% 40% at 50% 0%, rgba(232,197,71,0.06) 0%, transparent 60%);
    z-index: 0;
}

/* Groove scan line at top */
.shcb-template-vinyl .shcb-popup::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 20px;
    pointer-events: none;
    z-index: 1;
    border-bottom: 1px solid var(--_dim);
    background: repeating-linear-gradient(90deg,
        transparent 0px, transparent 5px,
        rgba(255,255,255,0.03) 5px, rgba(255,255,255,0.03) 6px);
    overflow: hidden;
}


/* ─── Header ────────────────────────────────────────── */
.shcb-template-vinyl .shcb-popup-header {
    background: transparent;
    border-bottom: 1px solid var(--_dim);
    position: relative;
    z-index: 2;
    padding-top: 32px;
}

/* Track number eyebrow */
.shcb-template-vinyl .shcb-header-subtitle::before {
    content: 'Track 01 — ';
    font-size: 9px;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: rgba(232,197,71,0.45);
}

.shcb-template-vinyl .shcb-header-title {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.4px;
    color: var(--scb-text);
}

.shcb-template-vinyl .shcb-header-subtitle {
    font-size: 12px;
    color: var(--_sub);
}

/* Close */
.shcb-template-vinyl .shcb-close-btn {
    border-radius: 50%;
    background: transparent;
    border: 1px solid var(--_dim);
    z-index: 3;
    transition: all 0.22s cubic-bezier(0.34,1.56,0.64,1);
}

.shcb-template-vinyl .shcb-close-btn svg {
    stroke: var(--_sub);
}

.shcb-template-vinyl .shcb-close-btn:hover {
    border-color: rgba(232,197,71,0.4);
    transform: rotate(90deg);
}

.shcb-template-vinyl .shcb-close-btn:hover svg {
    stroke: var(--scb-primary);
}


/* ─── Body ──────────────────────────────────────────── */
.shcb-template-vinyl .shcb-popup-body {
    background: #161414;
    z-index: 2;
}

/* Welcome — gold left bar */
.shcb-template-vinyl .shcb-welcome-message {
    font-size: 12.5px;
    line-height: 1.75;
    padding: 10px 12px;
    border-left: 2px solid rgba(232,197,71,0.2);
    background: rgba(255,255,255,0.02);
    border-radius: 0;
}

.shcb-template-vinyl .shcb-welcome-message p {
    color: var(--_sub);
}


/* ─── Chips ─────────────────────────────────────────── */
.shcb-template-vinyl .shcb-chip {
    background: rgba(255,255,255,0.02);
    border: 1px solid var(--_dim);
    border-radius: 0;
    color: var(--_sub);
    transition: all 0.22s ease;
}

.shcb-template-vinyl .shcb-chip:hover {
    border-color: rgba(232,197,71,0.3);
    color: var(--scb-primary);
    background: rgba(232,197,71,0.05);
}


/* ─── Agent Cards ───────────────────────────────────── */
.shcb-template-vinyl .shcb-agent-card {
    background: rgba(255,255,255,0.02);
    border: 1px solid var(--_dim);
    border-radius: 0;
    padding-right: 36px;
    position: relative;
    overflow: hidden;
    transition: border-color 0.22s, background 0.22s, transform 0.26s cubic-bezier(0.34,1.56,0.64,1);
}

/* Gold underline sweep */
.shcb-template-vinyl .shcb-agent-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 100%;
    height: 1.5px;
    background: linear-gradient(90deg, var(--scb-primary), rgba(232,197,71,0));
    transition: right 0.35s ease;
    box-shadow: 0 0 5px rgba(232,197,71,0.3);
}

/* Arrow */
.shcb-template-vinyl .shcb-agent-card::before {
    content: '›';
    position: absolute;
    right: 13px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    color: var(--_sub);
    transition: color 0.2s, transform 0.26s cubic-bezier(0.34,1.56,0.64,1);
    pointer-events: none;
    z-index: 2;
}

.shcb-template-vinyl .shcb-agent-card:hover {
    border-color: rgba(232,197,71,0.18);
    background: rgba(232,197,71,0.03);
    transform: translateX(-2px);
}

.shcb-template-vinyl .shcb-agent-card:hover::after {
    right: 0%;
}

.shcb-template-vinyl .shcb-agent-card:hover::before {
    color: var(--scb-primary);
    transform: translateY(-50%) translateX(4px);
}


/* ─── Avatar — Vinyl disc ───────────────────────────── */
.shcb-template-vinyl .shcb-agent-avatar {
    border-radius: 50%;
}

.shcb-template-vinyl .shcb-avatar-initials {
    background: conic-gradient(
        rgba(50,48,48,1) 0deg, rgba(30,28,28,1) 45deg,
        rgba(50,48,48,1) 90deg, rgba(30,28,28,1) 135deg,
        rgba(50,48,48,1) 180deg, rgba(30,28,28,1) 225deg,
        rgba(50,48,48,1) 270deg, rgba(30,28,28,1) 315deg,
        rgba(50,48,48,1) 360deg
    );
    border: 1px solid rgba(255,255,255,0.06);
    color: transparent;
    border-radius: 50%;
    position: relative;
    overflow: hidden;
    animation: shcb-vinyl-av-spin 5s linear infinite;
}

/* Gold center label on avatar */
.shcb-template-vinyl .shcb-avatar-initials::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--scb-primary);
    box-shadow: 0 0 8px rgba(232,197,71,0.3);
    z-index: 1;
}

@keyframes shcb-vinyl-av-spin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

.shcb-template-vinyl .shcb-agent-card:hover .shcb-avatar-initials {
    animation-play-state: paused;
    box-shadow: 0 0 14px rgba(232,197,71,0.15);
}


/* ─── Agent Info ────────────────────────────────────── */
.shcb-template-vinyl .shcb-agent-name {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--scb-text);
    transition: color 0.2s;
}

.shcb-template-vinyl .shcb-agent-card:hover .shcb-agent-name {
    color: rgba(232,197,71,0.9);
}

.shcb-template-vinyl .shcb-agent-status {
    font-size: 10px;
    letter-spacing: 0.5px;
    color: var(--_sub);
}

.shcb-template-vinyl .shcb-agent-status:has(.shcb-status-online) {
    color: rgba(232,197,71,0.45);
}

.shcb-template-vinyl .shcb-status-online {
    background: #4ade80;
    animation: shcb-vinyl-dp 2s ease-in-out infinite;
}

@keyframes shcb-vinyl-dp {
    0%, 100% { opacity: 1; }
    50%      { opacity: 0.1; }
}

.shcb-template-vinyl .shcb-status-offline {
    background: rgba(255,255,255,0.15);
}


/* ─── Footer ────────────────────────────────────────── */
.shcb-template-vinyl .shcb-popup-footer {
    border-top: 1px solid var(--_dim);
    z-index: 2;
}

.shcb-template-vinyl .shcb-powered-by {
    font-size: 9.5px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--_sub);
}

.shcb-template-vinyl .shcb-powered-by a {
    color: rgba(232,197,71,0.4);
}


/* ─── Badge ─────────────────────────────────────────── */
.shcb-template-vinyl .shcb-badge {
    background: var(--scb-primary);
    color: #0A0A0A;
    font-weight: 700;
}


/* ─── Stagger Entry ─────────────────────────────────── */
.shcb-template-vinyl .shcb-popup.shcb-popup-visible .shcb-welcome-message {
    animation: shcb-vinyl-fi 0.4s ease 0.05s both;
}
.shcb-template-vinyl .shcb-popup.shcb-popup-visible .shcb-chips {
    animation: shcb-vinyl-fi 0.4s ease 0.1s both;
}
.shcb-template-vinyl .shcb-popup.shcb-popup-visible .shcb-agent-card:nth-child(1) {
    animation: shcb-vinyl-fi 0.4s ease 0.15s both;
}
.shcb-template-vinyl .shcb-popup.shcb-popup-visible .shcb-agent-card:nth-child(2) {
    animation: shcb-vinyl-fi 0.4s ease 0.23s both;
}
.shcb-template-vinyl .shcb-popup.shcb-popup-visible .shcb-agent-card:nth-child(3) {
    animation: shcb-vinyl-fi 0.4s ease 0.31s both;
}
.shcb-template-vinyl .shcb-popup.shcb-popup-visible .shcb-popup-footer {
    animation: shcb-vinyl-fi 0.4s ease 0.31s both;
}

@keyframes shcb-vinyl-fi {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: none; }
}


/* ─── Reduced Motion ────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    .shcb-template-vinyl .shcb-trigger-btn,
    .shcb-template-vinyl .shcb-avatar-initials {
        animation: none;
    }
    .shcb-template-vinyl .shcb-status-online {
        animation: none;
    }
    .shcb-template-vinyl .shcb-popup.shcb-popup-visible .shcb-welcome-message,
    .shcb-template-vinyl .shcb-popup.shcb-popup-visible .shcb-chips,
    .shcb-template-vinyl .shcb-popup.shcb-popup-visible .shcb-agent-card,
    .shcb-template-vinyl .shcb-popup.shcb-popup-visible .shcb-popup-footer {
        animation: none;
    }
}
