/**
 * Shois Chat Button — T10 Ink Drop Template
 *
 * Monochrome ink-on-paper aesthetic. Pure black and white.
 * Zero color — serif italic headers, ink bleed effects, and
 * minimal paper texture.
 * Type: Bubble Popup
 *
 * @package ShoisChatButton
 */

/* ─── Design Tokens ─────────────────────────────────── */
.shcb-template-ink {
    --scb-primary: #111111;
    --scb-secondary: #333333;
    --scb-bg: #F9F7F4;
    --shcb-header-bg: #F9F7F4;
    --shcb-header-text: #111111;
    --scb-text: #111111;
    --scb-text-light: rgba(17, 17, 17, 0.45);
    --shcb-cta-bg: #111111;
    --shcb-cta-text: #F9F7F4;
    --scb-shadow: 0 4px 0 rgba(17,17,17,0.04), 0 12px 40px rgba(17,17,17,0.1);
    --scb-shadow-btn: 0 2px 8px rgba(17,17,17,0.2), 0 6px 20px rgba(17,17,17,0.1);
    --scb-radius-btn: 50%;
    --scb-radius-popup: 3px;
    --scb-icon-color: #ffffff;
    --scb-font: 'Source Code Pro', 'SF Mono', Consolas, monospace;

    --_mist: rgba(17,17,17,0.08);
    --_fog: rgba(17,17,17,0.04);
    --_mid: rgba(17,17,17,0.45);
    --_sub: rgba(17,17,17,0.28);
}


/* ─── Trigger Button — Ink Circle ───────────────────── */
.shcb-template-ink .shcb-trigger-btn {
    background: var(--scb-primary);
    border: none;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(17,17,17,0.2), 0 6px 20px rgba(17,17,17,0.1);
    transition: box-shadow 0.3s ease, transform 0.3s cubic-bezier(0.34,1.56,0.64,1);
    overflow: hidden;
}

/* Ink surface sheen */
.shcb-template-ink .shcb-trigger-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: radial-gradient(circle at 38% 32%, rgba(255,255,255,0.14) 0%, transparent 52%);
    pointer-events: none;
}

.shcb-template-ink .shcb-trigger-btn:hover {
    box-shadow: 0 4px 14px rgba(17,17,17,0.3), 0 10px 30px rgba(17,17,17,0.15);
    transform: scale(1.07);
}

.shcb-template-ink .shcb-trigger-btn:active {
    transform: scale(0.94);
}

.shcb-template-ink .shcb-trigger-icon svg {
    fill: white;
}

/* Trigger label — clean paper */
.shcb-template-ink .shcb-trigger-label {
    font-size: 10px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--_mid);
    background: #F9F7F4;
    border: 1px solid var(--_mist);
    border-radius: 0;
}

/* Pulse ring — ink spread */
.shcb-template-ink .shcb-pulse-ring {
    border-color: rgba(17,17,17,0.12);
}


/* ─── Popup ─────────────────────────────────────────── */
.shcb-template-ink .shcb-popup {
    background: #F9F7F4;
    border: 1px solid var(--_mist);
    border-radius: 3px;
    box-shadow: 0 4px 0 rgba(17,17,17,0.04), 0 12px 40px rgba(17,17,17,0.1);
}


/* ─── Header — Ink Bleed ────────────────────────────── */
.shcb-template-ink .shcb-popup-header {
    background: transparent;
    border-bottom: 1px solid var(--_mist);
    position: relative;
    overflow: hidden;
    padding: 18px 17px 16px;
}

/* Ink bleed — blurred dark circle */
.shcb-template-ink .shcb-popup-header::before {
    content: '';
    position: absolute;
    top: -30px;
    left: -20px;
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: var(--scb-primary);
    opacity: 0.05;
    animation: shcb-ink-bleed-breathe 6s ease-in-out infinite;
    filter: blur(28px);
    pointer-events: none;
}

@keyframes shcb-ink-bleed-breathe {
    0%, 100% { transform: scale(0.85); opacity: 0.04; }
    50%      { transform: scale(1.1);  opacity: 0.08; }
}

.shcb-template-ink .shcb-header-title {
    font-family: 'Playfair Display', 'Georgia', 'Times New Roman', serif;
    font-style: italic;
    font-weight: 400;
    font-size: 21px;
    color: var(--scb-text);
    letter-spacing: 0.2px;
}

.shcb-template-ink .shcb-header-subtitle {
    font-size: 11px;
    color: var(--_sub);
    letter-spacing: 0.3px;
}

/* Status indicator before subtitle */
.shcb-template-ink .shcb-header-subtitle::before {
    content: '● ';
    font-size: 6px;
    vertical-align: middle;
    animation: shcb-ink-dp 2s ease-in-out infinite;
}

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

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

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

.shcb-template-ink .shcb-close-btn:hover {
    border-color: var(--scb-primary);
    transform: rotate(90deg);
}

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


/* ─── Body ──────────────────────────────────────────── */
.shcb-template-ink .shcb-popup-body {
    background: #F9F7F4;
}

/* Welcome — ink left bar */
.shcb-template-ink .shcb-welcome-message {
    font-size: 12px;
    line-height: 1.8;
    padding: 10px 13px;
    border-left: 2px solid rgba(17,17,17,0.15);
    background: var(--_fog);
    border-radius: 0;
}

.shcb-template-ink .shcb-welcome-message p {
    color: var(--_mid);
}


/* ─── Chips ─────────────────────────────────────────── */
.shcb-template-ink .shcb-chip {
    background: transparent;
    border: 1px solid var(--_mist);
    border-radius: 0;
    color: var(--_mid);
    font-size: 11px;
    letter-spacing: 1px;
    transition: all 0.2s ease;
}

.shcb-template-ink .shcb-chip:hover {
    border-color: var(--scb-primary);
    color: var(--scb-primary);
}


/* ─── Agent Cards — Ink Fill ────────────────────────── */
.shcb-template-ink .shcb-agent-card {
    background: transparent;
    border: 1px solid var(--_mist);
    border-radius: 0;
    padding-right: 36px;
    position: relative;
    overflow: hidden;
    transition: border-color 0.2s, background 0.2s, transform 0.25s cubic-bezier(0.34,1.56,0.64,1);
}

/* Ink fill from left on hover */
.shcb-template-ink .shcb-agent-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--_fog);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.35s ease;
    z-index: 0;
}

/* Left ink bar */
.shcb-template-ink .shcb-agent-card::after {
    content: '';
    position: absolute;
    left: 0;
    top: 20%;
    bottom: 20%;
    width: 2px;
    background: var(--scb-primary);
    opacity: 0;
    transition: opacity 0.25s ease;
    z-index: 1;
}

.shcb-template-ink .shcb-agent-card:hover {
    border-color: rgba(17,17,17,0.18);
    transform: translateX(-2px);
}

.shcb-template-ink .shcb-agent-card:hover::before {
    transform: scaleX(1);
}

.shcb-template-ink .shcb-agent-card:hover::after {
    opacity: 1;
}


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

.shcb-template-ink .shcb-avatar-initials {
    background: var(--scb-primary);
    color: white;
    font-family: 'Playfair Display', Georgia, serif;
    font-style: italic;
    font-size: 15px;
    border-radius: 50%;
    position: relative;
    z-index: 1;
}

.shcb-template-ink .shcb-agent-card:hover .shcb-agent-avatar {
    transform: scale(1.07);
}


/* ─── Agent Info ────────────────────────────────────── */
.shcb-template-ink .shcb-agent-name {
    font-size: 13px;
    font-weight: 700;
    color: var(--scb-primary);
    position: relative;
    z-index: 1;
}

.shcb-template-ink .shcb-agent-status {
    font-size: 10px;
    letter-spacing: 0.5px;
    color: var(--_sub);
    position: relative;
    z-index: 1;
}

.shcb-template-ink .shcb-status-online {
    background: #16a34a;
    animation: shcb-ink-dp 2s ease-in-out infinite;
}

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


/* ─── Footer ────────────────────────────────────────── */
.shcb-template-ink .shcb-popup-footer {
    border-top: 1px solid var(--_mist);
}

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


/* ─── Badge ─────────────────────────────────────────── */
.shcb-template-ink .shcb-badge {
    background: var(--scb-primary);
    color: white;
    border-radius: 50%;
}


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

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


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