* {
    margin: 0;
    padding: 5px 0;
    box-sizing: border-box;
}

/* Events admin page */
.events-shell {
    max-width: 1200px;
    margin: 0 auto;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 18px 60px rgba(11, 37, 69, 0.08);
    padding: 28px 32px 40px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.events-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 16px;
}

.events-eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 12px;
    color: var(--muted);
    margin-bottom: 4px;
}

.events-header h1 {
    margin: 0;
    font-size: 28px;
}

.events-subhead {
    color: var(--muted);
    margin: 6px 0 0 0;
    max-width: 640px;
}

.events-actions {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.events-main {
    display: grid;
    grid-template-columns: minmax(0, 2fr);
    gap: 24px;
}

.filter-panel,
.histogram-panel,
.results-panel,
.detail-panel {
    background: #fafafa;
    border: 1px solid #eee;
    border-radius: 16px;
    padding: 20px;
}

.events-form label {
    display: flex;
    flex-direction: column;
    font-size: 13px;
    color: var(--muted);
    gap: 4px;
}

.events-form input,
.events-form select {
    border: 1px solid #dcdcdc;
    border-radius: 8px;
    padding: 8px 10px;
    font-size: 14px;
}

.events-form .form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px;
    margin-bottom: 14px;
}

.form-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.explorer-panel {
    padding: 0;
}

.explorer-collapse {
    border: 1px solid #eee;
    border-radius: 16px;
    background: #fafafa;
    overflow: hidden;
}

.explorer-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    cursor: pointer;
    list-style: none;
    gap: 12px;
}

.explorer-summary .results-meta {
    margin: 0;
}

.explorer-summary::-webkit-details-marker {
    display: none;
}

.explorer-summary::after {
    content: '>';
    font-weight: 700;
    color: var(--muted);
    transition: transform 0.2s ease;
}

.explorer-collapse[open] .explorer-summary::after {
    transform: rotate(90deg);
}

.explorer-eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 11px;
    color: var(--muted);
}

.explorer-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--primary-dark);
}

.explorer-body {
    display: grid;
    gap: 16px;
    padding: 16px;
    background: #fff;
    border-top: 1px solid #eee;
}

.secondary-btn {
    background: #fff;
    color: var(--primary-dark);
    border: 1px solid #dcdcdc;
    padding: 10px 18px;
    border-radius: 10px;
    cursor: pointer;
}

.results-meta {
    font-size: 14px;
    color: var(--muted);
    margin-bottom: 10px;
}

.table-wrapper {
    overflow-x: auto;
    overflow-y: auto;
    max-height: var(--events-list-height);
}

.events-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.events-table th,
.events-table td {
    padding: 10px;
    border-bottom: 1px solid #eaeaea;
    text-align: left;
    vertical-align: top;
}

.events-table th {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
}

.events-table tbody tr {
    cursor: pointer;
}

.events-table tbody tr:hover {
    background: #f0f4ff;
}

.events-table tbody tr.selected {
    background: #e1eaff;
}

.preview-cell {
    max-width: 360px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.detail-panel {
    grid-column: 1 / -1;
}

.detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.detail-output {
    background: #fff;
    border: 1px solid #e1e1e1;
    border-radius: 12px;
    padding: 16px;
    max-height: 380px;
    overflow: auto;
    font-size: 13px;
}

@media (max-width: 900px) {
    .events-shell {
        padding: 20px;
    }
    .events-header h1 {
        font-size: 24px;
    }
    .filter-panel,
    .results-panel,
    .detail-panel {
        padding: 16px;
    }
}

/* Site color palette variables (Art Lewin-inspired) */
:root {
    --bg: #ffffff;
    --surface: #fbf7f1; /* warm off-white */
    --primary-dark: #0b2545; /* deep navy */
    --accent: #b98b3b; /* warm gold */
    --muted: #6b6b6b;
    --link: #0b3a66;
    --bubble-width: min(260px, 90%);
    --events-list-height: calc(10 * 52px + 48px);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--bg);
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    color: var(--primary-dark);
}

body.landing-body {
    background: radial-gradient(circle at 15% 20%, rgba(185, 139, 59, 0.15), transparent 40%),
                radial-gradient(circle at 80% 0%, rgba(11, 37, 69, 0.25), transparent 35%),
                #0b2545;
    color: #f8f8f8;
    display: block;
    min-height: 100vh;
    height: auto;
    padding: 0;
}

body.landing-body main {
    display: flex;
    flex-direction: column;
    gap: 32px;
    padding: 32px 5vw 64px;
}

body.landing-body .container {
    max-width: 1200px;
    width: 100%;
    height: auto;
    margin: 0 auto;
    box-shadow: 0 20px 60px rgba(11, 37, 69, 0.16);
}

.hero {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 32px;
    padding: 64px 5vw 48px;
    background: linear-gradient(120deg, rgba(11, 37, 69, 0.96) 0%, rgba(11, 37, 69, 0.86) 55%, rgba(185, 139, 59, 0.82) 110%);
    color: #fefefe;
    align-items: center;
}

.hero-content {
    max-width: 560px;
}

.hero-eyebrow {
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 6px;
}

.hero-title {
    font-size: clamp(32px, 3vw, 46px);
    line-height: 1.1;
    margin: 6px 0 10px;
}

.hero-subhead {
    font-size: 17px;
    margin-bottom: 18px;
    color: rgba(255, 255, 255, 0.86);
}

.hero-cta-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin: 12px 0;
}

.cta-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 22px;
    border-radius: 999px;
    border: none;
    background: var(--accent);
    color: #fff;
    font-weight: 700;
    font-size: 15px;
    letter-spacing: 0.01em;
    cursor: pointer;
    text-decoration: none;
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.2);
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.2s ease;
}

.cta-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.24);
}

.cta-btn.ghost {
    background: transparent;
    border: 1.5px solid rgba(255, 255, 255, 0.72);
    color: #fff;
    box-shadow: none;
}

.hero-note {
    margin-top: 6px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.76);
}

.hero-visual {
    width: 100%;
    min-height: 320px;
    border-radius: 20px;
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02)),
                url('https://images.unsplash.com/photo-1521572267360-ee0c2909d518?auto=format&fit=crop&w=1400&q=80') center/cover;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.16);
}

.highlight-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
    background: #f7f3ec;
    color: var(--primary-dark);
    padding: 20px;
    border-radius: 16px;
}

.highlight {
    background: #fff;
    border-radius: 12px;
    padding: 18px;
    border: 1px solid #e4e0d8;
    box-shadow: 0 10px 30px rgba(11, 37, 69, 0.05);
}

.eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 12px;
    color: var(--muted);
    margin: 0;
}

.highlight h3 {
    margin: 4px 0 8px;
    font-size: 18px;
}

.story-block {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 18px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 22px 20px;
    color: #f6f6f6;
}

.story-copy h2 {
    margin: 6px 0 10px;
    font-size: 26px;
}

.story-panel {
    background: rgba(11, 37, 69, 0.6);
    border-radius: 14px;
    padding: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.story-panel ul {
    list-style: none;
    padding-left: 0;
    margin: 0;
    display: grid;
    gap: 8px;
}

.story-panel li::before {
    content: '•';
    color: var(--accent);
    margin-right: 8px;
}

.contact-inline {
    font-weight: 600;
    color: #fefefe;
}

.chatbot-section {
    background: #f7f3ec;
    border-radius: 18px;
    padding: 18px 18px 28px;
    border: 1px solid #e6e0d6;
    color: var(--primary-dark);
}

.chatbot-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.chatbot-section .cta-btn.ghost {
    border-color: var(--primary-dark);
    color: var(--primary-dark);
    box-shadow: none;
}

.chatbot-panel {
    margin-top: 12px;
    padding: 6px;
    border-radius: 16px;
    background: #fff;
    border: 1px solid #e6e0d6;
    box-shadow: 0 14px 34px rgba(11, 37, 69, 0.12);
}

.chatbot-panel[hidden] {
    display: none;
}

.chat-shell {
    background: var(--surface);
}

.footer {
    padding: 18px 5vw 26px;
    background: rgba(0, 0, 0, 0.16);
    color: #f7f7f7;
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
}

.footer a {
    color: #f7f7f7;
}

body.events-body {
    background: #f4f6fb;
    min-height: 100vh;
    height: auto;
    display: block;
    padding: 24px 16px 48px;
}

.container {
    width: 100%;
    max-width: 1100px;
    height: 90vh;
    background: var(--surface);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(11, 37, 69, 0.12);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.content {
    flex: 1;
    display: flex;
    gap: 20px;
}

.main {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Allow flex children to shrink properly so the chat scroll area doesn't push the input offscreen */
.content, .main {
    min-height: 0;
}

.sidebar {
    width: 320px;
    padding: 20px;
    background: #fafafa;
    border-left: 1px solid #eee;
    overflow-y: auto;
}

.debug-side {
    width: 360px;
    padding: 20px;
    background: #fafafa;
    border-left: 1px solid #eee;
    overflow-y: auto;
}

.sidebar h2 {
    font-size: 18px;
    margin-bottom: 10px;
}

.sidebar fieldset {
    border: 1px solid #e6e6e6;
    padding: 6px;
    margin-bottom: 6px;
    border-radius: 8px;
}

.sidebar input[type="text"],
.sidebar input[type="email"],
.your-info-grid input {
    width: 100%;
    padding: 5px 6px;
    margin-top: 2px;
    margin-bottom: 2px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 13px;
}

.sidebar label { display: block; font-size: 13px; color: #333; margin-bottom: 4px; }
/* Compact labels inside the your-info grid */
.your-info-grid { display: grid; grid-template-columns: 1fr 1fr; column-gap: 10px; row-gap: 6px; align-items: start; }
.your-info-grid label { display: flex; flex-direction: column; font-size: 13px; margin-bottom: 4px; }
.your-info-grid input { padding: 5px 6px; font-size: 13px; margin: 0; }
.sidebar input[type="tel"] { padding: 5px 6px; font-size: 13px; }

/* Checkbox bubble styles: input inside label followed by span text */
.checkbox-bubble {
    display: inline-flex;
    align-items: center;
    gap: 10px; /* horizontal space between checkbox and label bubble */
    margin: 1.5px 6px 1.5px 0; /* vertical space between bubbles (top/bottom), horizontal space (right) */
    cursor: pointer;
}
.checkbox-bubble input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 0; /* no extra space around checkbox itself */
    flex: 0 0 auto;
    accent-color: #ffffff; /* make check white when background is blue */
}
.checkbox-bubble span {
    display: inline-block;
    padding: 2px 7px; /* vertical (top/bottom) and horizontal (left/right) padding inside bubble */
    border-radius: 12px;
    background: transparent;
    border: 1px solid transparent;
    color: #222;
    font-size: 14px;
}
.checkbox-bubble input[type="checkbox"]:checked + span {
    background: var(--accent); /* warm gold bubble */
    color: #fff;
    border-color: transparent;
}
.checkbox-bubble input[type="checkbox"]:not(:checked) + span {
    background: transparent;
    color: var(--primary-dark);
}

.sidebar legend {
    font-weight: 600;
    margin-bottom: 6px;
}

.apply-btn {
    display: inline-block;
    margin-top: 6px;
    padding: 8px 12px;
    border-radius: 8px;
    border: none;
    background: linear-gradient(90deg, var(--primary-dark), var(--primary-dark));
    color: var(--surface);
    cursor: pointer;
}

.hint {
    font-size: 12px;
    color: var(--muted);
    margin-top: 8px;
}

.session-info {
    margin-top: 12px;
    padding-top: 8px;
    border-top: 1px dashed #e6e6e6;
}
.session-label {
    font-size: 12px;
    color: #444;
    margin-bottom: 6px;
    font-weight: 700;
}
.session-value {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: monospace;
    font-size: 13px;
    color: #222;
}
.copy-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    padding: 4px;
}
.copy-btn:hover { opacity: 0.9; }
.copy-feedback {
    margin-top: 6px;
    font-size: 12px;
    color: #0a0;
}
.copy-feedback {
    color: #2b7a2b;
    font-size: 0.9rem;
}

/* Debug panel styles */
.debug-panel {
    margin-top: 12px;
    border: 1px solid #e0e0e0;
    background: #fafafa;
    padding: 8px;
    border-radius: 6px;
}
/* Hide the debug side panel by default; toggled open via .debug-side.open */
.debug-side {
    display: none;
}
.debug-side.open {
    display: block;
}
.debug-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}
.refresh-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}
.debug-output {

.done-btn {
    background: transparent;
    color: #000;
    border: 2px solid #000;
    padding: 6px 10px;
    border-radius: 6px;
    cursor: pointer;
}
    font-family: monospace;
    font-size: 12px;
    line-height: 1.3;
    white-space: pre-wrap;
    word-break: break-word;
    max-height: 240px;
    overflow: auto;
    padding: 6px;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 4px;
}

.chat-header {
    background: linear-gradient(90deg, var(--primary-dark) 0%, rgba(11,37,69,0.9) 100%);
    color: var(--surface);
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-header h1 {
    font-size: 24px;
    font-weight: 600;
}

.reset-btn {
    background: transparent;
    color: #000;
    border: 2px solid #000;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.reset-btn:hover {
    background: rgba(0,0,0,0.04);
    color: #000;
    border-color: #000;
}

.done-btn {
    background: transparent;
    color: #000;
    border: 2px solid #000;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.done-btn:hover {
    background: rgba(0,0,0,0.04);
    color: #000;
    border-color: #000;
}

.chat-container {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: #f5f5f5;
}

/* Ensure the chat area can shrink and keep the input visible */
.chat-container {
    min-height: 0;
}

.welcome-message {
    background: white;
    padding: 15px;
    border-radius: 12px;
    margin-bottom: 15px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.welcome-message p {
    color: #333;
    font-size: 16px;
}

.message {
    margin-bottom: 15px;
    display: flex;
    flex-direction: column;
}

.message.user {
    align-items: flex-end;
}

.message.assistant {
    align-items: flex-start;
}

.message-content {
    max-width: 70%;
    padding: 12px 16px;
    border-radius: 12px;
    word-wrap: break-word;
    white-space: pre-wrap;
    line-height: 1.5;
}

.message.user .message-content {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-bottom-right-radius: 4px;
}

.message.assistant .message-content {
    background: white;
    color: #333;
    border-bottom-left-radius: 4px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* System message styling (different color bubble) */
.message.system .message-content {
    background: #eef6ff;
    color: #0b2545;
    border-radius: 12px;
    border: 1px solid rgba(11,37,69,0.06);
    font-weight: 600;
}

/* Modal styles for prompt display */
.modal {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.4);
    z-index: 1000;
}
.modal[hidden] { display: none; }
.modal-content {
    background: #fff;
    padding: 12px;
    border-radius: 8px;
    width: min(880px, 95%);
    max-height: 80vh;
    box-shadow: 0 20px 60px rgba(11,37,69,0.15);
    display: flex;
    flex-direction: column;
}
.modal-header {
    display:flex;
    justify-content:space-between;
    align-items:center;
    margin-bottom:8px;
}
.modal-body { overflow:auto; }
.modal .refresh-btn { font-size: 16px; }

.message-label {
    font-size: 12px;
    color: #666;
    margin-bottom: 5px;
    font-weight: 600;
}

.input-container {
    padding: 20px;
    background: white;
    border-top: 1px solid #e0e0e0;
    display: flex;
    gap: 10px;
}

/* Keep the input area from shrinking and stay visible */
.input-container {
    flex: 0 0 auto;
}

#user-input {
    flex: 1;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 14px;
    font-family: inherit;
    resize: none;
    transition: border-color 0.3s ease;
}

#user-input:focus {
    outline: none;
    border-color: #667eea;
}

.send-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.send-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.send-btn:active {
    transform: translateY(0);
}

.send-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(102, 126, 234, 0.3);
    border-radius: 50%;
    border-top-color: #667eea;
    animation: spin 1s ease-in-out infinite;
}

/* Typing cursor for streamed responses */
.typing-cursor {
    display: inline-block;
    width: 8px;
    height: 1.2em;
    background: #333;
    margin-left: 6px;
    vertical-align: text-bottom;
    animation: blinkCaret 1s steps(2, start) infinite;
}

@keyframes blinkCaret {
    50% { opacity: 0; }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.error-message {
    background: #fee;
    color: #c00;
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 15px;
    border-left: 4px solid #c00;
}

/* Vertical, compact bubble list for common questions */
.vertical-bubble-list {
    display: flex;
    flex-direction: column;
    gap: 4px; /* minimal vertical space between bubbles */
    align-items: stretch;
    width: 100%;
    margin-bottom: 16px;
    /* Reserve enough height so controls can sit at the bottom */
    min-height: 220px;
}
.sidebar-bubbles.collapsed {
    display: none;
}

/* Toggle button placed between the bubbles and the main chat area, vertically centered */
.toggle-bubbles-btn {
    align-self: center;
    margin: 0 8px;
    min-width: 56px;
    height: 88px;
    border-radius: 10px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 14px;
    line-height: 1;
    padding: 6px 10px;
    transition: opacity 0.2s ease;
    box-shadow: 0 6px 16px rgba(118,75,162,0.12);
}
.toggle-bubbles-btn .faq-arrow {
    display: inline-block;
    transition: transform 0.2s ease;
}
.toggle-bubbles-btn[aria-expanded="true"] .faq-arrow {
    transform: rotate(180deg);
}
.toggle-bubbles-btn:focus { outline: 3px solid rgba(102,126,234,0.18); }

@media (max-width: 900px) {
    .toggle-bubbles-btn { height: 64px; min-width: 44px; padding: 6px 8px; font-size: 13px; }
    .toggle-bubbles-btn .faq-label { display: none; }
}
.vertical-bubble-list .bubble-btn {
    /* fixed responsive width so every slide occupies identical horizontal space */
    width: var(--bubble-width);
    min-width: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center; /* center content inside the button */
    padding: 6px 14px;
    font-size: 14px;
    border-radius: 12px; /* match checked checkbox and send button */
    margin: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); /* match send button */
    color: #fff !important; /* always white text for bubble-btn */
    border: none;
    text-align: center;
    box-shadow: none;
    font-weight: 600;
    transition: background 0.2s, color 0.2s;
    /* prevent text wrapping and keep single-line appearance */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Make the sidebar-bubbles container slightly wider than the bubble buttons
   so the FAQ panel visually wraps the buttons. 105% keeps a small margin. */
.sidebar-bubbles {
    width: calc(var(--bubble-width) * 1.05);
    box-sizing: content-box;
}
.vertical-bubble-list .bubble-btn:hover,
.vertical-bubble-list .bubble-btn:focus {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%); /* reverse gradient for hover */
    color: #fff;
    outline: none;
}

/* Ensure inner span text (used by .checkbox-bubble span) is white as well.
   The form's checkbox bubble rule targets `.checkbox-bubble span { color: #222; }`
   which applies to our button because buttons also use the `.checkbox-bubble` class.
   Therefore we need a more specific override here to force white text. */
.vertical-bubble-list .bubble-btn span,
.vertical-bubble-list-ul .bubble-btn span {
    color: #fff !important;
    display: inline-block;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Input actions (mic + send) */
.input-actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.mic-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: #fff;
    color: #333;
    border: 1px solid rgba(0,0,0,0.06);
    cursor: pointer;
    font-size: 18px;
    transition: box-shadow 0.12s ease, transform 0.08s ease;
}
.mic-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 12px rgba(0,0,0,0.06); }
.mic-btn.listening { background: #ff5a5f; color: #fff; box-shadow: 0 8px 20px rgba(255,90,95,0.14); }
.mic-btn.listening::after {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    background: #fff;
    border-radius: 50%;
    margin-left: 6px;
    box-shadow: 0 0 8px rgba(255,255,255,0.9);
}

/* Microphone permission / error message */
.mic-permission {
    margin-top: 8px;
    padding: 8px 10px;
    background: #fff3f3;
    color: #7a1212;
    border: 1px solid #f1c0c0;
    border-radius: 6px;
    font-size: 13px;
}

/* TTS toggle button */
.tts-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: #fff;
    color: #333;
    border: 1px solid rgba(0,0,0,0.06);
    cursor: pointer;
    font-size: 18px;
}
.tts-btn[aria-pressed="true"] { background: #222; color: #fff; }
.tts-btn:hover { transform: translateY(-1px); }

/* tiny-slider controls and nav styling for the sidebar */
.vertical-bubble-list .tns-controls,
.vertical-bubble-list-ul .tns-controls,
.vertical-bubble-list .tns-nav,
.vertical-bubble-list-ul .tns-nav {
    /* push controls/nav to the bottom of the vertical container */
    margin-top: auto;
    display: flex;
    gap: 6px;
    align-items: center;
    justify-content: center;
    padding: 8px 0 0 0;
}

/* Center each list item and constrain button width so buttons appear centered */
.vertical-bubble-list-ul li {
    display: flex;
    justify-content: center;
    padding: 5px 0; /* keep the vertical spacing we previously added */
}
.vertical-bubble-list .tns-controls button,
.vertical-bubble-list-ul .tns-controls button {
    background: transparent;
    border: 1px solid rgba(0,0,0,0.08);
    color: #222;
    padding: 6px 10px;
    border-radius: 8px;
    cursor: pointer;
}
.vertical-bubble-list .tns-nav button,
.vertical-bubble-list-ul .tns-nav button {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(0,0,0,0.12);
    border: none;
}
.vertical-bubble-list .tns-nav .tns-nav-active,
.vertical-bubble-list-ul .tns-nav .tns-nav-active {
    background: var(--accent);
}

/* About section placed under the carousel — it should match the width of the bubble area above */
.sidebar-bubbles .about-section {
    width: 100%; /* take the full width of the parent (which is shrink-wrapped) */
    box-sizing: border-box;
    padding: 10px 12px 6px 12px;
}
.sidebar-bubbles .about-title {
    margin: 0 0 6px 0;
    font-size: 15px;
    text-align: center;
    color: var(--primary-dark);
}
.sidebar-bubbles .about-summary {
    margin: 0;
    font-size: 13px;
    color: var(--muted);
    text-align: center;
    line-height: 1.4;
}

/* FAQ title styling */
.sidebar-bubbles .faq-title {
    text-align: center;
    margin-bottom: 10px;
    font-size: 18px;
    font-weight: 700;
    color: var(--primary-dark);
}

/* Scrollbar styling */
.chat-container::-webkit-scrollbar {
    width: 8px;
}

.chat-container::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.chat-container::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.chat-container::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Responsive design */
@media (max-width: 600px) {
    .container {
        height: 100vh;
        border-radius: 0;
    }
    
    .chat-header h1 {
        font-size: 20px;
    }
    
    .reset-btn {
        padding: 6px 12px;
        font-size: 12px;
    }
    
    .message-content {
        max-width: 85%;
    }
    .content {
        flex-direction: column;
    }
    .sidebar {
        width: 100%;
        border-left: none;
        border-top: 1px solid #eee;
        padding: 12px;
    }
    .debug-side {
        width: 100%;
        border-left: none;
        border-top: 1px solid #eee;
        padding: 12px;
    }
}
