
/* Layout */
.ws-chat .ws-panel {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 16px;
    max-width: 980px;
    margin: 24px auto;
    padding: 16px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}

.ws-sidebar {
    background: #0d1b2a;
    color: #e9ecef;
    border-radius: 10px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ws-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0d6efd, #6f42c1);
    margin-bottom: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.25);
    border: 2px solid #ffffff;
}

.ws-sidebtn {
    display: block;
    text-decoration: none;
    color: #e9ecef;
    background: #1b263b;
    padding: 10px 12px;
    border-radius: 8px;
    transition: background .2s ease;
}
.ws-sidebtn:hover { background: #24344d; }

.ws-copy { margin-top: auto; font-size: 12px; color: #adb5bd; }

.ws-body {
    display: grid;
    grid-template-rows: auto 1fr auto;
    gap: 10px;
}

.ws-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
}
.ws-brand-mark {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0d6efd, #6f42c1);
    color: #fff;
    border: 2px solid #ffffff;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}
.ws-brand-name { font-size: 16px; }

/* Messages container */
.ws-messages {
    background: #f7f7f9;
    border-radius: 10px;
    padding: 12px;
    overflow-y: auto;
    min-height: 220px;
    max-height: 420px;
}

/* Message bubbles */
.ws-msg {
    padding: 8px 10px;
    border-radius: 10px;
    margin-bottom: 10px;
    max-width: 90%;
    word-wrap: break-word;
    font-size: 14px;
    line-height: 1.45;
}
.ws-msg.user { background: #d1e7dd; margin-left: auto; }
.ws-msg.bot  { background: #e9ecef; margin-right: auto; }

/* Rich HTML inside messages */
.ws-msg h2, .ws-msg h3, .ws-msg h4 { margin: 0 0 6px; line-height: 1.3; font-weight: 700; }
.ws-msg p { margin: 0 0 6px; }
.ws-msg ul, .ws-msg ol { margin: 0 0 8px 22px; }
.ws-msg a { color: #0d6efd; text-decoration: underline; word-break: break-word; }

/* Inline cards (intake and choices) */
.ws-card { padding: 10px; background: #fff; border: 1px solid #e9ecef; border-radius: 8px; }
.ws-form-title { font-weight: 600; margin-bottom: 8px; }
.ws-field { display: grid; gap: 6px; margin-bottom: 10px; }
.ws-field input[type="text"],
.ws-field input[type="email"] {
    border: 1px solid #dcdcdc;
    border-radius: 6px;
    padding: 8px;
    font-size: 14px;
    background: #fff;
}

/* Choices */
.ws-inline-choices { display: flex; gap: 8px; flex-wrap: wrap; }
.ws-choice {
    border: 1px solid #bcd0ff;
    color: #0d6efd;
    background: #eff6ff;
    border-radius: 16px;
    padding: 6px 10px;
    cursor: pointer;
}
.ws-choice:hover { background: #e6f0ff; }

/* Typing indicator */
.ws-typing {
    width: 44px;
    height: 12px;
    border-radius: 6px;
    background: linear-gradient(90deg, #ccc 25%, #eee 50%, #ccc 75%);
    background-size: 200% 100%;
    animation: ws-shimmer 1.2s infinite;
    margin-bottom: 8px;
}
@keyframes ws-shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Chat bar (clear icons + disabled state) */
.ws-chatbar {
    display: grid;
    grid-template-columns: 40px 1fr 44px;
    gap: 8px;
    align-items: center;
}
.ws-mic,
.ws-send {
    height: 40px;
    border-radius: 8px;
    background: #ffffff;
    color: #0d6efd;
    border: 1px solid #0d6efd;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}
.ws-mic { color: #6c757d; border-color: #6c757d; }
.ws-mic:hover { background: #f3f3f3; }
.ws-send:hover { background: #f3faff; }
.ws-send {padding:0px !important;}
.ws-sidebtn {
  color: white !important;
}
.ws-chatbar input[type="text"] {
    border: 1px solid #dcdcdc;
    border-radius: 8px;
    padding: 10px;
    font-size: 14px;
    background: #fff;
}

.ws-chatbar .is-disabled { opacity: 0.5; cursor: not-allowed; }

/* Popup */
.ws-launcher {
    position: fixed;
    bottom: 20px;
    right: 20px;
    border: none;
    background: #0d6efd;
    color: #fff;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    box-shadow: 0 8px 24px rgba(13, 110, 253, 0.4);
    cursor: pointer;
    z-index: 10000;
    font-size: 22px;
}
.ws-popup {
    position: fixed;
    right: 20px;
    bottom: 84px;
    width: 340px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    display: grid;
    grid-template-rows: auto 1fr auto;
    gap: 10px;
    padding: 10px;
    z-index: 10001;
}
.ws-popup.is-hidden { display: none; }
.ws-pop-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.ws-pop-title { font-weight: 700; }
.ws-close {
    border: none;
    background: transparent;
    font-size: 24px;
    cursor: pointer;
}

/* Utilities */
.ws-btn-primary {
    background: #0d6efd;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 8px 12px;
    cursor: pointer;
}

/* If desktop and popup used together */
.ws-desktop { margin-right: 96px; }


.is-hidden { display: none !important; }

.ws-messages { background: #f7f7f9; border-radius: 10px; padding: 12px; overflow-y: auto; min-height: 220px; max-height: 420px; }
.ws-msg { padding: 8px 10px; border-radius: 10px; margin-bottom: 10px; max-width: 90%; word-wrap: break-word; font-size: 14px; line-height: 1.45; }
.ws-msg.user { background: #d1e7dd; margin-left: auto; }
.ws-msg.bot  { background: #e9ecef; margin-right: auto; }
.ws-card { padding: 10px; background: #fff; border: 1px solid #e9ecef; border-radius: 8px; }
.ws-form-title { font-weight: 600; margin-bottom: 8px; }
.ws-field { display: grid; gap: 6px; margin-bottom: 10px; }
.ws-inline-choices { display: flex; gap: 8px; flex-wrap: wrap; }

.ws-chatbar .is-disabled { opacity: 0.5; cursor: not-allowed; }
.ws-restart { background: #0d6efd; color: #fff; border: none; border-radius: 8px; padding: 8px 12px; cursor: pointer; }
.ws-restart:hover { background: #0b5ed7; }

/* Headings/lists/links inside bot HTML */
.ws-msg h2, .ws-msg h3, .ws-msg h4 { margin: 0 0 6px; line-height: 1.3; font-weight: 700; font-size:18px;}
.ws-msg p { margin: 0 0 6px; }
.ws-msg ul, .ws-msg ol { margin: 0 0 8px 22px; }
.ws-msg a { color: #0d6efd; text-decoration: underline; word-break: break-word; }