/* ============================================================
   VERTEX CREW SOLUTION — 24/7 AI Chat Widget Styles
   Matches the navy (#0A1F3C) + champagne gold (#D4AF37) theme
   ============================================================ */

#vcs-chat-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 99999;
    font-family: 'Inter', 'Segoe UI', sans-serif;
    -webkit-font-smoothing: antialiased;
}

/* ---------- Floating launch button ---------- */
#vcs-chat-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(110deg, #B8952E 25%, #F0D98C 40%, #D4AF37 55%, #B8952E 70%);
    background-size: 200% 100%;
    animation: vcs-shimmer 4s linear infinite, vcs-nudge 2.6s ease-in-out infinite;
    color: #050F1F;
    font-weight: 700;
    font-size: 14px;
    padding: 14px 20px;
    border-radius: 999px;
    border: 1px solid #B8952E;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(10, 31, 60, 0.35);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
#vcs-chat-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(10, 31, 60, 0.45);
    animation: vcs-shimmer 4s linear infinite;
}
#vcs-chat-btn i { font-size: 18px; }

@keyframes vcs-shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* Gentle nudge to attract attention while chat is closed */
@keyframes vcs-nudge {
    0%, 86%, 100% { transform: translateY(0); }
    90% { transform: translateY(-4px); }
    94% { transform: translateY(0); }
    97% { transform: translateY(-2px); }
}

/* ---------- Chat panel ---------- */
#vcs-chat-panel {
    position: fixed;
    bottom: 88px;
    right: 20px;
    width: 370px;
    max-width: calc(100vw - 40px);
    height: 540px;
    max-height: calc(100vh - 120px);
    background: #FAF8F3;
    border-radius: 20px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 24px 60px rgba(5, 15, 31, 0.4);
    border: 1px solid rgba(212, 175, 55, 0.35);
    transform-origin: bottom right;
    transform: scale(0);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.25s ease, opacity 0.25s ease;
}
#vcs-chat-widget.open #vcs-chat-panel {
    transform: scale(1);
    opacity: 1;
    pointer-events: auto;
}

/* ---------- Header ---------- */
.vcs-header {
    background: linear-gradient(135deg, #050F1F, #0A1F3C 60%, #16375F);
    color: #fff;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid rgba(212, 175, 55, 0.4);
    flex-shrink: 0;
}
.vcs-header img {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    object-fit: contain;
    background: #fff;
    padding: 4px;
}
.vcs-header .vcs-title { font-weight: 700; font-size: 14px; line-height: 1.2; }
.vcs-header .vcs-status {
    font-size: 11px;
    color: #E8C766;
    display: flex;
    align-items: center;
    gap: 5px;
}
.vcs-header .vcs-status::before {
    content: '';
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #2ecc71;
    animation: vcs-pulse 1.6s infinite;
}
@keyframes vcs-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(46, 204, 113, 0.5); }
    50% { box-shadow: 0 0 0 6px rgba(46, 204, 113, 0); }
}
.vcs-close-btn {
    margin-left: auto;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #E8C766;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.2s;
}
.vcs-close-btn:hover { background: rgba(255, 255, 255, 0.25); }

/* ---------- Messages area ---------- */
.vcs-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: radial-gradient(rgba(212, 175, 55, 0.05) 1px, transparent 1px) 0 0 / 26px 26px;
}
.vcs-msg {
    max-width: 85%;
    padding: 10px 14px;
    border-radius: 16px;
    font-size: 13px;
    line-height: 1.55;
    word-wrap: break-word;
    white-space: pre-line;
}
.vcs-msg.bot {
    align-self: flex-start;
    background: #fff;
    color: #374151;
    border: 1px solid #e5e7eb;
    border-bottom-left-radius: 4px;
}
.vcs-msg.user {
    align-self: flex-end;
    background: #0A1F3C;
    color: #fff;
    border-bottom-right-radius: 4px;
}
.vcs-msg .vcs-link-btn {
    display: inline-block;
    margin-top: 8px;
    background: linear-gradient(110deg, #B8952E, #D4AF37, #E8C766);
    color: #050F1F;
    font-weight: 700;
    font-size: 12px;
    padding: 8px 16px;
    border-radius: 999px;
    text-decoration: none;
    border: 1px solid #B8952E;
}

/* ---------- Typing indicator ---------- */
.vcs-typing {
    display: inline-flex;
    gap: 4px;
    padding: 12px 16px;
}
.vcs-typing span {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #B8952E;
    animation: vcs-bounce 1.2s infinite;
}
.vcs-typing span:nth-child(2) { animation-delay: 0.15s; }
.vcs-typing span:nth-child(3) { animation-delay: 0.3s; }
@keyframes vcs-bounce {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
    30% { transform: translateY(-5px); opacity: 1; }
}

/* ---------- Quick reply chips ---------- */
.vcs-quick {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 0 16px 10px;
    flex-shrink: 0;
}
.vcs-quick-btn {
    background: #fff;
    border: 1px solid rgba(212, 175, 55, 0.6);
    color: #0A1F3C;
    font-size: 11px;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 999px;
    cursor: pointer;
    transition: all 0.2s;
}
.vcs-quick-btn:hover { background: #D4AF37; color: #050F1F; border-color: #D4AF37; }

/* ---------- Input area ---------- */
.vcs-input {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px 16px;
    border-top: 1px solid #e5e7eb;
    background: #fff;
    flex-shrink: 0;
}
.vcs-input input {
    flex: 1;
    border: 1px solid #e5e7eb;
    border-radius: 999px;
    padding: 10px 16px;
    font-size: 13px;
    outline: none;
    background: #FAF8F3;
    color: #1f2937;
    transition: border 0.2s;
}
.vcs-input input:focus { border-color: #D4AF37; }
.vcs-input button {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(110deg, #B8952E, #D4AF37);
    color: #050F1F;
    cursor: pointer;
    font-size: 15px;
    flex-shrink: 0;
    transition: transform 0.2s;
}
.vcs-input button:hover { transform: scale(1.06); }

.vcs-chat-note {
    text-align: center;
    font-size: 10px;
    color: #9ca3af;
    padding: 6px 12px 12px;
    background: #fff;
    border-top: 1px solid #f3f4f6;
    flex-shrink: 0;
}

/* ---------- Mobile tweaks ---------- */
@media (max-width: 480px) {
    #vcs-chat-panel {
        right: 12px;
        bottom: 84px;
        width: calc(100vw - 24px);
        height: 70vh;
    }
    #vcs-chat-btn { padding: 12px 16px; font-size: 13px; }
}

