/* --- SMPN 1 FLOATING AI CHAT WIDGET CSS --- */
.ai-chat-launcher {
    position: fixed;
    bottom: 25px;
    right: 25px;
    z-index: 99999;
    background: linear-gradient(135deg, #145c26 0%, #22c55e 100%);
    color: #ffffff;
    padding: 12px 22px;
    border-radius: 50px;
    box-shadow: 0 10px 25px rgba(20, 92, 38, 0.4);
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-weight: 700;
    font-size: 0.95rem;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.ai-chat-launcher:hover {
    transform: translateY(-5px) scale(1.04);
    box-shadow: 0 15px 30px rgba(20, 92, 38, 0.5);
}

.ai-launcher-icon {
    width: 35px;
    height: 35px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.ai-pulse-dot {
    width: 10px;
    height: 10px;
    background: #facc15;
    border-radius: 50%;
    box-shadow: 0 0 10px #facc15;
    animation: aiPulse 1.8s infinite;
}

@keyframes aiPulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(250, 204, 21, 0.7); }
    70% { transform: scale(1.1); box-shadow: 0 0 0 10px rgba(250, 204, 21, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(250, 204, 21, 0); }
}

/* Chat Popup Window */
.ai-chat-window {
    position: fixed;
    bottom: 90px;
    right: 25px;
    width: 380px;
    max-width: calc(100vw - 40px);
    height: 520px;
    max-height: calc(100vh - 120px);
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
    z-index: 99999;
    display: none;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.08);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.ai-chat-window.active {
    display: flex;
    animation: aiSlideUp 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes aiSlideUp {
    from { opacity: 0; transform: translateY(20px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Chat Header */
.ai-chat-header {
    background: linear-gradient(135deg, #0e3aa7 0%, #145c26 100%);
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.ai-avatar {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.ai-header-info h4 {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
}

.ai-status-online {
    font-size: 0.75rem;
    opacity: 0.9;
    display: flex;
    align-items: center;
    gap: 5px;
}

.ai-status-online .dot {
    width: 7px;
    height: 7px;
    background: #22c55e;
    border-radius: 50%;
}

.ai-chat-close {
    background: none;
    border: none;
    color: white;
    font-size: 26px;
    cursor: pointer;
    line-height: 1;
    opacity: 0.8;
}

.ai-chat-close:hover { opacity: 1; }

/* Chat Body */
.ai-chat-body {
    flex: 1;
    padding: 18px;
    overflow-y: auto;
    background: #f8fafc;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ai-message {
    display: flex;
    margin-bottom: 5px;
}

.ai-message.bot { justify-content: flex-start; }
.ai-message.user { justify-content: flex-end; }

.ai-message .msg-content {
    max-width: 82%;
    padding: 12px 16px;
    border-radius: 16px;
    font-size: 0.92rem;
    line-height: 1.45;
}

.ai-message.bot .msg-content {
    background: #ffffff;
    color: #1e293b;
    border-bottom-left-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    border: 1px solid #e2e8f0;
}

.ai-message.user .msg-content {
    background: #145c26;
    color: #ffffff;
    border-bottom-right-radius: 4px;
}

.ai-quick-replies {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 8px;
}

.quick-btn {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    color: #334155;
    padding: 8px 14px;
    border-radius: 20px;
    font-size: 0.82rem;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    transition: all 0.2s ease;
}

.quick-btn:hover {
    background: #f1f5f9;
    border-color: #145c26;
    color: #145c26;
}

/* Chat Footer Input */
.ai-chat-footer {
    padding: 12px 15px;
    background: #ffffff;
    border-top: 1px solid #e2e8f0;
}

#smpn1-ai-chat-form {
    display: flex;
    gap: 8px;
}

#smpn1-ai-chat-input {
    flex: 1;
    border: 1px solid #cbd5e1;
    border-radius: 25px;
    padding: 10px 16px;
    font-size: 0.9rem;
    outline: none;
}

#smpn1-ai-chat-input:focus {
    border-color: #145c26;
}

#smpn1-ai-chat-send {
    background: #145c26;
    color: white;
    border: none;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: background 0.2s ease;
}

#smpn1-ai-chat-send:hover { background: #1e7e34; }

/* Interactive Survey Buttons */
.ai-survey-options {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 10px;
}

.survey-score-btn {
    background: #ffffff;
    border: 1.5px solid #22c55e;
    color: #145c26;
    padding: 9px 14px;
    border-radius: 20px;
    font-size: 0.88rem;
    font-weight: 700;
    text-align: left;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 2px 5px rgba(34, 197, 94, 0.12);
}

.survey-score-btn:hover {
    background: #22c55e;
    color: #ffffff;
    transform: translateX(4px);
}

/* Interactive Aspirasi Category Buttons */
.ai-aspirasi-options {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 10px;
}

.aspirasi-cat-btn {
    background: #ffffff;
    border: 1.5px solid #0e3aa7;
    color: #0e3aa7;
    padding: 9px 14px;
    border-radius: 20px;
    font-size: 0.88rem;
    font-weight: 700;
    text-align: left;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 2px 5px rgba(14, 58, 167, 0.1);
}

.aspirasi-cat-btn:hover {
    background: #0e3aa7;
    color: #ffffff;
    transform: translateX(4px);
}
