.kiso-widget {
    position: fixed;
    bottom: 20px;
    z-index: 99999;
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.kiso-widget.kiso-right { right: 20px; }
.kiso-widget.kiso-left { left: 20px; }

.kiso-widget .kiso-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--kiso-bg, #25d366);
    color: var(--kiso-color, #ffffff);
    border: none;
    border-radius: 40px;
    padding: 12px 16px;
    cursor: pointer;
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.2);
    font-weight: 600;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.kiso-widget .kiso-toggle:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 38px rgba(0, 0, 0, 0.25);
}

.kiso-widget .kiso-toggle-icon {
    font-size: 16px;
}

.kiso-widget .kiso-panel {
    display: none;
    position: absolute;
    bottom: 70px;
    right: 0;
    width: 320px;
    max-height: 420px;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 12px 50px rgba(0, 0, 0, 0.25);
    overflow: hidden;
}

.kiso-widget.kiso-left .kiso-panel { left: 0; right: auto; }

.kiso-widget.active .kiso-panel { display: flex; flex-direction: column; }

.kiso-tabs {
    display: flex;
    background: #f6f7fb;
    border-bottom: 1px solid #e5e5e5;
}

.kiso-tabs .kiso-tab {
    flex: 1;
    padding: 12px;
    border: none;
    background: transparent;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease;
}

.kiso-tabs .kiso-tab.active {
    background: #ffffff;
    border-bottom: 3px solid #25d366;
}

.kiso-tab-content {
    display: none;
    padding: 14px;
    flex: 1;
    overflow: hidden;
}

.kiso-tab-content.active { display: block; }

.kiso-helper {
    margin-top: 0;
    color: #555;
}

.kiso-wa-btn {
    width: 100%;
    background: #25d366;
    color: #ffffff;
    border: none;
    border-radius: 10px;
    padding: 12px;
    font-weight: 700;
    cursor: pointer;
}

.kiso-messages {
    background: #f6f7fb;
    border-radius: 12px;
    padding: 10px;
    height: 200px;
    overflow-y: auto;
    margin-bottom: 10px;
}

.kiso-msg {
    padding: 8px 10px;
    border-radius: 10px;
    margin-bottom: 8px;
    max-width: 85%;
    font-size: 14px;
    line-height: 1.35;
}

.kiso-msg.user {
    background: #daf0ff;
    align-self: flex-end;
    margin-left: auto;
}

.kiso-msg.bot {
    background: #ffffff;
    border: 1px solid #e5e5e5;
}

.kiso-form .kiso-input-row {
    display: flex;
    gap: 8px;
    align-items: center;
}

.kiso-input {
    flex: 1;
    padding: 10px;
    border-radius: 10px;
    border: 1px solid #dcdcdc;
}

.kiso-email {
    width: 100%;
    padding: 8px 10px;
    border-radius: 10px;
    border: 1px solid #dcdcdc;
    margin-bottom: 8px;
}

.kiso-send {
    background: #111827;
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 10px 14px;
    cursor: pointer;
}

.kiso-privacy {
    font-size: 12px;
    color: #666;
    margin-top: 8px;
}

.kiso-quick-replies {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 10px;
}

.kiso-quick {
    border: 1px solid #dcdcdc;
    background: #fff;
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 12px;
    cursor: pointer;
    transition: background 0.12s ease, border-color 0.12s ease;
}

.kiso-quick:hover {
    background: #f1f5f9;
    border-color: #cfd8e3;
}

.kiso-msg.cached {
    position: relative;
    padding-bottom: 20px;
}

.kiso-cache-label {
    display: inline-block;
    margin-top: 6px;
    font-size: 11px;
    color: #0f766e;
    background: #e0f2f1;
    border: 1px solid #b2dfdb;
    border-radius: 999px;
    padding: 3px 8px;
}

@media (max-width: 480px) {
    .kiso-widget .kiso-panel {
        width: 92vw;
        right: 0;
        left: auto;
    }
}
