/* ================================================================
   Sri Lanka Navy Virtual Assistant - Military Insignia Edition
   Official Theme: Midnight Naval Blue & 24k Admiralty Gold
   ================================================================ */

#navy-chat-window {
    display: none;
    position: fixed;
    bottom: 90px;
    right: 24px;
    width: 390px;
    max-width: calc(100vw - 32px);
    height: 540px;
    max-height: calc(100vh - 120px);
    background: linear-gradient(155deg, #02122c 0%, #000c24 60%, #000614 100%);
    border: 1px solid rgba(250, 204, 21, 0.25);
    border-radius: 24px;
    box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.7),
                0 0 35px -5px rgba(30, 64, 175, 0.3),
                inset 0 1px 0 rgba(255, 255, 255, 0.1);
    z-index: 99999;
    flex-direction: column;
    overflow: hidden;
    font-family: inherit;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

#navy-chat-window .chat-header {
    background: linear-gradient(90deg, rgba(14, 42, 94, 0.85) 0%, rgba(3, 21, 54, 0.95) 100%);
    border-bottom: 1px solid rgba(250, 204, 21, 0.25);
    padding: 14px 18px;
    font-weight: 600;
    font-size: 15px;
    color: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

#navy-chat-window .chat-header button.chat-close {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.8);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    transition: all 0.2s;
}

#navy-chat-window .chat-header button.chat-close:hover {
    background: rgba(239, 68, 68, 0.3);
    border-color: #ef4444;
    color: #ffffff;
    transform: rotate(90deg);
}

#chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 18px 16px 12px;
    scroll-behavior: smooth;
    background: radial-gradient(circle at 50% 10%, rgba(37, 99, 235, 0.08) 0%, transparent 60%);
}

.chat-input-area {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 14px;
    background: rgba(2, 10, 26, 0.85);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

#chat-input {
    flex: 1;
    min-width: 0;
    padding: 11px 16px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(250, 204, 21, 0.25);
    border-radius: 9999px;
    color: white;
    font-size: 13.5px;
    outline: none;
    transition: all 0.2s;
}

#chat-input:focus {
    background: rgba(255, 255, 255, 0.1);
    border-color: #facc15;
    box-shadow: 0 0 0 3px rgba(250, 204, 21, 0.15);
}

#chat-input::placeholder {
    color: rgba(255, 255, 255, 0.45);
}

#chat-send-btn {
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, #eab308 0%, #ca8a04 100%);
    color: #000c24;
    border: none;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.32, 0.72, 0, 1);
    box-shadow: 0 4px 14px rgba(234, 179, 8, 0.35);
}

#chat-send-btn:hover {
    background: linear-gradient(135deg, #facc15 0%, #eab308 100%);
    transform: scale(1.06);
    box-shadow: 0 6px 20px rgba(250, 204, 21, 0.5);
}

.voice-btn {
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.voice-btn:hover {
    border-color: #facc15;
    color: #facc15;
}

.chat-status {
    color: #94a3b8;
    font-size: 11px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.online-dot {
    width: 7px;
    height: 7px;
    background: #22c55e;
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 6px #22c55e;
}

/* ================================================================
   FLOATING CHAT BUTTON (OFFICER AVATAR WITH ONLINE STATUS)
   Clean, Professional, Only Green Online Dot - No Yellow Glow
   ================================================================ */
#navy-chat-button {
    position: fixed;
    bottom: 90px !important;
    right: 20px;
    width: 62px;
    height: 62px;
    background: #00122e;
    border: 2px solid rgba(255, 255, 255, 0.25);
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 99998;
    transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 8px 24px -4px rgba(0, 0, 0, 0.6);
    padding: 0;
    overflow: visible;
}

#navy-chat-button:hover {
    transform: scale(1.08) translateY(-2px);
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: 0 12px 30px -4px rgba(0, 0, 0, 0.75);
}

#navy-chat-button:active {
    transform: scale(0.96) translateY(0);
}

.chat-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 9999px;
    display: block;
    pointer-events: none;
}

/* Online Indicator Dot (ONLY Green) */
#navy-chat-button .chat-online-dot {
    position: absolute;
    top: 1px;
    right: 1px;
    width: 16px;
    height: 16px;
    background: #22c55e;
    border: 2.5px solid #000c24;
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(34, 197, 94, 0.85);
    pointer-events: none;
    z-index: 2;
}

#navy-chat-button svg {
    transition: transform 0.3s ease;
}

#navy-chat-button:hover svg {
    transform: scale(1.08);
}

#topBtn {
    bottom: 20px;
    right: 20px;
    z-index: 99999;
}

.quick-btn {
    background: rgba(255, 255, 255, 0.08);
    color: white;
    font-size: 11px;
    padding: 6px 10px;
    border-radius: 9999px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.quick-btn:hover {
    background: #2563eb;
    border-color: #2563eb;
}

/* Welcome Card */
.welcome-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(250, 204, 21, 0.2);
    border-radius: 18px;
    padding: 16px;
    margin-bottom: 14px;
}

.welcome-card h4 {
    color: #facc15;
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.welcome-card p {
    color: #cbd5e1;
    line-height: 1.6;
    font-size: 13px;
    margin-bottom: 6px;
}

.welcome-card p:last-child {
    margin-bottom: 0;
}

.quick-action-btn {
    font-size: 12px;
    padding: 7px 13px;
    white-space: nowrap;
}

/* Scrollbar */
#chat-messages::-webkit-scrollbar {
    width: 5px;
}
#chat-messages::-webkit-scrollbar-thumb {
    background: rgba(250, 204, 21, 0.25);
    border-radius: 20px;
}
#chat-messages::-webkit-scrollbar-thumb:hover {
    background: rgba(250, 204, 21, 0.45);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    #navy-chat-button {
        bottom: 95px !important;
        right: 15px;
        width: 56px;
        height: 56px;
    }
    #topBtn {
        bottom: 20px;
        right: 15px;
    }
}

@media (max-width: 480px) {
    #navy-chat-window {
        width: calc(100vw - 28px);
        right: 14px;
        bottom: 80px;
        height: 72vh;
        max-height: none;
        border-radius: 20px;
    }
}
