/* ==========================================================================
   FootBaz - Floating Customer Support Widget Stylesheet
   Dark Glassmorphism RTL Design System
   ========================================================================== */

/* Launcher FAB */
.fb-support-fab {
    position: fixed;
    bottom: max(24px, env(safe-area-inset-bottom));
    right: max(24px, env(safe-area-inset-right));
    left: auto;
    z-index: 9990;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #00b4d8 0%, #00f0ff 100%);
    box-shadow: 0 8px 24px rgba(0, 240, 255, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.2);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #06080e;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    outline: none;
    animation: fb-slide-left-to-right 1.1s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes fb-slide-left-to-right {
    0% {
        transform: translate3d(calc(-100vw + 100% + 48px), 0, 0);
        opacity: 0.6;
    }
    20% {
        opacity: 1;
    }
    100% {
        transform: translate3d(0, 0, 0);
        opacity: 1;
    }
}

.fb-support-fab:hover {
    transform: scale(1.08) translateY(-3px);
    box-shadow: 0 12px 32px rgba(0, 240, 255, 0.6), 0 0 20px rgba(0, 240, 255, 0.4);
}

.fb-support-fab:active {
    transform: scale(0.95);
}

.fb-support-fab .fb-fab-icon-chat,
.fb-support-fab .fb-fab-icon-close {
    width: 28px;
    height: 28px;
    stroke: #06080e;
    stroke-width: 2.2;
    transition: transform 0.25s ease, opacity 0.25s ease;
}

.fb-support-fab .fb-fab-icon-close {
    display: none;
}

.fb-support-fab.is-open .fb-fab-icon-chat {
    display: none;
}

.fb-support-fab.is-open .fb-fab-icon-close {
    display: block;
}

/* Badge for unread replies */
.fb-support-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    border-radius: 11px;
    background: #ff3366;
    color: #ffffff;
    font-size: 11px;
    font-weight: 800;
    line-height: 22px;
    text-align: center;
    border: 2px solid #06080e;
    box-shadow: 0 2px 8px rgba(255, 51, 102, 0.5);
    display: none;
}

.fb-support-badge.is-visible {
    display: block;
    animation: fb-pulse 2s infinite;
}

@keyframes fb-pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.15); }
    100% { transform: scale(1); }
}

/* Main Modal / Slide-over Window */
.fb-support-modal {
    position: fixed;
    bottom: max(96px, calc(env(safe-area-inset-bottom) + 72px));
    right: max(24px, env(safe-area-inset-right));
    left: auto;
    z-index: 9989;
    width: 410px;
    max-width: calc(100vw - 32px);
    height: 620px;
    max-height: calc(100vh - 120px);
    border-radius: 20px;
    background: rgba(15, 20, 34, 0.96);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 240, 255, 0.25);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7), 0 0 35px rgba(0, 240, 255, 0.15);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    transform: translateY(20px) scale(0.96);
    transform-origin: bottom right;
    transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1), transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    font-family: 'Vazirmatn', -apple-system, BlinkMacSystemFont, sans-serif;
    color: #f3f6fc;
    direction: rtl;
}

.fb-support-modal.is-open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0) scale(1);
}

/* Modal Header */
.fb-support-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: linear-gradient(180deg, rgba(20, 27, 45, 0.9) 0%, rgba(15, 20, 34, 0.9) 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    flex-shrink: 0;
}

.fb-support-header-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.fb-support-avatar {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(0, 240, 255, 0.2), rgba(0, 180, 216, 0.3));
    border: 1px solid rgba(0, 240, 255, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #00f0ff;
    flex-shrink: 0;
    overflow: hidden;
}

.fb-support-avatar-img {
    width: 26px;
    height: 26px;
    object-fit: contain;
    display: block;
    filter: drop-shadow(0 0 6px rgba(0, 240, 255, 0.4));
}

.fb-support-title-group h3 {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.3;
}

.fb-support-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: #00e676;
    margin-top: 2px;
}

.fb-status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #00e676;
    box-shadow: 0 0 8px #00e676;
}

.fb-status-dot.offline {
    background: #ffb703;
    box-shadow: 0 0 8px #ffb703;
}

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

.fb-btn-icon {
    background: transparent;
    border: none;
    color: #9aa8bd;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.fb-btn-icon:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
}

/* Tab Navigation */
.fb-support-tabs {
    display: flex;
    padding: 6px 12px;
    background: rgba(10, 14, 24, 0.6);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    gap: 6px;
    flex-shrink: 0;
}

.fb-support-tab-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 10px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 600;
    color: #9aa8bd;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.fb-support-tab-btn svg {
    width: 15px;
    height: 15px;
}

.fb-support-tab-btn:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.04);
}

.fb-support-tab-btn.is-active {
    color: #00f0ff;
    background: rgba(0, 240, 255, 0.12);
    border: 1px solid rgba(0, 240, 255, 0.3);
}

/* Tab Content Panels */
.fb-support-body {
    flex: 1;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.fb-tab-panel {
    display: none;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

.fb-tab-panel.is-active {
    display: flex;
}

/* ==========================================================================
   Tab 1: FAQ Tree Panel
   ========================================================================== */
.fb-faq-tree-wrap {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

.fb-faq-tree-wrap.is-hidden {
    display: none !important;
}

.fb-faq-search-wrap {
    padding: 14px 16px 10px;
    position: relative;
    flex-shrink: 0;
}

.fb-faq-search-input {
    width: 100%;
    background: #090c14;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    padding: 10px 38px 10px 36px;
    color: #ffffff;
    font-size: 13px;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

.fb-faq-search-input:focus {
    border-color: #00f0ff;
    box-shadow: 0 0 10px rgba(0, 240, 255, 0.2);
}

.fb-faq-search-icon {
    position: absolute;
    right: 28px;
    top: 24px;
    width: 16px;
    height: 16px;
    color: #6b7a94;
    pointer-events: none;
}

.fb-faq-search-clear {
    position: absolute;
    left: 24px;
    top: 22px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    border: none;
    color: #9aa8bd;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: all 0.2s ease;
}

.fb-faq-search-clear:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.2);
}

.fb-faq-scrollable {
    flex: 1;
    overflow-y: auto;
    padding: 0 16px 16px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
}

.fb-faq-scrollable::-webkit-scrollbar {
    width: 5px;
}
.fb-faq-scrollable::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 3px;
}

.fb-faq-section-title {
    font-size: 12px;
    font-weight: 700;
    color: #9aa8bd;
    margin: 12px 0 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.fb-faq-list-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.fb-btn-reset-filter {
    background: rgba(0, 240, 255, 0.1);
    border: 1px solid rgba(0, 240, 255, 0.3);
    color: #00f0ff;
    border-radius: 6px;
    padding: 3px 8px;
    font-size: 11px;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s ease;
}

.fb-btn-reset-filter:hover {
    background: rgba(0, 240, 255, 0.2);
    border-color: #00f0ff;
}

.fb-category-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-bottom: 14px;
}

.fb-category-chip {
    background: rgba(20, 27, 45, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 10px 12px;
    text-align: right;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-family: inherit;
    color: inherit;
    outline: none;
}

.fb-category-chip:hover {
    border-color: rgba(0, 240, 255, 0.4);
    background: rgba(0, 240, 255, 0.06);
    transform: translateY(-2px);
}

.fb-category-chip.is-active {
    border-color: #00f0ff;
    background: rgba(0, 240, 255, 0.15);
    box-shadow: 0 0 12px rgba(0, 240, 255, 0.25);
}

.fb-category-chip.is-active .fb-category-chip-title {
    color: #00f0ff;
}

.fb-category-chip-title {
    font-size: 12px;
    font-weight: 700;
    color: #ffffff;
}

.fb-category-chip-count {
    font-size: 10px;
    color: #6b7a94;
}

.fb-faq-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.fb-faq-item-card {
    background: rgba(20, 27, 45, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    padding: 12px 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-height: 48px;
    box-sizing: border-box;
}

.fb-faq-item-card:hover,
.fb-faq-item-card:focus-visible {
    border-color: rgba(0, 240, 255, 0.3);
    background: rgba(20, 27, 45, 0.95);
    outline: none;
    transform: translateY(-1px);
}

.fb-faq-item-card:active {
    transform: scale(0.99);
}

.fb-faq-item-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
    min-width: 0;
}

.fb-faq-item-category {
    display: inline-block;
    font-size: 10px;
    font-weight: 600;
    color: #00f0ff;
    background: rgba(0, 240, 255, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    width: fit-content;
}

.fb-faq-item-title {
    font-size: 13px;
    font-weight: 500;
    color: #f3f6fc;
    line-height: 1.4;
    word-break: break-word;
}

.fb-faq-item-snippet {
    font-size: 11px;
    color: #94a3b8;
    line-height: 1.5;
    margin-top: 2px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.fb-faq-item-card svg {
    width: 14px;
    height: 14px;
    color: #6b7a94;
    flex-shrink: 0;
}

/* FAQ Empty State */
.fb-faq-empty-state {
    padding: 24px 16px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.fb-faq-empty-icon {
    font-size: 28px;
    margin-bottom: 4px;
}

.fb-faq-empty-title {
    font-size: 13px;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.4;
}

.fb-faq-empty-desc {
    font-size: 12px;
    color: #9aa8bd;
    margin-bottom: 8px;
}

.fb-faq-empty-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
}

.fb-btn-empty-action {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    color: #ffffff;
}

.fb-btn-empty-action.ai {
    border-color: rgba(0, 240, 255, 0.3);
    background: rgba(0, 240, 255, 0.1);
    color: #00f0ff;
}

.fb-btn-empty-action.human {
    border-color: rgba(0, 230, 118, 0.3);
    background: rgba(0, 230, 118, 0.1);
    color: #00e676;
}

.fb-btn-empty-action:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* FAQ Answer View */
.fb-faq-answer-view {
    display: none;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

.fb-faq-answer-view.is-visible {
    display: flex;
}

.fb-faq-answer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    flex-shrink: 0;
}

.fb-btn-back {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 600;
    color: #00f0ff;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 6px 10px;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.fb-btn-back:hover {
    background: rgba(0, 240, 255, 0.12);
}

.fb-faq-category-badge {
    font-size: 11px;
    color: #00f0ff;
    background: rgba(0, 240, 255, 0.1);
    border: 1px solid rgba(0, 240, 255, 0.25);
    padding: 2px 8px;
    border-radius: 6px;
}

.fb-faq-answer-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
}

.fb-faq-answer-body::-webkit-scrollbar {
    width: 5px;
}
.fb-faq-answer-body::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 3px;
}

.fb-faq-answer-question {
    font-size: 15px;
    font-weight: 800;
    color: #ffffff;
    margin: 0 0 12px 0;
    line-height: 1.5;
}

.fb-faq-answer-text {
    font-size: 13px;
    line-height: 1.8;
    color: #cbd5e1;
    white-space: pre-line;
}

.fb-faq-answer-text p {
    margin: 0 0 10px 0;
}

.fb-faq-quick-replies {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 16px 0;
}

.fb-quick-reply-pill {
    background: rgba(0, 240, 255, 0.1);
    border: 1px solid rgba(0, 240, 255, 0.25);
    border-radius: 20px;
    padding: 5px 12px;
    font-size: 11px;
    font-family: inherit;
    color: #00f0ff;
    cursor: pointer;
    white-space: nowrap;
    outline: none;
    transition: all 0.2s ease;
    display: inline-block;
}

.fb-quick-reply-pill:focus-visible {
    border-color: #00f0ff;
    box-shadow: 0 0 8px rgba(0, 240, 255, 0.4);
}

.fb-quick-reply-pill:hover {
    background: rgba(0, 240, 255, 0.2);
    border-color: #00f0ff;
}

.fb-faq-feedback-box {
    margin-top: 18px;
    padding: 12px 14px;
    background: rgba(20, 27, 45, 0.8);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.fb-faq-feedback-box span {
    font-size: 12px;
    color: #9aa8bd;
}

.fb-feedback-actions {
    display: flex;
    gap: 6px;
}

.fb-btn-feedback {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 4px 10px;
    font-size: 11px;
    color: #f3f6fc;
    cursor: pointer;
    transition: all 0.2s;
}

.fb-btn-feedback:hover {
    background: rgba(0, 240, 255, 0.15);
    border-color: #00f0ff;
    color: #00f0ff;
}

.fb-faq-more-help {
    margin-top: 14px;
    padding: 12px 14px;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
}

.fb-faq-more-help-text {
    font-size: 12px;
    font-weight: 600;
    color: #9aa8bd;
    margin-bottom: 8px;
}

.fb-faq-more-help-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.fb-btn-more-help {
    flex: 1;
    min-width: 130px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 10px;
    border-radius: 8px;
    font-size: 11.5px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    color: #ffffff;
}

.fb-btn-more-help.ai {
    border-color: rgba(0, 240, 255, 0.3);
    background: rgba(0, 240, 255, 0.08);
    color: #00f0ff;
}

.fb-btn-more-help.human {
    border-color: rgba(0, 230, 118, 0.3);
    background: rgba(0, 230, 118, 0.08);
    color: #00e676;
}

.fb-btn-more-help:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.fb-faq-related-questions {
    margin-top: 18px;
}

/* ==========================================================================
   Tab 2: AI Gemini Support Panel
   ========================================================================== */
.fb-chat-messages-area {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
}

.fb-message-row {
    display: flex;
    gap: 8px;
    max-width: 85%;
}

.fb-message-row.user {
    align-self: flex-start;
    flex-direction: row-reverse;
}

.fb-message-row.assistant,
.fb-message-row.admin {
    align-self: flex-end;
}

.fb-message-bubble {
    padding: 10px 14px;
    border-radius: 14px;
    font-size: 13px;
    line-height: 1.6;
    word-break: break-word;
}

.fb-message-row.user .fb-message-bubble {
    background: linear-gradient(135deg, #00b4d8 0%, #0077b6 100%);
    color: #ffffff;
    border-bottom-left-radius: 4px;
    box-shadow: 0 4px 14px rgba(0, 180, 216, 0.25);
}

.fb-message-row.assistant .fb-message-bubble {
    background: #141b2d;
    border: 1px solid rgba(0, 240, 255, 0.2);
    color: #e2e8f0;
    border-bottom-right-radius: 4px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
}

.fb-message-row.admin .fb-message-bubble {
    background: #1a2238;
    border: 1px solid rgba(0, 230, 118, 0.25);
    color: #ffffff;
    border-bottom-right-radius: 4px;
    box-shadow: 0 4px 14px rgba(0, 230, 118, 0.15);
}

.fb-message-meta {
    font-size: 10px;
    color: #6b7a94;
    margin-top: 4px;
    text-align: left;
}

.fb-message-row.user .fb-message-meta {
    text-align: right;
}

/* AI Quick Replies / Suggestions */
.fb-ai-suggestions {
    padding: 6px 16px 10px;
    display: flex;
    gap: 6px;
    overflow-x: auto;
    white-space: nowrap;
    scrollbar-width: none;
    flex-shrink: 0;
}
.fb-ai-suggestions::-webkit-scrollbar {
    display: none;
}

.fb-suggestion-pill {
    background: rgba(0, 240, 255, 0.08);
    border: 1px solid rgba(0, 240, 255, 0.2);
    border-radius: 16px;
    padding: 5px 12px;
    font-size: 11px;
    font-family: inherit;
    color: #6df4ff;
    cursor: pointer;
    white-space: nowrap;
    outline: none;
    transition: all 0.2s ease;
    display: inline-block;
}

.fb-suggestion-pill:focus-visible {
    border-color: #00f0ff;
    box-shadow: 0 0 8px rgba(0, 240, 255, 0.4);
}

.fb-suggestion-pill:hover {
    background: rgba(0, 240, 255, 0.18);
    border-color: #00f0ff;
}

/* Escalation Banner */
.fb-escalation-banner {
    margin: 8px 16px;
    padding: 10px 14px;
    background: linear-gradient(135deg, rgba(255, 183, 3, 0.15), rgba(251, 133, 0, 0.1));
    border: 1px solid rgba(255, 183, 3, 0.35);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    flex-shrink: 0;
}

.fb-escalation-banner span {
    font-size: 11px;
    color: #ffd166;
    line-height: 1.4;
}

.fb-btn-escalate {
    background: #ffb703;
    color: #06080e;
    border: none;
    border-radius: 8px;
    padding: 6px 12px;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: transform 0.2s;
}

.fb-btn-escalate:hover {
    transform: scale(1.04);
}

/* Chat Input Area */
.fb-chat-input-bar {
    padding: 10px 14px;
    background: rgba(10, 14, 24, 0.85);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: flex-end;
    gap: 8px;
    flex-shrink: 0;
}

.fb-chat-textarea {
    flex: 1;
    background: #090c14;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    padding: 10px 12px;
    color: #ffffff;
    font-size: 13px;
    font-family: inherit;
    resize: none;
    height: 42px;
    max-height: 100px;
    outline: none;
    box-sizing: border-box;
    line-height: 1.4;
    transition: border-color 0.2s;
}

.fb-chat-textarea:focus {
    border-color: #00f0ff;
}

.fb-btn-send {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: #00f0ff;
    color: #06080e;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s;
}

.fb-btn-send:hover {
    background: #6df4ff;
    transform: scale(1.05);
}

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

/* Typing Indicator */
.fb-typing-indicator {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 10px 14px;
    background: #141b2d;
    border-radius: 14px;
    width: fit-content;
    border: 1px solid rgba(0, 240, 255, 0.15);
}

.fb-typing-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #00f0ff;
    animation: fb-typing 1.4s infinite ease-in-out;
}
.fb-typing-dot:nth-child(2) { animation-delay: 0.2s; }
.fb-typing-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes fb-typing {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
    30% { transform: translateY(-4px); opacity: 1; }
}

/* ==========================================================================
   Tab 3: Human Live Chat Header & Info
   ========================================================================== */
.fb-human-status-bar {
    padding: 8px 16px;
    background: rgba(20, 27, 45, 0.7);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 11px;
    flex-shrink: 0;
}

.fb-human-status-badge {
    color: #00e676;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.fb-btn-end-chat {
    background: transparent;
    border: 1px solid rgba(255, 51, 102, 0.3);
    color: #ff3366;
    border-radius: 6px;
    padding: 2px 8px;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.2s;
}

.fb-btn-end-chat:hover {
    background: rgba(255, 51, 102, 0.15);
}

/* Mobile Responsive Optimization */
@media (max-width: 640px) {
    .fb-support-fab {
        bottom: max(18px, env(safe-area-inset-bottom));
        right: max(18px, env(safe-area-inset-right));
        left: auto;
        width: 54px;
        height: 54px;
    }

    .fb-support-modal {
        bottom: 0;
        left: 0;
        right: 0;
        top: 0;
        width: 100%;
        max-width: 100%;
        height: 100%;
        height: 100dvh;
        max-height: 100%;
        border-radius: 0;
        border: none;
        z-index: 10000;
    }

    .fb-support-header {
        padding-top: max(16px, env(safe-area-inset-top));
    }

    .fb-support-tabs {
        padding: 6px 8px;
        gap: 4px;
    }

    .fb-support-tab-btn {
        padding: 7px 6px;
        font-size: 11px;
        gap: 4px;
    }

    .fb-support-tab-btn svg {
        width: 13px;
        height: 13px;
    }

    .fb-faq-search-wrap {
        padding: 10px 12px 8px;
    }

    .fb-faq-search-clear {
        left: 18px;
        top: 19px;
    }

    .fb-faq-scrollable {
        padding: 0 12px 14px;
    }

    .fb-category-grid {
        gap: 6px;
    }

    .fb-category-chip {
        padding: 8px 10px;
    }

    .fb-category-chip-title {
        font-size: 11.5px;
    }

    .fb-faq-item-card {
        padding: 10px 12px;
        min-height: 44px;
    }

    .fb-faq-item-title {
        font-size: 12.5px;
    }

    .fb-btn-back {
        padding: 6px 8px;
        font-size: 11.5px;
    }

    .fb-faq-answer-body {
        padding: 12px 14px max(24px, env(safe-area-inset-bottom));
        -webkit-overflow-scrolling: touch;
    }

    .fb-faq-answer-question {
        font-size: 14px;
    }

    .fb-faq-answer-text {
        font-size: 12.5px;
        line-height: 1.75;
    }

    .fb-faq-feedback-box {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .fb-faq-more-help-actions {
        flex-direction: column;
    }

    .fb-btn-more-help {
        width: 100%;
        min-height: 38px;
    }

    .fb-chat-input-bar {
        padding-bottom: max(12px, env(safe-area-inset-bottom));
    }
}

/* Guest Auth Required Card */
.fb-auth-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    height: 100%;
    padding: 32px 24px;
    background: radial-gradient(circle at center, rgba(0, 240, 255, 0.08) 0%, transparent 70%);
}

.fb-auth-card .fb-auth-icon-wrap {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: rgba(0, 240, 255, 0.12);
    border: 1px solid rgba(0, 240, 255, 0.3);
    color: #00f0ff;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    box-shadow: 0 0 25px rgba(0, 240, 255, 0.2);
}

.fb-auth-card .fb-auth-title {
    font-size: 17px;
    font-weight: 800;
    color: #ffffff;
    margin: 0 0 10px 0;
}

.fb-auth-card .fb-auth-desc {
    font-size: 13px;
    line-height: 1.7;
    color: #94a3b8;
    max-width: 290px;
    margin: 0 0 26px 0;
}

.fb-auth-card .fb-auth-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    max-width: 280px;
}

.fb-auth-card .fb-btn-auth-login {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 20px;
    border-radius: 12px;
    background: linear-gradient(135deg, #00b4d8 0%, #00f0ff 100%);
    color: #06080e;
    font-size: 14px;
    font-weight: 800;
    text-decoration: none;
    box-shadow: 0 6px 20px rgba(0, 240, 255, 0.35);
    transition: all 0.25s ease;
}

.fb-auth-card .fb-btn-auth-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 240, 255, 0.5);
}

.fb-auth-card .fb-btn-auth-register {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 11px 20px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #e2e8f0;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.25s ease;
}

.fb-auth-card .fb-btn-auth-register:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(0, 240, 255, 0.4);
    color: #00f0ff;
}
