/* rusty create | 2026-07-11 */
/* Action: Creating maher-widget.css — Glassmorphism floating widget for Maher AI */

/* ═══════════════════════════════════════════════════════════════
   Maher AI Widget — Glassmorphism + Platform Variables
   Uses --primary-color (#e4c59e / gold) from :root
   Dark background: rgba(13, 15, 26, 0.95) (--mb-dark)
   ═══════════════════════════════════════════════════════════════ */

:root {
    --mb-dark: rgba(13, 15, 26, 0.95);
    --mb-dark-solid: #0d0f1a;
    --mb-gold: var(--primary-color, #e4c59e);
    --mb-gold-rgb: 228, 197, 158;
    --mb-accent: #667eea;
    --mb-accent-rgb: 102, 126, 234;
}

/* ─── Fixed container ─── */
.maher-fixed {
    position: fixed;
    bottom: 20px;
    z-index: 9999;
}

/* LTR default: left */
html[dir="rtl"] .maher-fixed {
    left: 20px;
    right: auto;
}

html[dir="ltr"] .maher-fixed,
html:not([dir]) .maher-fixed {
    right: 20px;
    left: auto;
}

/* ─── Floating trigger bubble ─── */
.maher-fixed .maher-trigger {
    width: 62px;
    height: 62px;
    border-radius: 50%;
    background: var(--mb-dark);
    border: 2px solid var(--mb-gold);
    cursor: pointer;
    box-shadow:
        0 0 15px rgba(var(--mb-gold-rgb), 0.25),
        0 4px 20px rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    padding: 0;
    overflow: hidden;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.maher-fixed .maher-trigger:hover {
    transform: scale(1.12);
    box-shadow:
        0 0 25px rgba(var(--mb-gold-rgb), 0.4),
        0 6px 30px rgba(0, 0, 0, 0.5);
    border-color: #fff;
}

.maher-fixed .maher-trigger lottie-player {
    width: 42px;
    height: 42px;
}

/* Force icon visibility at the root DOM level after reparenting */
.maher-trigger i,
.maher-trigger svg,
.maher-trigger span {
    color: #e4c59e !important;
    /* MacBlash Gold */
    font-size: 28px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    visibility: visible !important;
    opacity: 1 !important;
    z-index: 2 !important;
}

/* ─── Passive / disabled state ─── */
.maher-fixed.maher-passive .maher-trigger {
    opacity: 0.4;
    cursor: default;
    pointer-events: none;
    border-color: rgba(var(--mb-gold-rgb), 0.3);
}

/* ─── Dialogue panel (glassmorphism) ─── */
.maher-fixed .maher-dialogue {
    display: none;
    position: absolute;
    bottom: 100%;
    /* Ensure it pops UP above the character */
    margin-bottom: 15px;
    width: 320px;
    max-width: 85vw;
    /* Prevent it from being too wide on mobile screens */
    max-height: 450px;
    background: var(--mb-dark);
    border: 1px solid rgba(var(--mb-gold-rgb), 0.35);
    border-radius: 16px;
    box-shadow:
        0 10px 40px rgba(0, 0, 0, 0.5),
        0 0 20px rgba(var(--mb-gold-rgb), 0.08);
    overflow: hidden;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    animation: maherSlideUp 0.3s ease-out;
    /* Phase 5b: Flex column layout */
    display: none;
    flex-direction: column;
}

/* Panel anchor position based on direction */
/* === ARABIC (RTL) === */
/* Widget is on the RIGHT. Anchor dialogue to the RIGHT so it expands inwards to the LEFT. */
html[dir="rtl"] .maher-fixed .maher-dialogue {
    right: 0 !important;
    left: auto !important;
}

/* === ENGLISH (LTR) === */
/* Widget is on the LEFT. Anchor dialogue to the LEFT so it expands inwards to the RIGHT. */
html[dir="ltr"] .maher-fixed .maher-dialogue,
html:not([dir]) .maher-fixed .maher-dialogue {
    left: 0 !important;
    right: auto !important;
}

.maher-fixed .maher-dialogue.is-open {
    display: flex;
}

@keyframes maherSlideUp {
    from {
        opacity: 0;
        transform: translateY(15px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ─── Panel header ─── */
.maher-fixed .maher-header {
    background: linear-gradient(135deg, rgba(var(--mb-gold-rgb), 0.15) 0%, rgba(var(--mb-accent-rgb), 0.10) 100%);
    border-bottom: 1px solid rgba(var(--mb-gold-rgb), 0.2);
    padding: 12px 16px;
    color: var(--mb-gold);
    font-weight: 700;
    font-size: 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

.maher-fixed .maher-header .maher-title-icon {
    color: var(--mb-gold);
}

.maher-fixed .maher-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.maher-fixed .maher-header-actions button {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    padding: 4px;
    transition: color 0.2s;
    line-height: 1;
}

.maher-fixed .maher-header-actions button:hover {
    color: #fff;
}

.maher-fixed .maher-close {
    font-size: 22px;
}

.maher-fixed .maher-maximize {
    font-size: 14px;
}

/* ─── Body (scrollable flex region) ─── */
.maher-fixed .maher-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow-y: auto;
    padding: 0;
    min-height: 0;
    /* critical for flex overflow */
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
}

/* ─── Footer (sticky input) ─── */
.maher-fixed .maher-footer {
    flex-shrink: 0;
    border-top: 1px solid rgba(var(--mb-gold-rgb), 0.15);
    padding: 12px 16px;
    background: rgba(13, 15, 26, 0.98);
    display: flex;
    align-items: center;
    gap: 8px;
}

.maher-fixed .maher-footer .maher-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    flex: 1;
    gap: 8px;
}

.maher-fixed .maher-footer .maher-input-wrapper input {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(var(--mb-gold-rgb), 0.25);
    border-radius: 24px; /* Pill shape */
    color: #fff;
    padding: 12px 16px;
    font-size: 13px;
    font-family: 'Sukar', 'Inter', sans-serif;
    outline: none;
    transition: all 0.2s ease;
}

html[dir="rtl"] .maher-fixed .maher-footer .maher-input-wrapper input {
    padding: 12px 16px;
}

.maher-fixed .maher-footer .maher-input-wrapper input:focus {
    border-color: var(--mb-gold);
    background: rgba(255, 255, 255, 0.08);
}

.maher-fixed .maher-footer .maher-input-wrapper input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.maher-fixed .maher-footer #maherSendBtn {
    background: rgba(var(--mb-gold-rgb), 0.15);
    border: 1px solid rgba(var(--mb-gold-rgb), 0.3);
    border-radius: 12px; /* Square with curve edges */
    color: var(--mb-gold);
    cursor: pointer;
    font-size: 16px;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

/* No absolute positioning needed anymore, rule removed */

.maher-fixed .maher-footer #maherSendBtn:hover {
    background: rgba(var(--mb-gold-rgb), 0.25);
    color: #fff;
    transform: scale(1.05);
}

/* End Conversation Button */
.maher-fixed .maher-footer #maherEndChatBtn {
    background: rgba(220, 53, 69, 0.1);
    border: 1px solid rgba(220, 53, 69, 0.3);
    border-radius: 50%;
    color: #f87171;
    cursor: pointer;
    font-size: 14px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}
.maher-fixed .maher-footer #maherEndChatBtn:hover {
    background: rgba(220, 53, 69, 0.2);
    color: #fff;
    transform: scale(1.05);
}

/* rusty change | 2026-07-12 */
/* Action: start creating — RTL directional flip for send icon (point left in Arabic) */
html[dir="rtl"] .maher-fixed .maher-footer #maherSendBtn i,
html[dir="rtl"] .maher-input-wrapper #maherSendBtn i {
    transform: scaleX(-1);
}
/* rusty end */

.maher-fixed .maher-new-chat {
    display: block;
    width: 100%;
    background: none;
    border: 1px solid rgba(var(--mb-gold-rgb), 0.15);
    border-radius: 6px;
    color: var(--mb-gold);
    cursor: pointer;
    font-size: 11.5px;
    font-weight: 600;
    padding: 6px 10px;
    margin-top: 8px;
    transition: background 0.2s, border-color 0.2s;
    text-align: center;
}

.maher-fixed .maher-new-chat:hover {
    background: rgba(var(--mb-gold-rgb), 0.08);
    border-color: rgba(var(--mb-gold-rgb), 0.3);
}

/* ─── Pre-rendered question list ─── */
.maher-fixed .maher-questions {
    list-style: none;
    padding: 12px;
    margin: 0;
    max-height: 260px;
    overflow-y: auto;
}

.maher-fixed .maher-questions li {
    margin-bottom: 8px;
}

.maher-fixed .maher-questions li:last-child {
    margin-bottom: 0;
}

.maher-fixed .maher-questions li button {
    width: 100%;
    background: rgba(var(--mb-gold-rgb), 0.06);
    border: 1px solid rgba(var(--mb-gold-rgb), 0.15);
    color: rgba(255, 255, 255, 0.85);
    padding: 11px 14px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: background 0.2s, border-color 0.2s, transform 0.15s;
}

html[dir="rtl"] .maher-fixed .maher-questions li button {
    text-align: right;
}

html[dir="ltr"] .maher-fixed .maher-questions li button,
html:not([dir]) .maher-fixed .maher-questions li button {
    text-align: left;
}

.maher-fixed .maher-questions li button:hover {
    background: rgba(var(--mb-gold-rgb), 0.12);
    border-color: rgba(var(--mb-gold-rgb), 0.4);
    transform: translateY(-1px);
}

.maher-fixed .maher-questions li button:active {
    transform: translateY(0);
}

.maher-fixed .maher-questions li button:disabled {
    opacity: 0.4;
    cursor: wait;
    transform: none;
}

/* ─── Answer box ─── */
.maher-fixed .maher-answer-box {
    display: none;
    flex: 1;
    height: 100%;
    overflow-y: auto;
    padding: 12px 15px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    line-height: 1.6;
    font-family: 'Sukar', 'Inter', sans-serif;
}

.maher-fixed .maher-answer-box.is-visible {
    display: block;
}

#maherBody.in-ticket-flow #maherQuestions,
#maherBody.in-ticket-flow #maherAnswerBox,
#maherBody.in-ticket-flow #maherLoading {
    display: none !important;
}

/* rusty change | 2026-07-13 */
/* Action: start updating — #maherAnswerText rules consolidated into macblash-site-theme.css */
/* Removed duplicate: word-break, br+br spacing now live in the theme file (single source of truth) */
/* rusty end update */

/* Bold text inside AI answers */
.maher-bold {
    color: #fff;
    font-weight: 700;
}

.maher-fixed .maher-answer-box .maher-back {
    display: inline-block;
    margin-top: 14px;
    color: var(--mb-gold);
    cursor: pointer;
    font-size: 12.5px;
    border: none;
    background: none;
    padding: 0;
    font-weight: 600;
    transition: opacity 0.2s;
}

.maher-fixed .maher-answer-box .maher-back:hover {
    opacity: 0.7;
}

/* ─── Loading state ─── */
.maher-fixed .maher-loading {
    display: none;
    text-align: center;
    padding: 24px 18px;
    color: var(--mb-gold);
}

.maher-fixed .maher-loading.is-active {
    display: block;
}

.maher-fixed .maher-loading .spinner-border {
    width: 1.3rem;
    height: 1.3rem;
    border-width: 0.15em;
    color: var(--mb-gold);
}

.maher-fixed .maher-loading p {
    font-size: 13px;
    opacity: 0.8;
}

/* ─── Graceful error message ─── */
.maher-fixed .maher-error {
    display: none;
    text-align: center;
    padding: 20px 18px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 13px;
}

.maher-fixed .maher-error.is-visible {
    display: block;
}

.maher-fixed .maher-error .maher-error-icon {
    font-size: 28px;
    color: rgba(var(--mb-gold-rgb), 0.5);
    margin-bottom: 8px;
}

/* ─── Support handoff button ─── */
.maher-fixed .maher-support-btn {
    display: block;
    width: calc(100% - 24px);
    margin: 0 12px 12px;
    padding: 11px;
    background: linear-gradient(135deg, rgba(var(--mb-gold-rgb), 0.2) 0%, rgba(var(--mb-accent-rgb), 0.2) 100%);
    border: 1px solid rgba(var(--mb-gold-rgb), 0.35);
    color: var(--mb-gold);
    border-radius: 10px;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s;
}

.maher-fixed .maher-support-btn:hover {
    background: linear-gradient(135deg, rgba(var(--mb-gold-rgb), 0.3) 0%, rgba(var(--mb-accent-rgb), 0.3) 100%);
    transform: translateY(-1px);
}

/* ─── Scrollbar styling (gold-accent) ─── */
.maher-fixed .maher-questions::-webkit-scrollbar,
.maher-fixed .maher-answer-box::-webkit-scrollbar {
    width: 5px;
}

.maher-fixed .maher-questions::-webkit-scrollbar-track,
.maher-fixed .maher-answer-box::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 4px;
}

.maher-fixed .maher-questions::-webkit-scrollbar-thumb,
.maher-fixed .maher-answer-box::-webkit-scrollbar-thumb {
    background: rgba(var(--mb-gold-rgb), 0.35);
    border-radius: 4px;
    transition: background 0.2s;
}

.maher-fixed .maher-questions::-webkit-scrollbar-thumb:hover,
.maher-fixed .maher-answer-box::-webkit-scrollbar-thumb:hover {
    background: rgba(var(--mb-gold-rgb), 0.55);
}

/* ─── Mobile responsive ─── */
@media (max-width: 768px) {
    .maher-fixed {
        transform: scale(0.7);
        transform-origin: bottom left;
    }

    html[dir="ltr"] .maher-fixed,
    html:not([dir]) .maher-fixed {
        transform-origin: bottom right;
    }

    .maher-fixed .maher-dialogue {
        width: calc(100vw / 0.7 - 60px);
        max-width: 340px;
    }
}

@media (max-width: 480px) {
    .maher-fixed .maher-dialogue {
        width: calc(100vw / 0.7 - 40px);
    }
}

/* === ARABIC (RTL) === */
/* Maher AI on the Right, Chatwoot on the Left */
html[dir="rtl"] .maher-fixed {
    right: 20px !important;
    left: auto !important;
}

html[dir="rtl"] .woot-widget-bubble,
html[dir="rtl"] .woot-widget-holder {
    left: 20px !important;
    right: auto !important;
}

/* === ENGLISH (LTR) === */
/* Maher AI on the Left, Chatwoot on the Right */
html[dir="ltr"] .maher-fixed {
    left: 20px !important;
    right: auto !important;
}

html[dir="ltr"] .woot-widget-bubble,
html[dir="ltr"] .woot-widget-holder {
    right: 20px !important;
    left: auto !important;
}

/* ─── Compact support handoff box ─── */
.maher-support-box {
    text-align: center;
    padding: 15px;
    background: rgba(13, 15, 26, 0.95);
    border-radius: 8px;
    border: 1px solid var(--primary-color, #e4c59e);
    margin: 10px auto;
    width: 95%;
}

.maher-support-box i {
    font-size: 24px;
    color: var(--primary-color, #e4c59e);
    margin-bottom: 8px;
    display: block;
}

.maher-support-box p {
    color: #fff;
    font-size: 13px;
    margin-bottom: 12px;
    line-height: 1.5;
}

.maher-support-box .btn-main {
    padding: 6px 12px;
    font-size: 13px;
    font-weight: bold;
}

/* ─── Link styling inside AI answers ─── */
.maher-link {
    color: var(--primary-color, #e4c59e) !important;
    text-decoration: underline !important;
    font-weight: bold !important;
    transition: color 0.2s ease-in-out;
}

.maher-link:hover {
    color: #fff !important;
}

/* ─── Free-text chat input (Bulletproof) ─── */
.maher-input-li {
    list-style: none !important;
    margin-bottom: 0 !important;
    margin-top: 4px;
}

/* Bulletproof Input Wrapper */
.maher-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    margin-top: 10px;
    transition: border-color 0.3s ease;
}

.maher-input-wrapper:focus-within {
    border-color: var(--mb-gold, #e4c59e);
}

#maherCustomInput {
    flex: 1;
    background: transparent;
    border: none;
    color: #fff;
    padding: 12px 15px;
    font-family: 'Sukar', 'Inter', sans-serif;
    font-size: 14px;
    outline: none;
    width: 100%;
    box-sizing: border-box;
}

#maherCustomInput::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

#maherSendBtn {
    position: absolute;
    top: 0;
    height: 100%;
    width: 40px;
    background: transparent;
    border: none;
    color: #e4c59e;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    font-size: 16px;
    z-index: 2;
    transition: opacity 0.2s ease;
}

#maherSendBtn:hover {
    opacity: 0.8;
}

/* rusty change | 2026-07-12 */
/* Action: start creating — Stop stream button: replaces send during active SSE */
#maherStopStream {
    position: absolute;
    top: 0;
    height: 100%;
    width: 40px;
    background: transparent;
    border: none;
    color: #ef4444;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 0;
    font-size: 16px;
    z-index: 3;
    transition: color 0.2s ease, transform 0.2s ease;
}

html[dir="ltr"] #maherStopStream { right: 0; }
html[dir="rtl"] #maherStopStream { left: 0; }

#maherStopStream:hover {
    color: #dc2626;
    transform: scale(1.15);
}

#maherStopStream.is-active {
    display: flex;
}

.maher-input-wrapper.is-streaming #maherSendBtn {
    display: none;
}
/* rusty end */

/* rusty change | 2026-07-12 */
/* Action: start updating — Wrapper-level mobile fullscreen + anti-clipping */

/* Ensure the wrapper never clips its children */
#maher-widget,
.maher-fixed {
    overflow: visible !important;
    contain: none !important;
}

/* ─── Dialogue transition for maximize ─── */
.maher-fixed .maher-dialogue {
    transition: width 0.3s ease, height 0.3s ease, max-height 0.3s ease,
        border-radius 0.3s ease, bottom 0.3s ease;
}

/* ─── Maximized state (desktop toggle) ─── */
/* rusty change | 2026-07-12 */
/* Action: start updating — Smooth transition to prevent stream reader reflow disruption */
.maher-fixed .maher-dialogue {
    will-change: width, height, border-radius;
    transition: width 0.25s ease, height 0.25s ease, max-height 0.25s ease,
                border-radius 0.25s ease, top 0.25s ease, left 0.25s ease,
                right 0.25s ease, bottom 0.25s ease;
}

.maher-fixed .maher-dialogue.maher-maximized {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100dvh !important;
    max-height: 100dvh !important;
    max-width: 100vw !important;
    border-radius: 0 !important;
    z-index: 9999999 !important;
    margin: 0 !important;
    transform: none !important;
}
/* rusty end update */

/* rusty change | 2026-07-12 */
/* Action: start updating — Deterministic Viewport Centering (RTL-Immune) */
/* ROOT CAUSE FIX: Neutralize scale(0.7) containing block + RTL left:auto override */

/* ─── Mobile: Mathematical Viewport Centering ─── */
@media (max-width: 768px) {

    /* 1. Transparent Click-Through Wrapper */
    /* CRITICAL: transform: none strips the scale(0.7) containing block */
    /* so that position: fixed on .maher-dialogue works relative to viewport */
    #maher-widget.widget-opened,
    .maher-fixed.widget-opened {
        position: fixed !important;
        inset: 0 !important;
        pointer-events: none !important;
        background: transparent !important;
        z-index: 2147483647 !important;
        display: block !important;
        transform: none !important; /* ROOT CAUSE FIX #1: Kill scale(0.7) containing block */
    }

    /* 2. Default State: 85% Width, Deterministic Center, Bottom-Anchored */
    #maher-widget.widget-opened .maher-dialogue.is-open {
        pointer-events: auto !important;
        position: fixed !important;
        bottom: 20px !important;    /* 20px floating gap at the bottom */
        top: auto !important;       /* Release top constraint */
        left: 7.5vw !important;     /* EXACT MATH: (100 - 85) / 2 = 7.5 */
        right: auto !important;     /* CRITICAL: Nuke RTL right-anchoring */
        width: 85vw !important;     /* 85% viewport width */
        max-width: none !important; /* Eradicate any desktop limits */
        height: 80dvh !important;   /* Generous height */
        margin: 0 !important;       /* Nuke margin: auto bugs */
        transform: none !important; /* Nuke translate bugs */
        background: #14141a !important;
        border-radius: 16px !important;
        box-shadow: 0 10px 50px rgba(0,0,0,0.8) !important;
        display: flex !important;
        flex-direction: column !important;
        overflow: hidden !important;
    }

    /* ROOT CAUSE FIX #2: Override the RTL left:auto rule at line 124 */
    /* Specificity: 0-1-4 (attr + ID + 2 classes) beats 0-1-3 (attr + 2 classes + element) */
    html[dir="rtl"] #maher-widget.widget-opened .maher-dialogue.is-open {
        left: 7.5vw !important;
        right: auto !important;
    }

    /* 3. Maximized State: 100% Viewport Consumption */
    #maher-widget.widget-opened .maher-dialogue.is-open.maher-maximized {
        bottom: 0 !important;
        left: 0 !important;         /* Flush to left edge */
        width: 100vw !important;    /* Edge to edge */
        height: 100dvh !important;  /* Top to bottom */
        border-radius: 0 !important;
        box-shadow: none !important;
    }

    /* Maximized RTL override */
    html[dir="rtl"] #maher-widget.widget-opened .maher-dialogue.is-open.maher-maximized {
        left: 0 !important;
    }

    /* 4. Internal Flexbox Integrity */
    .maher-dialogue .maher-header {
        flex-shrink: 0 !important;
        padding: 15px 20px !important;
        box-sizing: border-box !important;
    }
    .maher-dialogue .maher-body {
        flex: 1 1 auto !important;
        overflow-y: auto !important;
        padding: 20px !important;
        box-sizing: border-box !important;
    }
    .maher-dialogue .maher-footer {
        flex-shrink: 0 !important;
        margin-top: auto !important;
        padding: 15px 20px !important;
        padding-bottom: calc(15px + env(safe-area-inset-bottom)) !important;
        box-sizing: border-box !important;
        background: #14141a !important;
    }

    /* 5. Hide floating trigger button when open */
    #maher-widget.widget-opened .maher-trigger {
        display: none !important;
    }
}

/* rusty end update */

/* rusty end */
/* ═══════════════════════════════════════════════════════════════
   rusty change | 2026-07-26
   Action: start creating — Phase 2 Dashboard, Ticket Flow, Live Chat CSS
   Colors: gold #D4AF37, purple #8B5CF6, dark #0d0f1a
   ═══════════════════════════════════════════════════════════════ */

.maher-dashboard{padding:14px 16px;display:flex;flex-direction:column;gap:16px;animation:maherFadeIn .3s ease}
@keyframes maherFadeIn{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}
.maher-greeting-banner{background:linear-gradient(135deg,rgba(212,175,55,.15) 0%,rgba(139,92,246,.12) 100%);border:1px solid rgba(212,175,55,.25);border-radius:12px;padding:14px 16px;text-align:center}
.maher-greeting-banner p{margin:0;color:#D4AF37;font-size:14px;font-weight:600;line-height:1.5}
.maher-section-title{font-size:11px;font-weight:700;letter-spacing:.06em;color:rgba(212,175,55,.6);text-transform:uppercase;margin:0 0 8px;padding:0 2px}
.maher-quick-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.maher-action-card{background:rgba(255,255,255,.04);border:1px solid rgba(212,175,55,.18);border-radius:10px;padding:12px 10px;cursor:pointer;text-align:center;transition:all .22s ease;display:flex;flex-direction:column;align-items:center;gap:6px}
.maher-action-card:hover{background:rgba(212,175,55,.1);border-color:rgba(212,175,55,.45);transform:translateY(-2px);box-shadow:0 4px 16px rgba(212,175,55,.12)}
.maher-action-card i{font-size:20px;color:#D4AF37}
.maher-action-card span{font-size:11px;color:#e8e8e8;font-weight:500;line-height:1.3}
.maher-faq-chips{display:flex;flex-wrap:wrap;gap:7px}
.maher-faq-chip{background:rgba(139,92,246,.12);border:1px solid rgba(139,92,246,.3);border-radius:20px;padding:6px 13px;font-size:12px;color:#c4b5fd;cursor:pointer;transition:all .2s ease}
.maher-faq-chip:hover{background:rgba(139,92,246,.25);border-color:rgba(139,92,246,.6);color:#fff}
.maher-faq-answer{background:rgba(255,255,255,.04);border:1px solid rgba(139,92,246,.2);border-radius:10px;padding:12px 14px;font-size:13px;color:#d0c8ff;line-height:1.6;animation:maherFadeIn .25s ease}
.maher-services-catalog{display:flex;flex-direction:column;gap:6px}
.maher-cat-toggle{background:rgba(255,255,255,.04);border:1px solid rgba(255,255,255,.08);border-radius:8px;padding:10px 14px;cursor:pointer;display:flex;justify-content:space-between;align-items:center;transition:background .2s ease;width:100%;text-align:start}
.maher-cat-toggle:hover{background:rgba(212,175,55,.08)}
.maher-cat-toggle-left{display:flex;align-items:center;gap:8px}
.maher-cat-toggle-left i{color:#D4AF37;font-size:14px;width:16px}
.maher-cat-toggle-left span{font-size:13px;color:#e0e0e0}
.maher-cat-toggle .maher-badge{background:rgba(212,175,55,.2);color:#D4AF37;font-size:10px;font-weight:700;border-radius:10px;padding:2px 7px}
.maher-cat-services{display:none;flex-direction:column;gap:4px;padding:6px 8px 8px 30px}
.maher-cat-services.open{display:flex}
.maher-service-link{font-size:12px;color:#a0a0b8;text-decoration:none;padding:4px 0;transition:color .2s ease;display:flex;align-items:center;gap:6px}
.maher-service-link:hover{color:#D4AF37}
.maher-action-bar{display:flex;gap:8px;padding:10px 14px;background:rgba(10,10,18,.95);border-top:1px solid rgba(255,255,255,.07);flex-shrink:0}
.maher-bar-btn{flex:1;border:1px solid;border-radius:8px;padding:9px 8px;font-size:12px;font-weight:600;cursor:pointer;transition:all .22s ease;display:flex;align-items:center;justify-content:center;gap:5px;background:transparent}
.maher-bar-btn.btn-support{border-color:rgba(212,175,55,.4);color:#D4AF37}
.maher-bar-btn.btn-support:hover{background:rgba(212,175,55,.12);border-color:#D4AF37}
.maher-bar-btn.btn-ticket{border-color:rgba(139,92,246,.4);color:#a78bfa}
.maher-bar-btn.btn-ticket:hover{background:rgba(139,92,246,.12);border-color:#8B5CF6}
.maher-login-required{background:rgba(220,53,69,.1);border:1px solid rgba(220,53,69,.3);border-radius:10px;padding:12px 14px;text-align:center;animation:maherFadeIn .3s ease}
.maher-login-required p{margin:0 0 10px;font-size:12px;color:#f87171;line-height:1.5}
.maher-login-btn{display:inline-block;background:#D4AF37;color:#000;font-size:12px;font-weight:700;border-radius:6px;padding:6px 18px;text-decoration:none;transition:background .2s ease}
.maher-login-btn:hover{background:#E5C158}
.maher-ticket-flow{display:flex;flex-direction:column;gap:12px;padding:14px 16px}
.maher-bubble{max-width:88%;border-radius:14px;padding:10px 14px;font-size:13px;line-height:1.55;animation:maherFadeIn .25s ease}
.maher-bubble.bot{background:rgba(139,92,246,.15);border:1px solid rgba(139,92,246,.25);color:#e0d8ff;align-self:flex-start}
.maher-bubble.user{background:rgba(212,175,55,.15);border:1px solid rgba(212,175,55,.25);color:#fde68a;align-self:flex-end}
.maher-bubble.agent{background:rgba(34,197,94,.12);border:1px solid rgba(34,197,94,.25);color:#bbf7d0;align-self:flex-start}
.maher-bubble .sender-label{font-size:10px;font-weight:700;opacity:.6;margin-bottom:4px;display:block}
.maher-cancel-flow{align-self:center;background:rgba(220,53,69,.12);border:1px solid rgba(220,53,69,.3);color:#f87171;border-radius:20px;padding:5px 16px;font-size:11px;cursor:pointer;transition:all .2s ease;margin-top:4px}
.maher-cancel-flow:hover{background:rgba(220,53,69,.22);border-color:rgba(220,53,69,.6)}
.maher-polling-indicator{display:flex;align-items:center;gap:8px;font-size:12px;color:rgba(212,175,55,.7);padding:8px 16px;flex-shrink:0}
.maher-polling-dot{width:8px;height:8px;border-radius:50%;background:#D4AF37;animation:maherPulse 1.4s ease-in-out infinite}
@keyframes maherPulse{0%,100%{opacity:1;transform:scale(1)}50%{opacity:.4;transform:scale(.7)}}
.maher-exit-modal-overlay{position:absolute;inset:0;background:rgba(0,0,0,.75);backdrop-filter:blur(4px);-webkit-backdrop-filter:blur(4px);display:flex;align-items:center;justify-content:center;z-index:100;border-radius:inherit;animation:maherFadeIn .2s ease}
.maher-exit-modal{background:#0d0f1a;border:1px solid rgba(212,175,55,.25);border-radius:16px;padding:24px 20px;max-width:280px;width:90%;text-align:center}
.maher-exit-modal h3{margin:0 0 10px;font-size:15px;color:#D4AF37;font-weight:700}
.maher-exit-modal p{margin:0 0 18px;font-size:12px;color:rgba(255,255,255,.65);line-height:1.55}
.maher-exit-modal-actions{display:flex;gap:10px;justify-content:center}
.maher-exit-modal-actions button{flex:1;border-radius:8px;padding:9px 0;font-size:13px;font-weight:600;cursor:pointer;transition:all .2s ease;border:1px solid}
.maher-exit-confirm{background:rgba(220,53,69,.15);border-color:rgba(220,53,69,.4)!important;color:#f87171}
.maher-exit-confirm:hover{background:rgba(220,53,69,.28)}
.maher-exit-cancel{background:rgba(212,175,55,.12);border-color:rgba(212,175,55,.35)!important;color:#D4AF37}
.maher-exit-cancel:hover{background:rgba(212,175,55,.22)}

/* rusty end */

/* rusty change | 2026-07-26 - Single App UI Inline support button */
.btn-inline-support {
    border: 1px solid rgba(212,175,55,0.4);
    background: rgba(212,175,55,0.05);
    color: #D4AF37;
    border-radius: 8px;
    padding: 8px 14px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.22s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 8px;
}
.btn-inline-support:hover {
    background: rgba(212,175,55,0.15);
    border-color: #D4AF37;
}
