/* 2HEX Live — presence, calls, chat */

.hex-live-pulse-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #34bfa3;
    margin-right: 8px;
    animation: hex-live-pulse 1.5s ease-in-out infinite;
    vertical-align: middle;
}

@keyframes hex-live-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.85); }
}

.hex-live-availability-bar__inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
    justify-content: space-between;
}

.hex-live-availability-bar__admins {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 20px;
    flex: 1;
}

.hex-live-admin-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    font-size: 13px;
}

.hex-live-admin-row__name {
    font-weight: 600;
    min-width: 100px;
}

.hex-live-badge {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 999px;
    font-weight: 600;
}

.hex-live-badge--online { background: #e8fff8; color: #0abb87; }
.hex-live-badge--offline { background: #f4f5f8; color: #959cb6; }
.hex-live-badge--available { background: #e8fff8; color: #0abb87; }

.hex-live-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    margin: 0;
    user-select: none;
}

.hex-live-toggle input { display: none; }

.hex-live-toggle__slider {
    width: 42px;
    height: 22px;
    background: #ccc;
    border-radius: 22px;
    position: relative;
    transition: background 0.2s;
}

.hex-live-toggle__slider::after {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    background: #fff;
    border-radius: 50%;
    top: 2px;
    left: 2px;
    transition: transform 0.2s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.hex-live-toggle input:checked + .hex-live-toggle__slider {
    background: #34bfa3;
}

.hex-live-toggle input:checked + .hex-live-toggle__slider::after {
    transform: translateX(20px);
}

.hex-live-toggle__label {
    font-size: 12px;
    color: #575962;
}

/* Visitor sticky call button (right sidebar, below Feedback) */
.hex-live-sticky-call-slot {
    width: 100%;
}

.hex-live-sticky-call-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 45px;
    border: none;
    padding: 0;
    background: #0abb87;
    color: #fff;
    border-radius: 0 0 0 6px;
    border-top: 1px solid #fff;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
}

.hex-live-sticky-call-btn:hover {
    background: #089f72;
    color: #fff;
}

.sticky-div--has-live-call {
    height: auto;
    min-height: 202px;
}

.sticky-div .feedback-btn.feedback-btn--stacked {
    border-radius: 0 !important;
}

.sticky-div .sticky-contact-btn.sticky-contact-btn--stacked {
    border-radius: 0 !important;
}

/* Legacy floating bar — unused; chat panel only */
#hex-live-visitor-root {
    position: fixed;
    right: 76px;
    bottom: 16px;
    z-index: 99989;
}

.hex-live-visitor-bar {
    position: fixed;
    right: 16px;
    bottom: 80px;
    z-index: 99990;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
    font-family: Poppins, Roboto, sans-serif;
}

.hex-live-online-banner {
    display: none !important;
}

.hex-live-call-btn {
    display: none !important;
}

/* Chat panel (visitor) */
.hex-live-chat-panel {
    width: 300px;
    max-width: calc(100vw - 32px);
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.18);
    overflow: hidden;
    border: 1px solid #e8e8e8;
}

.hex-live-chat-panel__header {
    background: #2c2c2c;
    color: #fff;
    padding: 10px 14px;
    font-size: 13px;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.hex-live-chat-messages {
    height: 220px;
    overflow-y: auto;
    padding: 12px;
    background: #f9f9f9;
    font-size: 13px;
}

.hex-live-chat-msg {
    margin-bottom: 8px;
    max-width: 85%;
    padding: 8px 10px;
    border-radius: 10px;
    line-height: 1.4;
    word-break: break-word;
}

.hex-live-chat-msg--admin {
    background: #fff;
    border: 1px solid #e0e0e0;
    margin-right: auto;
}

.hex-live-chat-msg--visitor {
    background: #EB5A4A;
    color: #fff;
    margin-left: auto;
}

.hex-live-chat-form {
    display: flex;
    gap: 8px;
    padding: 10px;
    border-top: 1px solid #eee;
    background: #fff;
}

.hex-live-chat-form input[type="text"] {
    flex: 1;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 8px 10px;
    font-size: 13px;
}

/* iPhone-style call screen */
.hex-live-call-overlay {
    position: fixed;
    inset: 0;
    z-index: 100060;
    background: linear-gradient(180deg, #1c2836 0%, #0b1018 45%, #06080d 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    padding: 48px 24px 56px;
    color: #fff;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, sans-serif;
}

.hex-live-ios-call__top {
    text-align: center;
    width: 100%;
    max-width: 360px;
}

.hex-live-ios-call__status {
    margin: 0 0 10px;
    font-size: 15px;
    font-weight: 400;
    color: rgba(255,255,255,0.72);
    letter-spacing: 0.02em;
}

.hex-live-ios-call__avatar {
    width: 88px;
    height: 88px;
    margin: 0 auto 18px;
    border-radius: 50%;
    background: linear-gradient(145deg, #3a4d63, #243040);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: 600;
    color: #fff;
    box-shadow: 0 8px 24px rgba(0,0,0,0.35);
}

.hex-live-ios-call__name {
    margin: 0 0 8px;
    font-size: 32px;
    font-weight: 300;
    letter-spacing: -0.02em;
}

.hex-live-ios-call__subtitle {
    margin: 0;
    font-size: 15px;
    line-height: 1.45;
    color: rgba(255,255,255,0.72);
}

.hex-live-ios-notice {
    margin-top: 18px;
    padding: 14px 16px;
    border-radius: 14px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.1);
    text-align: left;
    font-size: 14px;
    line-height: 1.5;
    color: rgba(255,255,255,0.88);
}

.hex-live-ios-notice a {
    color: #7ec8ff;
    text-decoration: underline;
    font-weight: 600;
}

.hex-live-ios-call__timer {
    margin-top: 14px;
    font-size: 18px;
    font-weight: 300;
    font-variant-numeric: tabular-nums;
    color: rgba(255,255,255,0.85);
}

.hex-live-ios-call__bottom {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 48px;
    width: 100%;
    max-width: 360px;
    position: relative;
    z-index: 2;
    pointer-events: auto;
    flex-shrink: 0;
}

.hex-live-ios-call__bottom--dual {
    justify-content: space-around;
}

.hex-live-ios-call__bottom--single {
    justify-content: center;
}

.hex-live-ios-action {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    background: none;
    border: none;
    cursor: pointer;
    color: #fff;
    padding: 0;
    position: relative;
    z-index: 3;
    pointer-events: auto;
    -webkit-tap-highlight-color: transparent;
}

.hex-live-ios-action__circle {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.35);
    pointer-events: none;
}

.hex-live-ios-action__label {
    font-size: 13px;
    color: rgba(255,255,255,0.9);
    pointer-events: none;
}

.hex-live-ios-action--hangup .hex-live-ios-action__circle {
    background: #ff3b30;
    transform: rotate(135deg);
}

.hex-live-ios-action--accept .hex-live-ios-action__circle {
    background: #34c759;
}

.hex-live-ios-action--decline .hex-live-ios-action__circle {
    background: #ff3b30;
}

.hex-live-ringing .hex-live-ios-call__avatar {
    animation: hex-live-ios-pulse 1.2s ease-in-out infinite;
}

@keyframes hex-live-ios-pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.05); opacity: 0.85; }
}

/* Legacy card styles kept for chat modal */
.hex-live-call-card {
    display: none;
}

.hex-live-btn {
    border: none;
    border-radius: 999px;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    min-width: 110px;
}

.hex-live-btn--accept { background: #0abb87; color: #fff; }
.hex-live-btn--decline { background: #f4516c; color: #fff; }
.hex-live-btn--end { background: #575962; color: #fff; }

.hex-live-call-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}
.hex-live-admin-toast {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 100050;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.25);
    padding: 20px;
    width: 320px;
    border-left: 4px solid #0abb87;
    animation: hex-live-slide-in 0.3s ease;
}

@keyframes hex-live-slide-in {
    from { transform: translateX(120%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.hex-live-modal {
    position: fixed;
    inset: 0;
    z-index: 100002;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hex-live-modal[hidden] { display: none !important; }

.hex-live-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.4);
}

.hex-live-modal__panel {
    position: relative;
    background: #fff;
    border-radius: 12px;
    width: 400px;
    max-width: calc(100vw - 32px);
    box-shadow: 0 16px 48px rgba(0,0,0,0.25);
    overflow: hidden;
}

.hex-live-modal__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: #2c2c2c;
    color: #fff;
}

.hex-live-modal__close {
    background: none;
    border: none;
    color: #fff;
    font-size: 22px;
    cursor: pointer;
    line-height: 1;
}

.hex-live-action-btns {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.hex-live-action-btns .btn { font-size: 11px; padding: 4px 10px; }

@media (max-width: 768px) {
    .hex-live-availability-bar__inner {
        flex-direction: column;
        align-items: flex-start;
    }
}
