#bsa-chat-trigger {
    width: 60px !important; height: 60px !important; border-radius: 50% !important; 
    background-color: #0073aa !important; color: #ffffff !important;
    border: none !important; cursor: pointer !important; box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25) !important;
    font-size: 26px !important; display: flex !important; justify-content: center !important;
    align-items: center !important; transition: transform 0.2s ease, background-color 0.2s ease !important;
}
#bsa-chat-trigger:hover { transform: scale(1.08) !important; background-color: #006294 !important; }

#bsa-chat-widget {
    position: fixed !important; bottom: 96px !important; right: 24px !important; 
    width: 520px !important; max-width: calc(100vw - 48px) !important; height: 620px !important; max-height: calc(100vh - 140px) !important; 
    background-color: #ffffff !important; border-radius: 16px !important; box-shadow: 0 12px 36px rgba(0, 0, 0, 0.18) !important;
    z-index: 999999 !important; flex-direction: column; overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif !important;
    border: 1px solid #e2e8f0 !important;
}

.bsa-widget-header { background-color: #111111; color: #ffffff; padding: 16px; display: flex; justify-content: space-between; align-items: center; }
.bsa-branding { display: flex; align-items: center; gap: 8px; }
.bsa-status-indicator { width: 8px; height: 8px; border-radius: 50%; background-color: #10b981; display: inline-block; }
#bsa-header-title { margin: 0; font-size: 15px; font-weight: 600; color: #ffffff; line-height: 1; }
.bsa-btn-close { background: none; border: none; color: #ffffff; font-size: 24px; cursor: pointer; opacity: 0.7; padding: 0; line-height: 1; }
.bsa-btn-close:hover { opacity: 1; }

.bsa-message-board { flex: 1; padding: 16px; overflow-y: auto; background-color: #f8fafc; display: flex; flex-direction: column; gap: 12px; }
.bsa-message { display: flex; width: 100%; }
.bsa-message.bsa-incoming { justify-content: flex-start; }
.bsa-message.bsa-outgoing { justify-content: flex-end; }

.bsa-incoming .bsa-bubble, .bsa-incoming .bsa-bubble p, .bsa-incoming .bsa-bubble li,
.bsa-incoming .bsa-bubble ul, .bsa-incoming .bsa-bubble ol { background-color: #f1f5f9; color: #1e293b !important; border-bottom-left-radius: 2px; border: 1px solid #e2e8f0; }

.bsa-outgoing .bsa-bubble, .bsa-outgoing .bsa-bubble p, .bsa-outgoing .bsa-bubble li,
.bsa-outgoing .bsa-bubble ul, .bsa-outgoing .bsa-bubble ol { background-color: #0073aa; color: #ffffff !important; border-bottom-right-radius: 2px; }

.bsa-widget-input-area { padding: 12px; border-top: 1px solid #f1f5f9; display: flex; gap: 8px; background-color: #ffffff; align-items: flex-end; }
#bsa-user-input { flex: 1; border: 1px solid #cbd5e1; border-radius: 8px; padding: 10px 12px; font-size: 13px; outline: none; box-shadow: none; min-height: 100px; resize: none; font-family: inherit; line-height: 1.4; }
#bsa-user-input:focus { border-color: #0073aa; box-shadow: 0 0 0 1px #0073aa; }
#bsa-btn-submit { background-color: #0073aa; color: #ffffff; border: none; padding: 10px 16px; border-radius: 8px; font-weight: 600; font-size: 13px; cursor: pointer; height: 40px; }
#bsa-btn-submit:hover { background-color: #006294; }

.bsa-wave-indicator { display: flex; align-items: center; justify-content: center; gap: 4px; height: 20px; padding: 2px 0; }
.bsa-wave-indicator .bsa-bar { width: 4px; height: 100%; background-color: #0073aa; border-radius: 2px; animation: bsaSoundWave 1.2s ease-in-out infinite; }
.bsa-wave-indicator .bsa-bar:nth-child(1) { animation-delay: -1.2s; }
.bsa-wave-indicator .bsa-bar:nth-child(2) { animation-delay: -1.1s; }
.bsa-wave-indicator .bsa-bar:nth-child(3) { animation-delay: -1.0s; }
.bsa-wave-indicator .bsa-bar:nth-child(4) { animation-delay: -0.9s; }
.bsa-wave-indicator .bsa-bar:nth-child(5) { animation-delay: -0.8s; }
@keyframes bsaSoundWave { 0%, 40%, 100% { transform: scaleY(0.4); } 20% { transform: scaleY(1); } }

/* --- ENHANCED BUBBLE TEXT READABILITY --- */
.bsa-bubble {
    max-width: 85%; 
    padding: 14px 18px; 
    border-radius: 12px;
    font-size: 14px; /* Increased for better visibility */
    font-weight: 400; /* Forces solid thickness */
    line-height: 1.6; 
    word-wrap: break-word;
    letter-spacing: 0.3px; /* Prevents text from looking cramped */
    -webkit-font-smoothing: antialiased; /* Prevents "thin" rendering on Apple devices */
    -moz-osx-font-smoothing: grayscale;
}

.bsa-bubble p { margin: 0 0 10px 0; }
.bsa-bubble p:last-child { margin-bottom: 0; }
.bsa-bubble ul, .bsa-bubble ol { margin: 8px 0 10px 20px !important; padding: 0 !important; }
.bsa-bubble li { margin-bottom: 8px; line-height: 1.5; }

/* Thicken bold text slightly to stand out against the new 14px font */
.bsa-bubble strong { font-weight: 700; color: inherit; letter-spacing: 0.1px; }

/* Enhanced Link Readability */
.bsa-bubble a { color: #0073aa; text-decoration: underline; font-weight: 600; }
.bsa-bubble a:hover { color: #006294; }

/* Deepen the incoming text color for maximum contrast */
.bsa-incoming .bsa-bubble, .bsa-incoming .bsa-bubble p, .bsa-incoming .bsa-bubble li,
.bsa-incoming .bsa-bubble ul, .bsa-incoming .bsa-bubble ol { 
    background-color: #f1f5f9; 
    color: #0f172a !important; /* Darker, richer text color */
    border-bottom-left-radius: 2px; 
    border: 1px solid #e2e8f0; 
}

/* Outgoing text remains bright white on blue */
.bsa-outgoing .bsa-bubble, .bsa-outgoing .bsa-bubble p, .bsa-outgoing .bsa-bubble li,
.bsa-outgoing .bsa-bubble ul, .bsa-outgoing .bsa-bubble ol { 
    background-color: #0073aa; 
    color: #ffffff !important; 
    border-bottom-right-radius: 2px; 
}

/* Also increase the typing box font size so it matches */
#bsa-user-input { 
    flex: 1; border: 1px solid #cbd5e1; border-radius: 8px; 
    padding: 10px 12px; 
    font-size: 14px; /* Increased to match */
    font-weight: 400;
    outline: none; box-shadow: none; min-height: 60px; resize: none; 
    font-family: inherit; line-height: 1.4; 
}