/* =========================================
   BetAI Chat â€” Sports Dark Theme
   ========================================= */

:root {
    --betai-bg: #0f0f13;
    --betai-surface: #1a1a22;
    --betai-surface-2: #22222e;
    --betai-border: rgba(255, 255, 255, 0.08);
    --betai-gold: #f5c842;
    --betai-gold-dim: rgba(245, 200, 66, 0.15);
    --betai-text: #e8e8f0;
    --betai-text-muted: #7a7a94;
    --betai-user-bubble: #2b2b3d;
    --betai-ai-bubble: #1e1e2a;
    --betai-radius: 16px;
    --betai-radius-sm: 10px;
    --betai-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
    --betai-font: 'Georgia', serif;
    --betai-font-ui: system-ui, -apple-system, sans-serif;
}

.betai-auth-wall-msg {
  margin-bottom: 25px !important;
}

/* Base wrapper */
#betai-chat-wrapper {
    font-family: var(--betai-font-ui);
    color: var(--betai-text);
    max-width: 100%;
	width: 1100px;
    margin: 0 auto;
    position: relative;
}

/* =====================
   HERO STATE
   ===================== */
.betai-hero {
    text-align: center;
    padding: 48px 24px 32px;
    animation: betai-fade-in 0.5s ease both;
}
.footermainwrp {
    display: none;
}
.betai-hero-title {
    font-size: 34px;
    font-weight: 700;
    letter-spacing: -0.03em;
    margin: 0 0 12px;
    color: var(--betai-text);
    line-height: 1.15;
}

.betai-hero-subtitle {
    font-size: 18px;
    color: var(--betai-text-muted);
    margin: 0 0 32px;
    max-width: 540px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}
.betai-hero-subtitle span{font-size: 24px;}

/* =====================
   INPUT AREA
   ===================== */
.betai-input-area {
    position: relative;
    background: var(--betai-surface);
    border: 1px solid var(--betai-border);
    border-radius: var(--betai-radius);
    padding: 5px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2), 0 0 0 0 rgba(245, 200, 66, 0);
    transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

.betai-input-area:focus-within {
    border-color: rgba(245, 200, 66, 0.3);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3), 0 0 0 3px rgba(245, 200, 66, 0.12);
}

.betai-hero-input {
    max-width: 720px;
    margin: 0 auto;
    text-align: left;
}

.betai-textarea {
    width: 100%;
    background: none;
    border: none;
    outline: none;
    color: var(--betai-text);
    font-size: 16px;
    font-family: "Aptos";
    resize: none;
    line-height: 1.6;
    min-height: 44px;
    max-height: 220px;
    overflow-y: auto;
    display: block;
}

.betai-textarea::placeholder {
    color: var(--betai-text-muted);
}

.footermainwrp{
	display:none !important;
}

.betai-send-btn {
    position: absolute;
    right: 14px;
    bottom: 14px;
    width: 38px;
    height: 43px;
    border-radius: 50%;
    background: var(--betai-gold);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #0f0f13;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    flex-shrink: 0;
    line-height: 1;
}
.betai-send-btn svg {
    display: block;
    width: 18px;
    height: 18px;
    stroke: #0f0f13;
    fill: none;
    flex-shrink: 0;
}
.betai-send-btn:hover:not(:disabled) svg {
    stroke: #ffffff;
}
.betai-send-btn:disabled svg {
    stroke: var(--betai-text-muted);
}

.betai-send-btn:hover:not(:disabled) {
    transform: scale(1.08);
    box-shadow: 0 4px 16px rgba(245, 200, 66, 0.5);
	color: #fff;
}

.betai-send-btn:active:not(:disabled) {
    transform: scale(0.96);
}

.betai-send-btn:disabled {
    background: var(--betai-surface-2);
    color: var(--betai-text-muted);
    cursor: not-allowed;
}

.betai-hint {
	display: none;
    font-size: 14px;
    color: var(--betai-text-muted);
    margin: 10px 0 0;
    text-align: center;
}

/* =====================
   AUTH SECTION
   ===================== */
.betai-auth-section {
    margin-top: 24px;
}

.betai-user-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 10px 16px;
    background: var(--betai-surface);
    border: 1px solid var(--betai-border);
    border-radius: 40px;
    width: fit-content;
    margin: 0 auto;
    animation: betai-fade-in 0.3s ease both;
}

.betai-user-info {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--betai-text);
}

.betai-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--betai-border);
}

.betai-logout-btn {
    font-size: 12px;
    color: var(--betai-text-muted);
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    transition: color 0.2s, background 0.2s;
}
.betai-logout-btn:hover {
    color: var(--betai-gold);
    background: var(--betai-gold-dim);
}

.betai-login-prompt {
    display: flex;
    justify-content: center;
}

.betai-auth-trigger-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--betai-text-muted);
    background: var(--betai-surface);
    border: 1px solid var(--betai-border);
    border-radius: 40px;
    padding: 10px 20px;
    cursor: pointer;
    transition: color 0.2s, border-color 0.2s, background 0.2s;
}
.betai-auth-trigger-btn:hover {
    color: var(--betai-gold);
    border-color: rgba(245, 200, 66, 0.3);
    background: var(--betai-gold-dim);
}

/* =====================
   CHAT PANEL
   ===================== */
.betai-chat-panel {
	margin: 45px 0;
    background: var(--betai-bg);
    border: 1px solid var(--betai-border);
    border-radius: var(--betai-radius);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: var(--betai-shadow);
    animation: betai-slide-up 0.4s ease both;
    min-height: 600px;
	max-height: 100%;
}

.betai-chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    border-bottom: 1px solid var(--betai-border);
    background: var(--betai-surface);
    flex-shrink: 0;
}

.betai-chat-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 600;
    color: var(--betai-text);
    letter-spacing: 0.01em;
}

.betai-brand-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--betai-gold);
    box-shadow: 0 0 8px rgba(245, 200, 66, 0.7);
    animation: betai-pulse 2s ease-in-out infinite;
}

.betai-chat-actions {
    display: flex;
    gap: 6px;
}

.betai-icon-btn {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: none;
    border: 1px solid var(--betai-border);
    color: var(--betai-text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s, background 0.2s, border-color 0.2s;
    line-height: 1;
}
.betai-icon-btn svg {
    display: block;
    width: 16px;
    height: 16px;
    stroke: #7a7a94;
    fill: none;
    flex-shrink: 0;
    transition: stroke 0.2s;
}
.betai-icon-btn:hover {
    color: var(--betai-gold);
    background: var(--betai-gold-dim);
    border-color: rgba(245, 200, 66, 0.3);
}
.betai-icon-btn:hover svg {
    stroke: #b8900a;
}

/* Messages */
.betai-messages {
    flex: 1;
    overflow-y: auto;
    padding: 24px 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    min-height: 320px;
    max-height: 460px;
    scrollbar-width: thin;
    scrollbar-color: var(--betai-surface-2) transparent;
}
.betai-messages::-webkit-scrollbar { width: 4px; }
.betai-messages::-webkit-scrollbar-track { background: transparent; }
.betai-messages::-webkit-scrollbar-thumb { background: var(--betai-surface-2); border-radius: 4px; }

/* Message bubbles */
.betai-message {
    display: flex;
    gap: 12px;
    animation: betai-msg-in 0.3s ease both;
    max-width: 88%;
}

.betai-message.betai-msg-user {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.betai-message.betai-msg-ai {
    align-self: flex-start;
}

.betai-msg-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    margin-top: 2px;
}

.betai-msg-user .betai-msg-avatar {
    background: var(--betai-gold);
    color: #0f0f13;
}

.betai-msg-ai .betai-msg-avatar {
    background: var(--betai-surface-2);
    border: 1px solid var(--betai-border);
    font-size: 1rem;
}

.betai-msg-bubble {
    padding: 12px 16px;
    border-radius: var(--betai-radius-sm);
    font-size: 16px;
    line-height: 1.65;
}

.betai-msg-user .betai-msg-bubble {
    background: var(--betai-user-bubble);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-top-right-radius: 4px;
}

.betai-msg-ai .betai-msg-bubble {
    background: var(--betai-ai-bubble);
    border: 1px solid var(--betai-border);
    border-top-left-radius: 4px;
}

/* Thinking indicator */
.betai-thinking {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 12px 16px;
}
.betai-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--betai-gold);
    opacity: 0.4;
    animation: betai-bounce 1.2s ease-in-out infinite;
}
.betai-dot:nth-child(2) { animation-delay: 0.2s; }
.betai-dot:nth-child(3) { animation-delay: 0.4s; }

/* Chat input area */
.betai-chat-input-area {
    padding: 16px 20px;
    border-top: 1px solid var(--betai-border);
    background: var(--betai-surface);
    flex-shrink: 0;
}

/* =====================
   AUTH MODAL
   ===================== */
.betai-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: betai-fade-in 0.25s ease both;
}

.betai-modal {
    background: var(--betai-surface);
    border: 1px solid var(--betai-border);
    border-radius: 20px;
    width: 100%;
    max-width: 420px;
    position: relative;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.7);
    animation: betai-slide-up 0.3s ease both;
    max-height: 90vh;
    overflow-y: auto;
}

.betai-modal-body {
    padding: 36px 32px 32px;
}

.betai-modal-close {
    position: absolute;
    top: 14px;
    right: 16px;
    width: 30px;
    height: 30px;
    background: var(--betai-surface-2);
    border: 1px solid var(--betai-border);
    border-radius: 50%;
    font-size: 1.1rem;
    line-height: 1;
    cursor: pointer;
    color: var(--betai-text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s, background 0.2s;
    z-index: 1;
}
.betai-modal-close:hover {
    color: var(--betai-text);
    background: var(--betai-bg);
}

.betai-modal-logo {
    text-align: center;
    margin-bottom: 28px;
}
.betai-modal-logo-icon {
    font-size: 2.5rem;
    margin-bottom: 8px;
    display: block;
}
.betai-modal-logo-icon img{display: inline-block;text-align: center;}
.betai-modal-logo h3 {
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 6px;
    color: var(--betai-text);
}
.betai-modal-logo p {
    font-size: 14px;
    color: var(--betai-text-muted);
    margin: 0;
}

/* Auth tabs */
.betai-auth-tabs {
    display: flex;
    background: var(--betai-bg);
    border-radius: 10px;
    padding: 4px;
    margin-bottom: 20px;
    gap: 2px;
}
.betai-tab {
    flex: 1;
    padding: 8px;
    border: none;
    background: none;
    color: var(--betai-text-muted);
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 8px;
    cursor: pointer;
    transition: color 0.2s, background 0.2s;
}
.betai-tab.active {
    background: var(--betai-surface);
    color: var(--betai-text);
    box-shadow: 0 1px 4px rgba(0,0,0,0.3);
}

/* Google button */
.betai-google-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px;
    background: #fff;
    color: #1f1f1f;
    border: none;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s, box-shadow 0.2s;
    letter-spacing: 0.01em;
}
.betai-google-btn:hover {
    background: #f5f5f5;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}
.betai-google-btn:active {
    background: #ececec;
}

/* Divider */
.betai-divider {
    text-align: center;
    position: relative;
    margin: 20px 0;
}
.betai-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--betai-border);
}
.betai-divider span {
    position: relative;
    background: var(--betai-surface);
    padding: 0 12px;
    font-size: 0.8rem;
    color: var(--betai-text-muted);
}

/* Form fields */
.betai-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.betai-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.betai-field label {
    font-size: 12px;
    font-weight: 500;
    color: var(--betai-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.betai-field label small {
    font-size: 0.7rem;
    text-transform: none;
    letter-spacing: 0;
    color: var(--betai-text-muted);
}

.betai-field input {
    background: var(--betai-bg);
    border: 1px solid var(--betai-border);
    border-radius: 10px;
    padding: 11px 14px;
    font-size: 12px;
    color: var(--betai-text);
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    width: 100%;
    box-sizing: border-box;
    font-family: var(--betai-font-ui);
}
.betai-field input:focus {
    border-color: rgba(245, 200, 66, 0.5);
    box-shadow: 0 0 0 3px rgba(245, 200, 66, 0.1);
}
.betai-field input::placeholder {
    color: var(--betai-text-muted);
}

.betai-password-wrap {
    position: relative;
}
.betai-password-wrap input {
    padding-right: 44px;
}
.betai-toggle-pw {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--betai-text-muted);
    cursor: pointer;
    padding: 4px;
    transition: color 0.2s;
    display: flex;
    align-items: center;
}
.betai-toggle-pw:hover { color: var(--betai-text); }

/* Submit button */
.betai-submit-btn {
    width: 100%;
    padding: 13px;
    background: var(--betai-gold);
    color: #0f0f13;
    border: none;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.2s, box-shadow 0.2s;
    margin-top: 4px;
    letter-spacing: 0.02em;
}
.betai-submit-btn:hover:not(:disabled) {
    box-shadow: 0 4px 20px rgba(245, 200, 66, 0.45);
    transform: translateY(-1px);
}
.betai-submit-btn:active:not(:disabled) {
    transform: translateY(0);
}
.betai-submit-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Auth message */
.betai-auth-message {
    margin-top: 16px;
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 0.875rem;
    text-align: center;
    line-height: 1.5;
}
.betai-auth-message.betai-success {
    background: rgba(52, 168, 83, 0.15);
    border: 1px solid rgba(52, 168, 83, 0.3);
    color: #7ecf9a;
}
.betai-auth-message.betai-error {
    background: rgba(234, 67, 53, 0.12);
    border: 1px solid rgba(234, 67, 53, 0.25);
    color: #f08080;
}
.betai-auth-message.betai-info {
    background: var(--betai-gold-dim);
    border: 1px solid rgba(245, 200, 66, 0.25);
    color: var(--betai-gold);
}

/* Error inline */
.betai-field-error {
    font-size: 0.75rem;
    color: #f08080;
    margin-top: 4px;
}

/* =====================
   ANIMATIONS
   ===================== */
@keyframes betai-fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes betai-slide-up {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes betai-msg-in {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes betai-bounce {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
    30%            { transform: translateY(-5px); opacity: 1; }
}

@keyframes betai-pulse {
    0%, 100% { box-shadow: 0 0 6px rgba(245, 200, 66, 0.5); }
    50%       { box-shadow: 0 0 14px rgba(245, 200, 66, 0.9); }
}

/* Markdown-style rendering in bubbles */
.betai-msg-bubble p  { margin: 0 0 8px; }
.betai-msg-bubble p:last-child { margin-bottom: 0; }
.betai-msg-bubble ul,
.betai-msg-bubble ol { padding-left: 20px; margin: 6px 0; }
.betai-msg-bubble li { margin-bottom: 4px; }
.betai-msg-bubble strong { color: var(--betai-gold); }
.betai-msg-bubble code {
    background: rgba(255, 255, 255, 0.08);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.85em;
    font-family: 'Courier New', monospace;
}

/* =====================
   RICH CONTENT RENDERING
   ===================== */

/* Headings inside AI bubbles */
.betai-rich-content h1,
.betai-rich-content h2,
.betai-rich-content h3,
.betai-rich-content h4,
.betai-rich-content h5,
.betai-rich-content h6 {
    font-family: var(--betai-font);
    font-weight: 700;
    color: var(--betai-gold);
    margin: 14px 0 8px;
    line-height: 1.3;
}
.betai-rich-content h1 { font-size: 1.3em; border-bottom: 1px solid var(--betai-border); padding-bottom: 6px; }
.betai-rich-content h2 { font-size: 1.15em; }
.betai-rich-content h3 { font-size: 1.05em; }
.betai-rich-content h4,
.betai-rich-content h5,
.betai-rich-content h6 { font-size: 1em; color: var(--betai-text); }

/* First heading - no top margin */
.betai-rich-content h1:first-child,
.betai-rich-content h2:first-child,
.betai-rich-content h3:first-child { margin-top: 0; }

/* Paragraphs */
.betai-rich-content p {
    margin: 0 0 10px;
    line-height: 1.7;
}
.betai-rich-content p:last-child { margin-bottom: 0; }

/* Lists */
.betai-rich-content ul,
.betai-rich-content ol {
    margin: 8px 0;
    padding-left: 22px;
}
.betai-rich-content li {
    margin-bottom: 5px;
    line-height: 1.6;
}
.betai-rich-content li > ul,
.betai-rich-content li > ol {
    margin: 4px 0;
}
.betai-rich-content ul { list-style-type: disc; }
.betai-rich-content ol { list-style-type: decimal; }

/* Blockquote */
.betai-rich-content blockquote {
    border-left: 3px solid var(--betai-gold);
    background: rgba(245, 200, 66, 0.06);
    margin: 10px 0;
    padding: 10px 16px;
    border-radius: 0 8px 8px 0;
    font-style: italic;
    color: var(--betai-text-muted);
}
.betai-rich-content blockquote p { color: var(--betai-text-muted); margin-bottom: 0; }

/* Code blocks */
.betai-rich-content pre {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--betai-border);
    border-radius: 10px;
    padding: 14px 16px;
    margin: 10px 0;
    overflow-x: auto;
    font-size: 0.82em;
    line-height: 1.6;
}
.betai-rich-content pre code {
    background: none;
    padding: 0;
    border-radius: 0;
    font-family: 'Courier New', 'Consolas', monospace;
    color: #e0e0e0;
    font-size: 1em;
}

/* Inline code */
.betai-rich-content code {
    background: rgba(255, 255, 255, 0.1);
    padding: 2px 7px;
    border-radius: 5px;
    font-size: 0.85em;
    font-family: 'Courier New', monospace;
    color: var(--betai-gold);
    border: 1px solid rgba(245, 200, 66, 0.15);
}

/* Horizontal rule */
.betai-rich-content hr {
    border: none;
    border-top: 1px solid var(--betai-border);
    margin: 14px 0;
}

/* Links */
.betai-rich-content a {
    color: var(--betai-gold);
    text-decoration: underline;
    text-decoration-color: rgba(245, 200, 66, 0.4);
    text-underline-offset: 2px;
    transition: text-decoration-color 0.2s;
}
.betai-rich-content a:hover {
    text-decoration-color: var(--betai-gold);
}

/* Images */
.betai-rich-content img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    margin: 8px 0;
    display: block;
    border: 1px solid var(--betai-border);
}

/* Tables â€” GFM style */
.betai-rich-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 12px 0;
    font-size: 0.875em;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--betai-border);
}
.betai-rich-content thead {
    background: rgba(245, 200, 66, 0.12);
}
.betai-rich-content th {
    padding: 9px 12px;
    font-weight: 700;
    text-align: left;
    color: var(--betai-gold);
    border-bottom: 1px solid var(--betai-border);
    white-space: nowrap;
    width: 100%;
    border: 1px solid #ddd;
}
.betai-rich-content td {
    padding: 8px 12px;
    border-bottom: 1px solid var(--betai-border);
    vertical-align: top;
    line-height: 1.5;
    border: 1px solid #ddd;
}
.betai-rich-content tbody tr:last-child td { border-bottom: none; }
.betai-rich-content tbody tr:nth-child(even) {
    background: rgba(255, 255, 255, 0.025);
}
.betai-rich-content tbody tr:hover {
    background: rgba(245, 200, 66, 0.04);
}

/* Responsive table wrapper */
.betai-rich-content table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Strong / Bold */
.betai-rich-content strong,
.betai-rich-content b {
    color: var(--betai-gold);
    font-weight: 700;
}

/* Italic */
.betai-rich-content em,
.betai-rich-content i {
    font-style: italic;
}

/* Strikethrough */
.betai-rich-content del,
.betai-rich-content s {
    text-decoration: line-through;
    color: var(--betai-text-muted);
}

/* Mark / highlight */
.betai-rich-content mark {
    background: rgba(245, 200, 66, 0.25);
    color: var(--betai-text);
    padding: 0 3px;
    border-radius: 3px;
}

/* Details / summary */
.betai-rich-content details {
    border: 1px solid var(--betai-border);
    border-radius: 8px;
    padding: 10px 14px;
    margin: 8px 0;
}
.betai-rich-content summary {
    cursor: pointer;
    font-weight: 600;
    color: var(--betai-gold);
    user-select: none;
}

/* Light theme overrides for rich content */
#betai-chat-wrapper .betai-chat-panel .betai-rich-content h1,
#betai-chat-wrapper .betai-chat-panel .betai-rich-content h2,
#betai-chat-wrapper .betai-chat-panel .betai-rich-content h3 { color: var(--betai-gold); }
#betai-chat-wrapper .betai-chat-panel .betai-rich-content strong,
#betai-chat-wrapper .betai-chat-panel .betai-rich-content b { color: var(--betai-gold); }

/* Responsive */
@media (max-width: 600px) {
    .betai-hero { padding: 32px 16px 24px; }
    .betai-modal-body { padding: 28px 20px 24px; }
    .betai-messages { padding: 16px; }
    .betai-message { max-width: 96%; }
	/* ── Mobile-responsive table fix for BetAI ── */

	.betai-rich-content table {
	  width: 100%;
	  border-collapse: collapse;
	  table-layout: fixed;       /* prevents cells from expanding beyond column width */
	  font-size: 13px;
	}
    
    .betai-textarea {
    width: 100%;
    background: none;
    border: none;
    outline: none;
    color: var(--betai-text);
    font-size: 13px;
    font-family: "Aptos";
    resize: none;
    line-height: 1.6;
    min-height: 44px;
    max-height: 220px;
    overflow-y: auto;
    display: block;
}

	/* Scrollable wrapper — table scrolls horizontally if needed */
	.betai-rich-content table {
	  display: block;
	  overflow-x: auto;
	  -webkit-overflow-scrolling: touch;
	  border-radius: 8px;
	  border: 0.5px solid #e0ddd4;
	}

	/* Column widths — Score gets most space */
	.betai-rich-content table th:nth-child(1),
	.betai-rich-content table td:nth-child(1) { width: 45%; }

	.betai-rich-content table th:nth-child(2),
	.betai-rich-content table td:nth-child(2) { width: 28%; }

	.betai-rich-content table th:nth-child(3),
	.betai-rich-content table td:nth-child(3) { width: 27%; }

	/* Prevent text in probability/odds columns from wrapping */
	.betai-rich-content table td:nth-child(2),
	.betai-rich-content table td:nth-child(3) {
	  white-space: nowrap;
	}

	/* Allow score column to break words if needed */
	.betai-rich-content table td:nth-child(1) {
	  word-break: break-word;
	}

	/* Cell padding */
	.betai-rich-content table th,
	.betai-rich-content table td {
	  padding: 7px 8px;
	  text-align: left;
	  vertical-align: middle;
	  border-bottom: 0.5px solid #e0ddd4;
	}
}

/* Override dark background for light WP themes */
#betai-chat-wrapper .betai-hero-title { color: #1a1a22; }
#betai-chat-wrapper .betai-hero-subtitle { color: #5a5a7a; margin-bottom: 60px;}
#betai-chat-wrapper .betai-input-area { background: #ffffff; border-color: #e0e0ec; }
#betai-chat-wrapper .betai-textarea { color: #1a1a22; }
#betai-chat-wrapper .betai-textarea::placeholder { color: #9090a8; }
#betai-chat-wrapper .betai-auth-trigger-btn { background: #f5f5fb; border-color: #e0e0ec; color: #5a5a7a; }
#betai-chat-wrapper .betai-auth-trigger-btn:hover { background: rgba(245,200,66,0.08); border-color: rgba(245,200,66,0.4); color: #b8900a; }
#betai-chat-wrapper .betai-user-bar { background: #f5f5fb; border-color: #e0e0ec; }
#betai-chat-wrapper .betai-user-info { color: #1a1a22; }
#betai-chat-wrapper .betai-hint { color: #9090a8; }

/* Chat panel stays dark */
/* Chat panel â€” light theme */
#betai-chat-wrapper .betai-chat-panel { background: #f9f9fc; border-color: #e0e0ec; }

#betai-chat-wrapper .betai-chat-panel .betai-chat-header { background: #ffffff; border-bottom-color: #e0e0ec; }
#betai-chat-wrapper .betai-chat-panel .betai-chat-brand { color: #1a1a22; }

#betai-chat-wrapper .betai-chat-panel .betai-messages { background: #f5f5fb; }

#betai-chat-wrapper .betai-chat-panel .betai-msg-user .betai-msg-bubble { background: #fff8e1; color: #1a1a22; border-color: #f0d070; }
#betai-chat-wrapper .betai-chat-panel .betai-msg-ai .betai-msg-bubble { background: #ffffff; color: #1a1a22; border-color: #e0e0ec; }

#betai-chat-wrapper .betai-chat-panel .betai-msg-user .betai-msg-avatar { background: #f5c842; color: #1a1a22; }
#betai-chat-wrapper .betai-chat-panel .betai-msg-ai .betai-msg-avatar { background: #f0f0f8; border-color: #e0e0ec; }

#betai-chat-wrapper .betai-chat-panel .betai-chat-input-area { background: #ffffff; border-top-color: #e0e0ec; }
#betai-chat-wrapper .betai-chat-panel .betai-textarea { color: #1a1a22; }
#betai-chat-wrapper .betai-chat-panel .betai-textarea::placeholder { color: #9090a8; }
#betai-chat-wrapper .betai-chat-panel .betai-input-area { background: #f5f5fb; border-color: #e0e0ec; }
#betai-chat-wrapper .betai-chat-panel .betai-input-area:focus-within { background: #ffffff; border-color: rgba(245, 200, 66, 0.6); }

#betai-chat-wrapper .betai-chat-panel .betai-icon-btn { border-color: #e0e0ec; color: #7a7a94; }
#betai-chat-wrapper .betai-chat-panel .betai-icon-btn svg { stroke: #7a7a94; }
#betai-chat-wrapper .betai-chat-panel .betai-icon-btn:hover { background: rgba(245,200,66,0.1); border-color: rgba(245,200,66,0.4); color: #b8900a; }
#betai-chat-wrapper .betai-chat-panel .betai-icon-btn:hover svg { stroke: #b8900a; }
#betai-chat-wrapper .betai-chat-panel .betai-send-btn svg { stroke: #0f0f13; }
#betai-chat-wrapper .betai-chat-panel .betai-send-btn:hover:not(:disabled) svg { stroke: #ffffff; }

#betai-chat-wrapper .betai-chat-panel .betai-hint { color: #9090a8; }

/* Rich content inside light chat panel */
#betai-chat-wrapper .betai-chat-panel .betai-rich-content h1,
#betai-chat-wrapper .betai-chat-panel .betai-rich-content h2,
#betai-chat-wrapper .betai-chat-panel .betai-rich-content h3 { color: #b8900a; }
#betai-chat-wrapper .betai-chat-panel .betai-rich-content h4,
#betai-chat-wrapper .betai-chat-panel .betai-rich-content h5,
#betai-chat-wrapper .betai-chat-panel .betai-rich-content h6 { color: #1a1a22; }
#betai-chat-wrapper .betai-chat-panel .betai-rich-content strong,
#betai-chat-wrapper .betai-chat-panel .betai-rich-content b { color: #b8900a; }
#betai-chat-wrapper .betai-chat-panel .betai-rich-content a { color: #b8900a; }
#betai-chat-wrapper .betai-chat-panel .betai-rich-content code { background: #f0f0f8; color: #b8900a; border-color: #e0e0ec; }
#betai-chat-wrapper .betai-chat-panel .betai-rich-content pre { background: #f0f0f8; border-color: #e0e0ec; }
#betai-chat-wrapper .betai-chat-panel .betai-rich-content pre code { background: none; color: #1a1a22; }
#betai-chat-wrapper .betai-chat-panel .betai-rich-content blockquote { background: rgba(245,200,66,0.08); color: #5a5a7a; }
#betai-chat-wrapper .betai-chat-panel .betai-rich-content blockquote p { color: #5a5a7a; }
#betai-chat-wrapper .betai-chat-panel .betai-rich-content th { color: #b8900a; background: rgba(245,200,66,0.1); }
#betai-chat-wrapper .betai-chat-panel .betai-rich-content td { color: #1a1a22; }
#betai-chat-wrapper .betai-chat-panel .betai-rich-content table { border-color: #e0e0ec; }
#betai-chat-wrapper .betai-chat-panel .betai-rich-content hr { border-top-color: #e0e0ec; }
#betai-chat-wrapper .betai-chat-panel .betai-rich-content mark { background: rgba(245,200,66,0.3); color: #1a1a22; }

/* Thinking dots in light panel */
#betai-chat-wrapper .betai-chat-panel .betai-dot { background: #b8900a; }
/* Force send button hover — theme override fix */
#betai-chat-wrapper .betai-send-btn:hover:not(:disabled),
#betai-chat-wrapper .betai-input-area .betai-send-btn:hover:not(:disabled) {
    background: var(--betai-gold) !important;
    background-color: var(--betai-gold) !important;
    color: #0f0f13 !important;
}
#betai-chat-wrapper .betai-send-btn:hover:not(:disabled) svg {
    stroke: #0f0f13 !important;
    fill: none !important;
}


/* =====================
   AUTH WALL
   ===================== */
.betai-auth-wall {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    animation: betai-fade-in 0.4s ease both;
}
.betai-auth-wall-inner {
    max-width: 520px;
    width: 100%;
}
.betai-auth-wall-logo {
    margin-bottom: 20px;
}
.betai-auth-wall-logo img {
    width: 72px;
    height: 72px;
    object-fit: contain;
}
.betai-auth-wall-msg {
    font-size: 20px;
    color: #000;
    margin: 0 0 28px;
}
.betai-auth-wall-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}
.betai-wall-btn {
    padding: 12px 32px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: transform 0.2s, box-shadow 0.2s;
    font-family: system-ui, sans-serif;
}
.betai-wall-btn:hover {
    transform: translateY(-1px);
}
.betai-wall-btn-primary {
    background: #f5c842;
    color: #0f0f13;
    box-shadow: 0 4px 16px rgba(245,200,66,0.35);
}
.betai-wall-btn-primary:hover {
    box-shadow: 0 6px 20px rgba(245,200,66,0.5);
    background: #f5c842 !important;
    background-color: #f5c842 !important;
    color: #0f0f13 !important;
}
.betai-wall-btn-secondary {
    background: #f5f5fb;
    color: #1a1a22;
    border: 1px solid #e0e0ec;
}
.betai-wall-btn-secondary:hover {
    background: #eaeaf4 !important;
    background-color: #eaeaf4 !important;
}

/* =====================
   FULL PAGE CHAT
   ===================== */
.betai-page-chat {
    display: flex;
    flex-direction: column;
    background: #f9f9fc;
    border: 1px solid #e0e0ec;
    border-radius: 16px;
    overflow: hidden;
    animation: betai-fade-in 0.3s ease both;
    /*min-height: 600px;*/
}

/* Page header */
.betai-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    background: #ffffff;
    border-bottom: 1px solid #e0e0ec;
    flex-shrink: 0;
    flex-wrap: wrap;
    gap: 10px;
}
.betai-page-brand {
    display: flex;
    align-items: center;
    gap: 10px;
}
.betai-brand-logo {
    width: 36px;
    height: 36px;
    object-fit: contain;
}
.betai-brand-name {
    display: block;
    font-size: 15px;
    font-weight: 700;
    color: #1a1a22;
    line-height: 1.2;
}
.betai-brand-status {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    color: #7a7a94;
}
.betai-brand-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #34a853;
    box-shadow: 0 0 6px rgba(52,168,83,0.6);
    animation: betai-pulse 2s ease-in-out infinite;
    display: inline-block;
    flex-shrink: 0;
}

.betai-page-header-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* ── User Pill ─────────────────────────────────────────── */
.betai-user-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #f5f5fb 0%, #eeeef8 100%);
    border: 1px solid #d8d8ee;
    border-radius: 40px;
    padding: 5px 6px 5px 6px;
    box-shadow: 0 1px 4px rgba(100, 100, 180, 0.08);
    transition: box-shadow 0.2s, border-color 0.2s;
}
.betai-user-pill:hover {
    box-shadow: 0 2px 8px rgba(100, 100, 180, 0.14);
    border-color: #c0c0e0;
}
.betai-user-pill .betai-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #f5c842;
    flex-shrink: 0;
}
.betai-user-pill #betai-user-name {
    font-size: 13px;
    color: #1a1a22;
    font-weight: 600;
    max-width: 130px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: 0.01em;
    padding: 0 2px;
}
.betai-user-pill::after {
    content: '';
    display: block;
    width: 1px;
    height: 16px;
    background: #d0d0e8;
    flex-shrink: 0;
}
.betai-user-pill .betai-logout-btn {
    font-size: 11px;
    color: #9090a8;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px 6px;
    display: flex;
    align-items: center;
    gap: 4px;
    border-radius: 20px;
    transition: color 0.2s, background 0.2s;
    white-space: nowrap;
}
.betai-user-pill .betai-logout-btn::before {
    content: 'Logout';
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.02em;
}
.betai-user-pill .betai-logout-btn:hover {
    color: #e05050;
    background: rgba(224, 80, 80, 0.07);
}
.betai-user-pill .betai-logout-btn svg { stroke: currentColor; }
.betai-user-pill .betai-logout-btn:hover svg { stroke: #e05050; }

/* Header icon buttons */
.betai-header-btns {
    display: flex;
    gap: 6px;
}
.betai-icon-btn-danger svg { stroke: #9090a8; }
.betai-icon-btn-danger:hover {
    background: rgba(220, 53, 69, 0.08) !important;
    border-color: rgba(220, 53, 69, 0.3) !important;
}
.betai-icon-btn-danger:hover svg { stroke: #dc3545 !important; }

/* Messages — full page, no fixed height, grows naturally */
.betai-messages-page {
    flex: 1;
    min-height: 525px;
    max-height: 525px !important;
    padding: 28px 24px;
	overflow-y: auto;
	font-family: "Aptos";
}

/* Welcome state */
.betai-welcome-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 40px 20px;
    gap: 12px;
}
.betai-welcome-icon img {
    width: 64px;
    height: 64px;
    object-fit: contain;
    margin-bottom: 4px;
}
.betai-welcome-state h3 {
    font-size: 22px;
    font-weight: 700;
    color: #1a1a22;
    margin: 0;
}
.betai-welcome-state p {
    font-size: 14px;
    color: #7a7a94;
    margin: 0;
    max-width: 440px;
}

/* Suggestion chips */
.betai-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-top: 8px;
}
.betai-suggestion-chip {
    padding: 8px 16px;
    background: #ffffff;
    border: 1px solid #e0e0ec;
    border-radius: 40px;
    font-size: 13px;
    color: #1a1a22;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s, transform 0.15s;
    font-family: system-ui, sans-serif;
}
.betai-suggestion-chip:hover {
    border-color: #f5c842;
    background: rgba(245,200,66,0.06);
    transform: translateY(-1px);
}

/* Page input wrap */
.betai-page-input-wrap {
    padding: 0;
    border-top: 1px solid #e0e0ec;
    background: #ffffff;
    flex-shrink: 0;
}
.betai-page-input-wrap .betai-input-area {
    background: #f5f5fb;
    border-color: #e0e0ec;
}
.betai-page-input-wrap .betai-input-area:focus-within {
    background: #ffffff;
    border-color: rgba(245,200,66,0.5);
}
.betai-page-input-wrap .betai-textarea { color: #1a1a22; }
.betai-page-input-wrap .betai-textarea::placeholder { color: #9090a8; }

/* Message widths — slightly wider on page view */
#betai-page-chat .betai-message { max-width: 82%; }

@media (max-width: 600px) {
    .betai-page-header { padding: 12px 14px; }
    .betai-messages-page { padding: 16px 3px; width: 100%; overflow-x: hidden;}
    .betai-page-input-wrap { padding: 12px 14px; }
    #betai-page-chat .betai-message { max-width: 76%; }
    .betai-auth-wall { min-height: 360px; padding: 32px 16px; }
    .betai-user-pill #betai-user-name { max-width: 80px; }
    .betai-user-pill .betai-logout-btn::before { display: none; }
    .betai-user-pill { padding: 4px 8px 4px 5px; }
}

/* =====================
   ASK BUTTON
   ===================== */
.betai-ask-btn {
    position: absolute;
    right: 20px;
    bottom: 10px;
    height: 36px;
    padding: 0 18px;
    border-radius: 8px;
    background: #f5c842;
    border: none;
    cursor: pointer;
    font-size: 13px;
    font-weight: 700;
    font-family: system-ui, -apple-system, sans-serif;
    letter-spacing: 0.08em;
    color: #0f0f13;
    transition: background 0.2s, box-shadow 0.2s, transform 0.15s;
    flex-shrink: 0;
    white-space: nowrap;
    line-height: 36px;
}
.betai-ask-btn:hover:not(:disabled) {
    background: #f5c842 !important;
    background-color: #f5c842 !important;
    box-shadow: 0 4px 14px rgba(245, 200, 66, 0.5);
    transform: translateY(-1px);
    color: #0f0f13 !important;
}
.betai-ask-btn:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: none;
}
.betai-ask-btn:disabled {
    background: #e0e0ec !important;
    color: #9090a8 !important;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

/* =====================
   PERSISTENT TITLE BAR
   ===================== */
.betai-chat-title-bar {
    padding: 8px 24px 14px;
    background: #ffffff;
    border-bottom: 1px solid #e0e0ec;
    text-align: center;
    flex-shrink: 0;
}
.betai-chat-title-bar-title {
    font-family: "Aptos";
    font-size: 26px;
    font-weight: 700;
    color: #1a1a22;
    margin: 0 0 4px;
    line-height: 1.2;
    letter-spacing: -0.02em;
}
.betai-chat-title-bar-sub {
	font-family: "Aptos";
    font-size: 16px;
    color: #7a7a94;
    margin: 0;
    line-height: 1.5;
}
@media (max-width: 600px) {
    .betai-chat-title-bar { padding: 12px 16px 10px; }
    .betai-chat-title-bar-title { font-size: 18px; }
}

/* =====================
   LIGHT Q&A AREA — page chat overrides
   ===================== */
.betai-page-chat { background: #f5f5fb; }
.betai-messages-page { background: #f5f5fb; }

#betai-page-chat .betai-msg-user .betai-msg-bubble {
    background: #fff8e1 !important;
    color: #1a1a22 !important;
    border-color: #f0d070 !important;
}
#betai-page-chat .betai-msg-ai .betai-msg-bubble {
    background: #ffffff !important;
    color: #1a1a22 !important;
    border-color: #e0e0ec !important;
    width: 100%;
}
#betai-page-chat .betai-msg-user .betai-msg-avatar {
    background: #f5c842 !important;
    color: #1a1a22 !important;
}
#betai-page-chat .betai-msg-ai .betai-msg-avatar {
    background: #f0f0f8 !important;
    border-color: #e0e0ec !important;
}
#betai-page-chat .betai-rich-content h1,
#betai-page-chat .betai-rich-content h2,
#betai-page-chat .betai-rich-content h3 { color: #b8900a; }
#betai-page-chat .betai-rich-content h4,
#betai-page-chat .betai-rich-content h5,
#betai-page-chat .betai-rich-content h6 { color: #1a1a22; }
#betai-page-chat .betai-rich-content strong,
#betai-page-chat .betai-rich-content b { color: #b8900a; }
#betai-page-chat .betai-rich-content a { color: #b8900a; }
#betai-page-chat .betai-rich-content code { background: #f0f0f8; color: #b8900a; border-color: #e0e0ec; }
#betai-page-chat .betai-rich-content pre { background: #f0f0f8; border-color: #e0e0ec; }
#betai-page-chat .betai-rich-content pre code { background: none; color: #1a1a22; }
#betai-page-chat .betai-rich-content blockquote { background: rgba(245,200,66,0.08); color: #5a5a7a; }
#betai-page-chat .betai-rich-content th { color: #b8900a; background: rgba(245,200,66,0.1); }
#betai-page-chat .betai-rich-content td { color: #1a1a22; }
#betai-page-chat .betai-rich-content table { border-color: #e0e0ec; }
#betai-page-chat .betai-dot { background: #b8900a; }
#betai-clear-chat{display: none;}
#betai-new-chat:focus svg{color: #fff !important}

/* Responsive rich content fixes */
.betai-table-wrap{
    width:100%;
    overflow-x:auto;
    -webkit-overflow-scrolling:touch;
    margin:12px 0;
}

.betai-rich-content table{
    min-width:600px;
}

.betai-rich-content iframe,
.betai-rich-content video,
.betai-rich-content canvas,
.betai-rich-content svg{
    max-width:100%;
}

.betai-rich-content{
    overflow-wrap:anywhere;
    word-break:break-word;
}
@media only screen and (max-width: 1024px) {
    .betai-rich-content table {min-width: inherit;}
    #betai-page-chat .betai-rich-content td{    white-space: nowrap;}
}
/* Admin bar — non-admin users ke liye hide */
#wpadminbar { display: none !important; }
html { margin-top: 0 !important; }
* html body { margin-top: 0 !important; }
