/* ===== Floating Widget ===== */
.gaikb-widget-toggle {
    position: fixed;
    bottom: 24px;
    z-index: 99998;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--gaikb-theme-color, #1e3a8a);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(0,0,0,0.25);
    transition: transform 0.2s ease;
}
.gaikb-widget-toggle:hover { transform: scale(1.06); }
.gaikb-widget-toggle.gaikb-pos-right { right: 24px; }
.gaikb-widget-toggle.gaikb-pos-left { left: 24px; }

.gaikb-widget-box {
    position: fixed;
    bottom: 96px;
    z-index: 99999;
    width: 340px;
    max-width: 90vw;
    height: 460px;
    max-height: 70vh;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.25);
    display: none;
    flex-direction: column;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
.gaikb-widget-box.gaikb-pos-right { right: 24px; }
.gaikb-widget-box.gaikb-pos-left { left: 24px; }
.gaikb-widget-box.gaikb-open { display: flex; }

.gaikb-widget-header {
    background: var(--gaikb-theme-color, #1e3a8a);
    color: #fff;
    padding: 14px 16px;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.gaikb-widget-close { cursor: pointer; font-size: 18px; opacity: 0.9; }

.gaikb-widget-messages { flex: 1; padding: 14px; overflow-y: auto; background: #f7f8fa; }

.gaikb-msg { margin-bottom: 10px; display: flex; }
.gaikb-msg-bubble {
    max-width: 82%;
    padding: 9px 13px;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.45;
    white-space: pre-wrap;
    word-wrap: break-word;
}
.gaikb-msg-user { justify-content: flex-end; }
.gaikb-msg-user .gaikb-msg-bubble { background: var(--gaikb-theme-color, #1e3a8a); color: #fff; border-bottom-right-radius: 2px; }
.gaikb-msg-bot .gaikb-msg-bubble { background: #fff; color: #1f2328; border: 1px solid #e5e7eb; border-bottom-left-radius: 2px; }
.gaikb-msg-typing .gaikb-msg-bubble { font-style: italic; color: #6b7280; }

.gaikb-widget-form { display: flex; border-top: 1px solid #e5e7eb; padding: 10px; gap: 8px; }
.gaikb-widget-form input {
    flex: 1; border: 1px solid #d1d5db; border-radius: 20px; padding: 9px 14px; font-size: 14px; outline: none;
}
.gaikb-widget-form button {
    background: var(--gaikb-theme-color, #1e3a8a); color: #fff; border: none; border-radius: 20px; padding: 0 18px; cursor: pointer; font-size: 14px;
}

/* ===== Inline Chat (shortcode / block) ===== */
.gaikb-inline-chat {
    display: flex;
    flex-direction: column;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    max-width: 640px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
.gaikb-inline-header { background: var(--gaikb-theme-color, #1e3a8a); color: #fff; padding: 12px 16px; font-weight: 600; }
.gaikb-inline-messages { flex: 1; padding: 14px; overflow-y: auto; background: #f7f8fa; }
.gaikb-inline-form { display: flex; border-top: 1px solid #e5e7eb; padding: 10px; gap: 8px; }
.gaikb-inline-form input { flex: 1; border: 1px solid #d1d5db; border-radius: 20px; padding: 9px 14px; font-size: 14px; outline: none; }
.gaikb-inline-form button { background: var(--gaikb-theme-color, #1e3a8a); color: #fff; border: none; border-radius: 20px; padding: 0 18px; cursor: pointer; }

.gaikb-sources { font-size: 12px; color: #6b7280; margin-top: 4px; }
.gaikb-sources a { color: var(--gaikb-theme-color, #1e3a8a); }
