/* CannaZen AI Chat Widget Styles */

#czc-btn {
    position: fixed;
    bottom: 24px;
    left: 24px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #22c55e;
    border: none;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9000;
    transition: all .25s ease;
    box-shadow: 0 4px 20px rgba(34, 197, 94, .35);
}

#czc-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 28px rgba(34, 197, 94, .5);
}

#czc-btn svg {
    width: 28px;
    height: 28px;
}

#czc-btn.open {
    background: #666;
    box-shadow: 0 4px 16px rgba(0, 0, 0, .2);
}

#czc-btn.open svg.ico-chat {
    display: none;
}

#czc-btn:not(.open) svg.ico-close {
    display: none;
}

/* Chat Box */
#czc-box {
    position: fixed;
    bottom: 96px;
    left: 24px;
    width: 380px;
    max-height: 540px;
    background: #f5f5f5;
    border-radius: 20px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, .15);
    z-index: 9001;
    display: none;
    flex-direction: column;
    overflow: hidden;
}

#czc-box.show {
    display: flex;
}

/* Header */
#czc-head {
    background: #fff;
    padding: 16px 18px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid #eee;
    position: relative;
}

#czc-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #22c55e;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

#czc-avatar svg {
    width: 22px;
    height: 22px;
    color: #fff;
}

#czc-head-info {
    flex: 1;
}

#czc-head-text {
    font-size: 15px;
    font-weight: 700;
    color: #222;
}

#czc-head-sub {
    font-size: 11px;
    color: #22c55e;
    margin-top: 2px;
    display: flex;
    align-items: center;
    gap: 4px;
}

#czc-head-sub::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #22c55e;
    display: inline-block;
}

#czc-close {
    position: absolute;
    top: 12px;
    right: 14px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #f0f0f0;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #888;
    transition: .15s;
}

#czc-close:hover {
    background: #e0e0e0;
    color: #555;
}

#czc-close svg {
    width: 14px;
    height: 14px;
}

/* Messages */
#czc-msgs {
    flex: 1;
    overflow-y: auto;
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 240px;
    max-height: 340px;
    background: #f5f5f5;
}

#czc-msgs::-webkit-scrollbar {
    width: 4px;
}

#czc-msgs::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 2px;
}

.czc-msg {
    max-width: 82%;
    padding: 11px 15px;
    border-radius: 18px;
    font-size: 13.5px;
    line-height: 1.55;
    word-wrap: break-word;
}

.czc-msg.bot {
    background: #fff;
    color: #333;
    align-self: flex-start;
    border-bottom-left-radius: 6px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .06);
}

.czc-msg.user {
    background: #22c55e;
    color: #fff;
    align-self: flex-end;
    border-bottom-right-radius: 6px;
    box-shadow: 0 1px 3px rgba(34, 197, 94, .3);
}

.czc-msg.typing {
    color: #999;
    font-style: italic;
    background: #fff;
    align-self: flex-start;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .06);
}

.czc-msg a {
    text-decoration: underline;
}

.czc-msg.bot a {
    color: #22c55e;
}

.czc-msg.user a {
    color: #fff;
}

/* Input */
#czc-input-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 14px;
    background: #fff;
    border-top: 1px solid #eee;
}

#czc-input {
    flex: 1;
    border: 1px solid #e5e5e5;
    border-radius: 24px;
    padding: 10px 16px;
    font-size: 13px;
    font-family: inherit;
    outline: none;
    background: #f9f9f9;
    color: #333;
    transition: border .15s;
}

#czc-input:focus {
    border-color: #22c55e;
    background: #fff;
}

#czc-input::placeholder {
    color: #aaa;
}

#czc-send {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #22c55e;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: .15s;
    flex-shrink: 0;
}

#czc-send:hover {
    background: #16a34a;
}

#czc-send:disabled {
    background: #ccc;
    cursor: default;
}

#czc-send svg {
    width: 16px;
    height: 16px;
    color: #fff;
}

/* Mobile */
@media (max-width: 480px) {
    #czc-box {
        left: 8px;
        right: 8px;
        width: auto;
        bottom: 92px;
        max-height: 70vh;
    }
}
