/**
 * Shois Chat Button — T08 Sticker Board Template
 *
 * Handcrafted sticker aesthetic with thick borders, hard shadows,
 * washi tape accents, slight rotations, and notebook-paper feel.
 * Type: Bubble Popup
 *
 * @package ShoisChatButton
 */

/* ─── Design Tokens ─────────────────────────────────── */
.shcb-template-sticker-board {
    --scb-primary: #FFE566;
    --scb-secondary: #FF6B9D;
    --scb-bg: #FFFEF7;
    --shcb-header-bg: #FFE566;
    --shcb-header-text: #1A1A2E;
    --scb-text: #1A1A2E;
    --scb-text-light: rgba(26, 26, 46, 0.55);
    --shcb-cta-bg: #4ECDC4;
    --shcb-cta-text: #1A1A2E;
    --scb-shadow: 6px 6px 0px #1A1A2E;
    --scb-shadow-btn: 4px 4px 0px #1A1A2E;
    --scb-radius-btn: 16px;
    --scb-radius-popup: 0px;
    --scb-font: 'Nunito', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

    --_ink: #1A1A2E;
    --_yellow: #FFE566;
    --_pink: #FF6B9D;
    --_mint: #4ECDC4;
    --_border: 2.5px solid #1A1A2E;
}


/* ─── Trigger Button — Chunky Sticker ───────────────── */
.shcb-template-sticker-board .shcb-trigger-btn {
    background: var(--_yellow);
    border: 2.5px solid var(--_ink);
    border-radius: 16px;
    box-shadow: 4px 4px 0px var(--_ink);
    transform: rotate(6deg);
    transition: box-shadow 0.15s ease, transform 0.3s cubic-bezier(0.34,1.56,0.64,1);
    overflow: hidden;
}

/* Paper gloss */
.shcb-template-sticker-board .shcb-trigger-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.4) 0%, transparent 50%);
    pointer-events: none;
    border-radius: inherit;
}

.shcb-template-sticker-board .shcb-trigger-btn:hover {
    transform: rotate(0deg) scale(1.08);
    box-shadow: 5px 5px 0px var(--_ink);
}

.shcb-template-sticker-board .shcb-trigger-btn:active {
    transform: rotate(3deg) scale(0.94);
    box-shadow: 2px 2px 0px var(--_ink);
}

.shcb-template-sticker-board .shcb-trigger-icon svg {
    fill: var(--_ink);
}

/* Trigger label — mint sticker */
.shcb-template-sticker-board .shcb-trigger-label {
    font-weight: 900;
    color: var(--_ink);
    background: var(--_mint);
    border: 2.5px solid var(--_ink);
    box-shadow: 3px 3px 0 var(--_ink);
    border-radius: 0;
    transform: rotate(-2deg);
}

/* Pulse ring — thick outline */
.shcb-template-sticker-board .shcb-pulse-ring {
    border: 2px solid rgba(255,229,102,0.5);
    border-radius: 20px;
}


/* ─── Popup — Paper Sticker ─────────────────────────── */
.shcb-template-sticker-board .shcb-popup {
    background: var(--scb-bg);
    border: 2.5px solid var(--_ink);
    border-radius: 0;
    box-shadow: 6px 6px 0px var(--_ink);
}

/* Washi tape decorations on popup */
.shcb-template-sticker-board .shcb-popup::before {
    content: '';
    position: absolute;
    top: -11px;
    left: 28px;
    width: 48px;
    height: 18px;
    background: rgba(78,205,196,0.7);
    border: 1.5px solid rgba(26,26,46,0.3);
    border-radius: 2px;
    transform: rotate(-1.5deg);
    z-index: 5;
    pointer-events: none;
}

.shcb-template-sticker-board .shcb-popup::after {
    content: '';
    position: absolute;
    top: -11px;
    right: 40px;
    width: 38px;
    height: 18px;
    background: rgba(255,107,157,0.6);
    border: 1.5px solid rgba(26,26,46,0.25);
    border-radius: 2px;
    transform: rotate(2deg);
    z-index: 5;
    pointer-events: none;
}


/* ─── Header — Yellow Band ──────────────────────────── */
.shcb-template-sticker-board .shcb-popup-header {
    background: var(--_yellow);
    border-bottom: 2.5px solid var(--_ink);
    border-radius: 0;
    padding: 18px 18px 16px;
}

.shcb-template-sticker-board .shcb-header-title {
    font-family: 'Permanent Marker', 'Comic Sans MS', cursive, sans-serif;
    font-size: 22px;
    font-weight: 900;
    color: var(--_ink);
}

.shcb-template-sticker-board .shcb-header-subtitle {
    font-size: 12px;
    font-weight: 700;
    color: rgba(26,26,46,0.55);
}

/* Close — dark circle */
.shcb-template-sticker-board .shcb-close-btn {
    border-radius: 50%;
    background: var(--_ink);
    border: none;
    transition: transform 0.2s cubic-bezier(0.34,1.56,0.64,1);
}

.shcb-template-sticker-board .shcb-close-btn svg {
    stroke: var(--_yellow);
}

.shcb-template-sticker-board .shcb-close-btn:hover {
    transform: rotate(90deg) scale(1.1);
}


/* ─── Body ──────────────────────────────────────────── */
.shcb-template-sticker-board .shcb-popup-body {
    background: var(--scb-bg);
}

/* Welcome message — mint left accent */
.shcb-template-sticker-board .shcb-welcome-message {
    font-size: 12.5px;
    line-height: 1.7;
    font-weight: 700;
    padding: 11px 13px;
    background: var(--scb-bg);
    border: 2px solid rgba(26,26,46,0.12);
    border-left: 4px solid var(--_mint);
    border-radius: 0 6px 6px 0;
}

.shcb-template-sticker-board .shcb-welcome-message p {
    color: rgba(26,26,46,0.55);
}


/* ─── Chips ─────────────────────────────────────────── */
.shcb-template-sticker-board .shcb-chip {
    background: var(--_yellow);
    border: 2px solid var(--_ink);
    box-shadow: 2px 2px 0 var(--_ink);
    color: var(--_ink);
    font-weight: 900;
    border-radius: 0;
    transition: transform 0.2s cubic-bezier(0.34,1.56,0.64,1), box-shadow 0.15s ease;
}

.shcb-template-sticker-board .shcb-chip:hover {
    transform: translateY(-2px);
    box-shadow: 3px 3px 0 var(--_ink);
}


/* ─── Agent Cards — Sticker Style ───────────────────── */
.shcb-template-sticker-board .shcb-agent-card {
    background: white;
    border: 2.5px solid var(--_ink);
    border-radius: 0;
    box-shadow: 3px 3px 0 var(--_ink);
    position: relative;
    overflow: hidden;
    transform: rotate(-0.5deg);
    transition: transform 0.2s cubic-bezier(0.34,1.56,0.64,1), box-shadow 0.15s ease;
}

.shcb-template-sticker-board .shcb-agent-card:nth-child(even) {
    transform: rotate(0.5deg);
}

/* Color stripe on left */
.shcb-template-sticker-board .shcb-agent-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 5px;
    background: var(--_mint);
}

.shcb-template-sticker-board .shcb-agent-card:nth-child(even)::before {
    background: var(--_pink);
}

.shcb-template-sticker-board .shcb-agent-card:hover {
    transform: rotate(0deg) translateY(-3px) scale(1.01) !important;
    box-shadow: 5px 5px 0 var(--_ink);
}

.shcb-template-sticker-board .shcb-agent-card:active {
    transform: rotate(0deg) translateY(0) scale(0.99) !important;
    box-shadow: 2px 2px 0 var(--_ink);
}


/* ─── Avatar — Bold circle ──────────────────────────── */
.shcb-template-sticker-board .shcb-agent-avatar {
    border-radius: 50%;
}

.shcb-template-sticker-board .shcb-avatar-initials {
    border: 2.5px solid var(--_ink);
    background: var(--_yellow);
    color: var(--_ink);
    font-weight: 900;
    font-size: 17px;
    box-shadow: 2px 2px 0 var(--_ink);
    border-radius: 50%;
}

.shcb-template-sticker-board .shcb-agent-card:nth-child(even) .shcb-avatar-initials {
    background: color-mix(in srgb, var(--_pink) 20%, white);
}

.shcb-template-sticker-board .shcb-agent-card:hover .shcb-agent-avatar {
    transform: rotate(-8deg) scale(1.1);
}


/* ─── Agent Info ────────────────────────────────────── */
.shcb-template-sticker-board .shcb-agent-name {
    font-size: 14px;
    font-weight: 900;
    color: var(--_ink);
}

.shcb-template-sticker-board .shcb-agent-status {
    font-size: 11px;
    font-weight: 800;
    color: rgba(26,26,46,0.4);
}

.shcb-template-sticker-board .shcb-agent-status:has(.shcb-status-online) {
    color: var(--_mint);
}

.shcb-template-sticker-board .shcb-status-online {
    background: var(--_mint);
    border: 1.5px solid var(--_ink);
    animation: shcb-sb-dot-bop 1.5s ease-in-out infinite;
}

@keyframes shcb-sb-dot-bop {
    0%, 100% { transform: scale(1); }
    50%      { transform: scale(0.5); }
}

.shcb-template-sticker-board .shcb-status-offline {
    background: rgba(26,26,46,0.15);
    border: 1.5px solid var(--_ink);
}


/* ─── Platform Buttons ──────────────────────────────── */
.shcb-template-sticker-board .shcb-platform-btn {
    border: 2px solid var(--_ink);
    border-radius: 50%;
    box-shadow: 2px 2px 0 var(--_ink);
    transition: transform 0.2s cubic-bezier(0.34,1.56,0.64,1), box-shadow 0.15s;
}

.shcb-template-sticker-board .shcb-platform-btn:hover {
    transform: scale(1.12) rotate(-5deg);
    box-shadow: 3px 3px 0 var(--_ink);
}


/* ─── Footer ────────────────────────────────────────── */
.shcb-template-sticker-board .shcb-popup-footer {
    background: var(--scb-bg);
    border-top: 2px solid rgba(26,26,46,0.1);
}

.shcb-template-sticker-board .shcb-powered-by {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: rgba(26,26,46,0.3);
}


/* ─── Badge ─────────────────────────────────────────── */
.shcb-template-sticker-board .shcb-badge {
    background: var(--_pink);
    color: #fff;
    font-weight: 900;
    border: 2px solid var(--_ink);
    box-shadow: 2px 2px 0 var(--_ink);
    border-radius: 50%;
}


/* ─── Stagger Entry ─────────────────────────────────── */
.shcb-template-sticker-board .shcb-popup.shcb-popup-visible .shcb-welcome-message {
    animation: shcb-sb-sticker-in 0.4s cubic-bezier(0.34,1.56,0.64,1) 0.05s both;
}
.shcb-template-sticker-board .shcb-popup.shcb-popup-visible .shcb-chips {
    animation: shcb-sb-sticker-in 0.4s cubic-bezier(0.34,1.56,0.64,1) 0.10s both;
}
.shcb-template-sticker-board .shcb-popup.shcb-popup-visible .shcb-agent-card:nth-child(1) {
    animation: shcb-sb-sticker-in 0.4s cubic-bezier(0.34,1.56,0.64,1) 0.15s both;
}
.shcb-template-sticker-board .shcb-popup.shcb-popup-visible .shcb-agent-card:nth-child(2) {
    animation: shcb-sb-sticker-in 0.4s cubic-bezier(0.34,1.56,0.64,1) 0.22s both;
}
.shcb-template-sticker-board .shcb-popup.shcb-popup-visible .shcb-agent-card:nth-child(3) {
    animation: shcb-sb-sticker-in 0.4s cubic-bezier(0.34,1.56,0.64,1) 0.29s both;
}
.shcb-template-sticker-board .shcb-popup.shcb-popup-visible .shcb-popup-footer {
    animation: shcb-sb-sticker-in 0.4s cubic-bezier(0.34,1.56,0.64,1) 0.30s both;
}

@keyframes shcb-sb-sticker-in {
    from { opacity: 0; transform: rotate(-2deg) scale(0.9) translateY(12px); }
    to   { opacity: 1; transform: rotate(-0.5deg) scale(1) translateY(0); }
}


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