:root {
    --primary-teal:      #008080;
    --primary-teal-dark: #006666;
    --primary-teal-soft: #ccfbf1;
    --bg-body:           #f8fafc;
    --text-dark:         #0f172a;
    --text-muted:        #64748b;
    --border:            #e2e8f0;
}

* { box-sizing: border-box; }

body {
    background: var(--bg-body);
    height: 100vh;
    height: 100dvh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
}

/* Widget Adjustments */
.chatbot-widget-mode body { background: transparent; }
.chatbot-widget-mode .chat-shell { padding: 0; }
.chatbot-widget-mode .chat-container { border-radius: 0; border: none; height: 100vh; max-width: none; }
.chatbot-widget-mode .pub-topbar { display: none; }

/* Topbar — High Contrast Admin Gradient */
.pub-topbar {
    background: linear-gradient(90deg, var(--primary-teal) 0%, var(--primary-teal-dark) 100%);
    padding: 0.8rem 0;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    z-index: 1030; flex-shrink: 0;
}
.topbar-brand {
    font-weight: 700; font-size: 1.15rem; color: white;
    text-decoration: none; display: flex; align-items: center; gap: 0.75rem;
}
.topbar-logo { height: 34px; max-width: 140px; object-fit: contain; }
.topbar-brand-icon {
    width: 34px; height: 34px; background: rgba(255,255,255,0.15);
    border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 1.1rem;
}
.btn-topbar {
    background: rgba(255,255,255,0.15); color: white;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 10px; padding: 0.45rem 1rem; font-size: 0.82rem; font-weight: 500;
    text-decoration: none; display: inline-flex; align-items: center; gap: 0.4rem;
    transition: all 0.2s;
}
.btn-topbar:hover { background: rgba(255,255,255,0.25); color: white; transform: translateY(-1px); }

/* Chat Shell */
.chat-shell {
    flex: 1;
    display: flex;
    align-items: stretch;
    justify-content: center;
    padding: 1.5rem;
    min-height: 0;
    overflow: hidden;
}
.chat-container {
    width: 100%;
    max-width: 850px;
    display: flex;
    flex-direction: column;
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.05);
    overflow: hidden;
    min-height: 0;
    border: 1px solid #f1f5f9;
}

.chat-container-header {
    background: #ffffff; padding: 1.25rem 2rem;
    border-bottom: 1px solid #f1f5f9;
    display: flex; align-items: center; justify-content: space-between;
    flex-shrink: 0;
}
.bot-profile { display: flex; align-items: center; gap: 1rem; }
.bot-avatar {
    width: 46px; height: 46px; border-radius: 14px;
    background: var(--primary-teal-soft); color: var(--primary-teal);
    display: flex; align-items: center; justify-content: center; font-size: 1.5rem;
}
.bot-info-name { font-weight: 700; font-size: 1.05rem; color: var(--text-dark); }
.bot-info-status { font-size: 0.78rem; color: #10b981; font-weight: 600; display: flex; align-items: center; gap: 0.3rem; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: #10b981; display: inline-block; box-shadow: 0 0 8px rgba(16,185,129,0.4); }

.chat-body {
    flex: 1; overflow-y: auto; padding: 2rem; background: #fcfdfe;
    display: flex; flex-direction: column; gap: 1.5rem; scroll-behavior: smooth;
}
.chat-body::-webkit-scrollbar { width: 4px; }
.chat-body::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 10px; }

.chat-msg { display: flex; flex-direction: column; max-width: 78%; }
.chat-msg.bot  { align-self: flex-start; }
.chat-msg.user { align-self: flex-end; }

.msg-bubble {
    padding: 1rem 1.4rem; border-radius: 16px;
    font-size: 0.95rem; line-height: 1.6; font-weight: 500;
}
.chat-msg.bot .msg-bubble {
    background: white; color: var(--text-dark);
    border: 1.5px solid #f1f5f9; box-shadow: 0 2px 5px rgba(0,0,0,0.02);
}
.chat-msg.user .msg-bubble {
    background: var(--primary-teal); color: white;
    box-shadow: 0 4px 15px rgba(0, 128, 128, 0.2);
}

.options-grid { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 0.5rem; }
.btn-option {
    background: white; color: var(--primary-teal);
    border: 2.2px solid var(--primary-teal);
    padding: 0.6rem 1.4rem; border-radius: 12px;
    font-weight: 700; font-size: 0.88rem;
    cursor: pointer; transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.btn-option:hover { background: var(--primary-teal); color: white; transform: translateY(-2px); box-shadow: 0 5px 12px rgba(0,128,128,0.15); }
.btn-option:disabled { opacity: 0.5; background: #f8fafc; border-color: #e2e8f0; color: #94a3b8; transform: none; box-shadow: none; }

.chat-footer { padding: 1.5rem 2rem; background: white; border-top: 1px solid #f1f5f9; flex-shrink: 0; }
.chat-input-wrapper {
    display: flex; gap: 1rem; align-items: center; background: #f8fafc;
    padding: 0.5rem 0.5rem 0.5rem 1.5rem; border-radius: 14px;
    border: 1.5px solid #e2e8f0; transition: all 0.25s ease;
}
.chat-input-wrapper:focus-within { border-color: var(--primary-teal); background: white; box-shadow: 0 0 0 5px var(--primary-teal-soft); }
.chat-input-wrapper input {
    flex: 1; border: none; background: transparent; outline: none;
    font-size: 1rem; color: var(--text-dark); font-family: inherit;
}
.send-btn {
    background: var(--primary-teal); color: white; border: none;
    width: 48px; height: 48px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.25rem; cursor: pointer; transition: all 0.25s ease;
    box-shadow: 0 4px 12px rgba(0,128,128,0.2);
}
.send-btn:hover { background: var(--primary-teal-dark); transform: scale(1.05) translateY(-2px); box-shadow: 0 8px 18px rgba(0,128,128,0.3); }
