#gitaz-ai-widget {
    position: fixed;
    bottom: 80px;
    right: 20px;
    width: 350px;
    height: 450px;
    /* PERBAIKAN 1: Responsivitas Layar Penuh (Mencegah terpotong di HP) */
    max-width: calc(100vw - 40px);
    max-height: calc(100vh - 100px);
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.2);
    display: none; /* Disembunyikan secara default */
    flex-direction: column;
    z-index: 999999;
    font-family: sans-serif;
    overflow: hidden;
}

#gitaz-ai-chat-header {
    background: #1e1e1e;
    color: #fff;
    padding: 15px;
    font-weight: bold;
    text-align: center;
    /* Memastikan elemen di header sejajar */
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#gitaz-ai-chat-body {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    background: #f9f9f9;
}

/* PERBAIKAN 2: Memastikan kata panjang tidak menembus kotak */
.gitaz-msg-user {
    background: #007cba;
    color: white;
    padding: 8px 12px;
    border-radius: 12px 12px 0 12px;
    margin-bottom: 10px;
    align-self: flex-end;
    width: fit-content;
    max-width: 80%;
    margin-left: auto;
    word-break: break-word;
    overflow-wrap: break-word;
}

.gitaz-msg-ai {
    background: #e5e5e5;
    color: #333;
    padding: 8px 12px;
    border-radius: 12px 12px 12px 0;
    margin-bottom: 10px;
    width: fit-content;
    max-width: 80%;
    word-break: break-word;
    overflow-wrap: break-word;
}

/* PERBAIKAN 3: Memastikan Input & Privacy Footer Tersusun Atas-Bawah */
#gitaz-ai-chat-input-area {
    /* Hapus display: flex dari sini agar tidak bentrok dengan JS */
    flex-direction: column; /* Memaksa susunan vertikal jika dipanggil JS */
    border-top: 1px solid #ddd;
    background: #fff;
}

#gitaz-ai-input {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    outline: none;
}

#gitaz-ai-send {
    background: #1e1e1e;
    color: #fff;
    border: none;
    padding: 0 15px;
    margin-left: 10px;
    border-radius: 6px;
    cursor: pointer;
}

#gitaz-ai-toggle {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #1e1e1e;
    color: #fff;
    border: none;
    padding: 12px 20px;
    border-radius: 30px;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    z-index: 999999;
    font-weight: bold;
}

.gitaz-ai-options {
    display: flex;
    flex-wrap: wrap; /* Tombol akan berjejer rapi ke samping jika muat */
    gap: 8px;
    margin-top: 15px;
}

.gitaz-opt-btn {
    background: #fff;
    border: 1px solid #007cba;
    color: #007cba;
    padding: 6px 14px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 12px;
    font-weight: 500;
}

.gitaz-opt-btn:hover {
    background: #007cba;
    color: #fff;
    transform: translateY(-2px);
}

#gitaz-ai-lead-form input {
    width: 100%;
    padding: 10px;
    margin-bottom: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
}

#gitaz-start-chat {
    width: 100%;
    background: #007cba;
    color: white;
    border: none;
    padding: 8px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: bold;
    transition: 0.3s;
}

#gitaz-start-chat:hover {
    background: #005a87;
}

#gitaz-ai-reset {
    background: transparent;
    border: none;
    color: #fff;
    cursor: pointer;
    font-size: 14px;
    padding: 0;
    opacity: 0.7;
    transition: 0.3s;
}

#gitaz-ai-reset:hover {
    opacity: 1;
    transform: rotate(180deg);
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.2); opacity: 0.7; }
    100% { transform: scale(1); opacity: 1; }
}