/* Creatsify Native Live Chat Widget (Cheetah Architecture) */

.creatsify-chat-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9900;
    font-family: Sora, -apple-system, sans-serif;
}

/* Launcher Button */
.chat-launcher-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent, var(--accent)), #D4A017);
    border: none;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 8px 24px color-mix(in srgb,var(--accent) 40%,transparent);
    position: relative;
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.chat-launcher-btn:hover {
    transform: scale(1.08);
}

.chat-launcher-btn .chat-icon-close {
    display: none;
}

.chat-launcher-btn.active .chat-icon-open {
    display: none;
}

.chat-launcher-btn.active .chat-icon-close {
    display: block;
}

/* Pulse Animation */
.chat-pulse {
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    background: var(--accent, var(--accent));
    opacity: 0.4;
    animation: chatPulse 2s infinite cubic-bezier(0.4, 0, 0.6, 1);
    z-index: -1;
}

@keyframes chatPulse {
    0% { transform: scale(0.95); opacity: 0.6; }
    50% { transform: scale(1.2); opacity: 0; }
    100% { transform: scale(0.95); opacity: 0; }
}

.chat-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background: #ff4d6d;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--surface, #0F2447);
}

/* Chat Window Modal */
.chat-window {
    position: absolute;
    bottom: 74px;
    right: 0;
    width: 380px;
    height: 520px;
    max-width: calc(100vw - 32px);
    max-height: calc(100vh - 120px);
    background: var(--surface, #0F2447);
    border: 1px solid var(--line, #1E3A5F);
    border-radius: 18px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform-origin: bottom right;
    animation: chatPop 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes chatPop {
    0% { opacity: 0; transform: scale(0.85) translateY(20px); }
    100% { opacity: 1; transform: scale(1) translateY(0); }
}

/* Header */
.chat-header {
    padding: 16px 20px;
    background: linear-gradient(135deg, color-mix(in srgb,var(--accent) 12%,transparent), rgba(212,160,23,0.06));
    border-bottom: 1px solid var(--line, #1E3A5F);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.chat-header-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.chat-avatar {
    position: relative;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #000;
    overflow: visible;
}

.chat-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.status-dot {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #00c853;
    border: 2px solid var(--surface, #0F2447);
}

.chat-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text, #F1F5F9);
    margin: 0;
    font-family: Sora, sans-serif;
}

.chat-status {
    font-size: 11.5px;
    color: var(--muted, #A3B2C7);
    margin: 2px 0 0;
}

.chat-close-btn {
    background: none;
    border: none;
    color: var(--muted, #A3B2C7);
    font-size: 22px;
    cursor: pointer;
    line-height: 1;
    min-width: 44px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    border-radius: 8px;
    transition: background 0.15s ease, color 0.15s ease;
}

.chat-close-btn:hover {
    color: var(--text, #F1F5F9);
}

/* Body Stream */
.chat-body {
    flex-grow: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    background: var(--bg, #0A1A33);
}

.chat-timestamp {
    font-size: 11px;
    text-align: center;
    color: var(--muted, #A3B2C7);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.chat-msg {
    display: flex;
    flex-direction: column;
    max-width: 82%;
}

.chat-msg.bot-msg {
    align-self: flex-start;
}

.chat-msg.visitor-msg {
    align-self: flex-end;
}

.msg-bubble {
    padding: 12px 16px;
    border-radius: 14px;
    font-size: 13.5px;
    line-height: 1.5;
}

.bot-msg .msg-bubble {
    background: var(--surface, #0F2447);
    color: var(--text, #F1F5F9);
    border: 1px solid var(--line, #1E3A5F);
    border-bottom-left-radius: 4px;
}

.visitor-msg .msg-bubble {
    background: var(--accent, var(--accent));
    color: #ffffff;
    border-bottom-right-radius: 4px;
}

.msg-time {
    font-size: 10.5px;
    color: var(--muted, #A3B2C7);
    margin-top: 4px;
    align-self: flex-start;
}

.visitor-msg .msg-time {
    align-self: flex-end;
}

/* Suggestion Chips */
.chat-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.chat-chip {
    background: color-mix(in srgb,var(--accent) 12%,transparent);
    border: 1px solid color-mix(in srgb,var(--accent) 30%,transparent);
    color: var(--accent, var(--accent));
    font-size: 11.5px;
    font-weight: 500;
    padding: 6px 10px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.chat-chip:hover {
    background: var(--accent, var(--accent));
    color: #ffffff;
}

/* Footer / Input */
.chat-footer {
    padding: 12px 16px;
    background: var(--surface, #0F2447);
    border-top: 1px solid var(--line, #1E3A5F);
    display: flex;
    gap: 8px;
    align-items: center;
}

.chat-footer input {
    flex-grow: 1;
    background: var(--bg, #0A1A33);
    border: 1px solid var(--line, #1E3A5F);
    border-radius: 20px;
    padding: 9px 16px;
    font-size: 13.5px;
    color: var(--text, #F1F5F9);
    outline: none;
}

.chat-footer input:focus {
    border-color: var(--accent, var(--accent));
}

.chat-send-btn {
    width: 40px;
    height: 40px;
    min-width: 40px;
    min-height: 40px;
    border-radius: 50%;
    background: var(--accent, var(--accent));
    border: none;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
}

.chat-send-btn:hover {
    opacity: 0.9;
}

/* Mobile Ergonomics & iOS Zoom Prevention */
@media (max-width: 768px) {
    .chat-footer input {
        font-size: 16px !important;
    }
}

/* text never smaller than 12px */
.chat-status,.chat-timestamp,.msg-time,.chat-chip{font-size:12px}
.chat-title{margin:0}
