<?php
/**
 * Chat CSS — Break Banner Styles
 * Break-specific subdued dark theme. Banners slide in from top of chat area.
 *
 * @package ConfidenceTalk
 */

/* ============================================================
   AGENT BREAK BANNER
   ============================================================ */

.ct-break-banner {
    display: none;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border-bottom: 1px solid #2d2d44;
    padding: 14px 20px;
    margin: 0;
    border-radius: 8px 8px 0 0;
    position: relative;
    z-index: 50;
}

.ct-break-banner.active {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.ct-break-banner-icon {
    font-size: 28px;
    line-height: 1;
    flex-shrink: 0;
    margin-top: 2px;
}

.ct-break-banner-body {
    flex: 1;
    min-width: 0;
}

.ct-break-banner-agent-name {
    font-size: 11px;
    font-weight: 600;
    color: #586380;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}

.ct-break-banner-message {
    font-size: 13px;
    color: #a0aec0;
    line-height: 1.5;
    margin-bottom: 6px;
}

.ct-break-banner-timer {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 16px;
    font-weight: 700;
    color: #e2e8f0;
    background: rgba(255, 255, 255, 0.06);
    padding: 4px 12px;
    border-radius: 6px;
    letter-spacing: 2px;
}

.ct-break-banner-timer .ct-break-timer-label {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 11px;
    font-weight: 400;
    color: #718096;
    letter-spacing: 0;
}

.ct-break-banner-timer.urgent {
    color: #fc8181;
}

.ct-break-banner-dismiss {
    background: none;
    border: 1px solid #2d2d44;
    color: #718096;
    font-size: 11px;
    padding: 4px 10px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
    margin-top: 2px;
}

.ct-break-banner-dismiss:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #a0aec0;
}

/* Chat input disabled state when break is active */
.ct-chat-input.disabled {
    opacity: 0.4;
    pointer-events: none;
}

.ct-chat-input.disabled textarea {
    cursor: not-allowed;
}

/* Break type colors — subtle icon glow */
.ct-break-banner[data-break-type="stamina"] .ct-break-banner-icon {
    filter: drop-shadow(0 0 4px rgba(252, 129, 129, 0.3));
}

.ct-break-banner[data-break-type="prayer"] .ct-break-banner-icon {
    filter: drop-shadow(0 0 4px rgba(154, 209, 154, 0.3));
}

.ct-break-banner[data-break-type="timezone"] .ct-break-banner-icon {
    filter: drop-shadow(0 0 4px rgba(147, 197, 253, 0.3));
}

.ct-break-banner[data-break-type="role"] .ct-break-banner-icon {
    filter: drop-shadow(0 0 4px rgba(234, 179, 8, 0.3));
}

.ct-break-banner[data-break-type="sunday_service"] .ct-break-banner-icon,
.ct-break-banner[data-break-type="christian_holiday"] .ct-break-banner-icon {
    filter: drop-shadow(0 0 4px rgba(252, 211, 77, 0.3));
}

.ct-break-banner[data-break-type="shabbat"] .ct-break-banner-icon,
.ct-break-banner[data-break-type="jewish_holiday"] .ct-break-banner-icon {
    filter: drop-shadow(0 0 4px rgba(147, 197, 253, 0.3));
}

.ct-break-banner[data-break-type="hindu_festival"] .ct-break-banner-icon {
    filter: drop-shadow(0 0 4px rgba(239, 68, 68, 0.3));
}

.ct-break-banner[data-break-type="buddhist_observance"] .ct-break-banner-icon {
    filter: drop-shadow(0 0 4px rgba(251, 191, 36, 0.3));
}

.ct-break-banner[data-break-type="sikh_prayer"] .ct-break-banner-icon,
.ct-break-banner[data-break-type="sikh_festival"] .ct-break-banner-icon {
    filter: drop-shadow(0 0 4px rgba(245, 158, 11, 0.3));
}

/* Responsive: full width on mobile */
@media screen and (max-width: 768px) {
    .ct-break-banner.active {
        padding: 12px 14px;
        gap: 10px;
    }

    .ct-break-banner-icon {
        font-size: 22px;
    }

    .ct-break-banner-message {
        font-size: 12px;
    }

    .ct-break-banner-timer {
        font-size: 14px;
    }
}

/* Responsive: extra-tight phones */
@media screen and (max-width: 480px) {
    .ct-break-panel {
        padding: 12px 14px;
        gap: 10px;
    }

    .ct-break-panel-timer {
        font-size: 12px;
    }

    .ct-break-banner-timer {
        font-size: 13px;
        padding: 3px 8px;
        letter-spacing: 1px;
    }
}

/* ============================================================
   CONVERSATIONAL BREAK (Permission Request Bubble)
   ============================================================ */

.ct-break-panel {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border: 1px solid rgba(205, 133, 63, 0.2);
    border-radius: 12px;
    padding: 16px 18px;
    margin: 12px auto;
    max-width: 520px;
}

.ct-break-panel-icon {
    font-size: 26px;
    line-height: 1;
    filter: drop-shadow(0 0 6px rgba(251, 191, 36, 0.25));
}

.ct-break-panel-body {
    flex: 1;
}

.ct-break-panel-title {
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 4px;
}

.ct-break-panel-subtitle {
    color: rgba(255, 255, 255, 0.6);
    font-size: 12px;
    line-height: 1.5;
    margin-bottom: 8px;
}

.ct-break-panel-timer {
    color: #CD853F;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 6px;
}

.ct-break-timer-value {
    font-variant-numeric: tabular-nums;
}

.ct-break-panel-actions .ct-btn {
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.ct-break-panel-actions .ct-btn:hover {
    transform: translateY(-1px);
}

/* Hidden speak button on the request bubble */
.ct-hidden {
    display: none !important;
}

/* Graceful "agent is resting" dim state */
.ct-chat-sleeping {
    position: relative;
}

.ct-chat-sleeping #ct-messages::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(10, 14, 24, 0.35);
    pointer-events: none;
    z-index: 5;
    transition: background 0.5s ease;
}

/* ====================================================================== */
/* PHASE 1: VOICE-FIRST DASHBOARD CHAT                                   */
/* Hands-free (Auto) is now the default; voice is the primary control,    */
/* type stays available but is visually secondary.                        */
/* ====================================================================== */
.ct-chat-state {
    display: none;
    position: absolute;
    left: 12px;
    top: -24px;
    padding: 3px 10px;
    font-size: 11px;
    line-height: 1.4;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.38);
    color: rgba(255, 255, 255, 0.88);
    letter-spacing: 0.2px;
    white-space: nowrap;
    pointer-events: none;
    z-index: 6;
}
.ct-chat-container.ct-mode-listen .ct-chat-state {
    display: inline-block;
}
#ct-chat-form {
    position: relative;
}
/* In hands-free, the agent submits on silence — dim the send button so it
   reads as secondary (it still works, and reappears when the user types). */
.ct-chat-container.ct-mode-listen #ct-send-btn {
    opacity: 0.5;
}
/* Ambient talk button in hands-free: icon only, no "Hold to talk" label. */
.ct-chat-container.ct-mode-listen .ct-voice-btn .ct-voice-label,
.ct-chat-container.ct-mode-listen .ct-voice-btn .ct-voice-timer {
    display: none;
}


