/* ===== CAISOL AI CHAT WIDGET ===== */

#ai-launcher {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 9999;
}

#aiBtn {
    width: 58px;
    height: 58px;
    border-radius: 18px;
    border: 1px solid var(--line);
    background: linear-gradient(135deg, var(--primary), #7c3aed);
    color: #fff;
    font-size: 22px;
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: 0.25s ease;
}

#aiBtn:hover {
    transform: translateY(-3px);
}

#aiChat {
    position: fixed;
    right: 20px;
    bottom: 90px;
    width: 360px;
    max-width: calc(100% - 40px);
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 20px;
    box-shadow: var(--shadow);
    display: none;
    overflow: hidden;
    z-index: 9999;
}

#aiChat.open {
    display: flex;
    flex-direction: column;
}

.ai-header {
    display: flex;
    justify-content: space-between;
    padding: 14px 16px;
    background: var(--soft2);
    border-bottom: 1px solid var(--line);
    font-weight: 900;
}

#aiMessages {
    height: 320px;
    overflow-y: auto;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ai-msg {
    padding: 10px 12px;
    border-radius: 14px;
    max-width: 85%;
    font-size: 0.92rem;
}

.ai-user {
    align-self: flex-end;
    background: var(--primary);
    color: #fff;
}

.ai-bot {
    align-self: flex-start;
    background: var(--soft);
    border: 1px solid var(--line);
}

.ai-input {
    display: flex;
    gap: 8px;
    padding: 12px;
    border-top: 1px solid var(--line);
}

.ai-input input {
    flex: 1;
    border-radius: 12px;
    border: 1px solid var(--line);
    padding: 10px;
    background: var(--soft);
    color: var(--text);
}

.ai-input button {
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 12px;
    padding: 10px 14px;
    font-weight: 900;
}
.ai-close {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: var(--card);
    display: grid;
    place-items: center;
    color: var(--text2);
    cursor: pointer;
    transition: 0.2s ease;
}

.ai-close svg {
    width: 18px;
    height: 18px;
    stroke-width: 2.5;
}

.ai-close:hover {
    background: var(--soft);
    color: var(--primary);
    transform: scale(1.05);
}
.ai-close {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: var(--card);
    display: grid;
    place-items: center;
    color: var(--text2);
    cursor: pointer;
    transition: 0.2s ease;
}

.ai-close svg {
    width: 18px;
    height: 18px;
    stroke-width: 2.5;
}

.ai-close:hover {
    background: var(--soft);
    color: var(--primary);
    transform: scale(1.05);
}