/* Floating Assistant Styles */

/* -------------------------------------------------------------------------- */
/* 1. Desktop Floating Button (Default)
/* -------------------------------------------------------------------------- */
.fg-floating-assistant {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 9999;
}

.fg-assistant-trigger {
    background: #bb0a07;
    border: none;
    box-shadow: 0 6px 20px rgba(187, 10, 7, 0.3);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: 24px;
    color: #ffffff;
    transition: all 0.3s;
    font-weight: 700;
    max-width: 100%;
    position: relative;
}

.fg-assistant-trigger:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(187, 10, 7, 0.4);
}

.fg-trigger-emoji {
    font-size: 20px;
    flex-shrink: 0;
}

.fg-trigger-text {
    font-size: 11px;
    white-space: nowrap;
}

.fg-trigger-badge {
    font-size: 9px;
    background: rgba(255, 255, 255, 0.25);
    padding: 2px 8px;
    border-radius: 12px;
    font-weight: 600;
    text-transform: lowercase;
    white-space: nowrap;
    flex-shrink: 0;
    transition: background 0.2s;
}

.fg-settings-badge:hover {
    background: rgba(255, 255, 255, 0.4);
    cursor: pointer;
}

.fg-floating-assistant.fg-tour-mode .fg-assistant-trigger {
    display: none !important;
}

/* Desktop Tooltip - appears above the button */
.fg-desktop-tooltip {
    position: fixed;
    z-index: 100000;
    background: #bb0a07;
    color: #ffffff;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    max-width: 280px;
    text-align: center;
    box-shadow: 0 8px 20px rgba(187, 10, 7, 0.25);
    font-family: 'Lexend', sans-serif;
    line-height: 1.5;
    pointer-events: none;
    white-space: normal;
    word-wrap: break-word;
}

.fg-desktop-tooltip-arrow {
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -6px;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid #bb0a07;
}

/* -------------------------------------------------------------------------- */
/* 2. Mobile Header Settings Icon - HIDDEN ON DESKTOP
/* -------------------------------------------------------------------------- */
#fg-header-settings-icon,
#fg-header-settings-icon *,
.fg-header-settings-btn {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* -------------------------------------------------------------------------- */
/* 3. Modal & Bottom Sheet
/* -------------------------------------------------------------------------- */
.fg-settings-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fg-settings-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
}

.fg-settings-content {
    position: relative;
    background: #ffffff;
    width: 90%;
    max-width: 400px;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    font-family: 'Lexend', sans-serif;
    max-height: 90vh;
    overflow-y: auto;
}

/* Modal Animations */
@keyframes fgModalFadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes fgModalSlideUp {
    from {
        transform: translateY(100%);
    }

    to {
        transform: translateY(0);
    }
}

/* Modal Elements */
.fg-settings-header {
    padding: 16px 20px;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.fg-settings-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: #1e293b;
}

.fg-settings-close {
    background: none;
    border: none;
    color: #64748b;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    display: flex;
    transition: all 0.2s;
}

.fg-settings-close:hover {
    background: #f1f5f9;
    color: #ef4444;
}

.fg-settings-body {
    padding: 20px;
}

.fg-settings-description {
    margin: 0 0 12px 0;
    font-size: 13px;
    color: #64748b;
}

/* Main Action Button in Modal */
.fg-modal-main-action {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 16px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 20px;
    text-align: left;
}

.fg-modal-main-action:hover {
    background: #fff1f1;
    border-color: #bb0a07;
}

.fg-action-emoji {
    font-size: 24px;
}

.fg-action-text {
    flex: 1;
}

.fg-action-text strong {
    display: block;
    color: #1e293b;
    font-size: 14px;
    margin-bottom: 2px;
}

.fg-action-text span {
    display: block;
    color: #64748b;
    font-size: 12px;
}

.fg-modal-divider {
    border: 0;
    border-top: 1px solid #f1f5f9;
    margin: 0 0 20px 0;
}

/* Settings Options */
.fg-settings-option {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.2s;
}

.fg-settings-option:hover {
    border-color: #cbd5e1;
    background: #f8fafc;
}

.fg-settings-option:has(input:checked) {
    border-color: #bb0a07;
    background: #fff1f1;
}

.fg-tour-pref-radio {
    margin-top: 3px;
    accent-color: #bb0a07;
}

.fg-option-content {
    flex: 1;
}

.fg-option-content strong {
    display: block;
    font-size: 13px;
    color: #1e293b;
    margin-bottom: 2px;
}

.fg-option-content span {
    display: block;
    font-size: 11px;
    color: #64748b;
    line-height: 1.4;
}

.fg-settings-footer {
    padding: 16px 20px;
    background: #f8fafc;
    border-top: 1px solid #f1f5f9;
    text-align: right;
}

.fg-settings-save {
    background: #bb0a07;
    color: #ffffff;
    border: none;
    padding: 8px 20px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    transition: background 0.2s;
}

.fg-settings-save:hover {
    background: #9a0806;
}

.fg-settings-save:disabled {
    background: #10b981;
    cursor: default;
}

/* -------------------------------------------------------------------------- */
/* 4. Mobile Responsive Rules
/* -------------------------------------------------------------------------- */
@media (max-width: 768px) {

    /* Hide Desktop Floating Button */
    .fg-assistant-trigger {
        display: none !important;
    }

    /* Show Header Settings Icon */
    #fg-header-settings-icon,
    #fg-header-settings-icon *,
    .fg-header-settings-btn {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        pointer-events: auto !important;
    }

    .fg-header-settings-btn {
        background: none !important;
        border: none !important;
        cursor: pointer;
        padding: 0 10px;
        position: relative;
        align-items: center;
        justify-content: center;
        color: #bb0a07 !important;
    }

    /* Bottom Sheet Style for Modal */
    .fg-settings-modal {
        align-items: flex-end;
    }

    .fg-settings-content {
        width: 100%;
        max-width: 100%;
        border-radius: 20px 20px 0 0;
        margin: 0;
        animation: fgModalSlideUp 0.3s ease-out;
    }

    /* Center Save Button on Mobile */
    .fg-settings-footer {
        text-align: center !important;
    }

    .fg-settings-save {
        width: 100%;
        padding: 12px;
        font-size: 14px;
    }
}

/* Intro.js Styling - Force bottom position */
.introjs-tooltip {
    background: #ffffff !important;
    border: 2px solid #bb0a07 !important;
    border-radius: 12px !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15) !important;
    max-width: 400px !important;
    font-family: 'Lexend', sans-serif !important;
}

/* Force all arrows to point up (tooltip below element) */
.introjs-arrow.top,
.introjs-arrow.top-right,
.introjs-arrow.top-middle,
.introjs-arrow.top-left {
    top: -10px !important;
    border-bottom: 10px solid #bb0a07 !important;
    border-top: none !important;
}

.introjs-tooltiptext {
    font-family: 'Lexend', sans-serif !important;
    color: #334155 !important;
    font-size: 12px !important;
    line-height: 1.6 !important;
    padding: 8px 12px !important;
}

.introjs-tooltip-title {
    display: block !important;
    color: #bb0a07 !important;
    font-weight: 700 !important;
    font-size: 13px !important;
    margin-bottom: 6px !important;
    font-family: 'Lexend', sans-serif !important;
}

.introjs-tooltipbuttons {
    padding: 8px 12px !important;
    border-top: 1px solid #f1f5f9 !important;
}

.introjs-button {
    background: #bb0a07 !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 6px !important;
    padding: 6px 12px !important;
    font-weight: 600 !important;
    font-size: 11px !important;
    text-shadow: none !important;
    font-family: 'Lexend', sans-serif !important;
    margin: 0 4px !important;
}

.introjs-button:hover {
    background: #9a0806 !important;
}

.introjs-prevbutton {
    background: #f1f5f9 !important;
    color: #334155 !important;
}

.introjs-prevbutton:hover {
    background: #e2e8f0 !important;
}

.introjs-skipbutton {
    color: #64748b !important;
    font-weight: 600 !important;
    font-size: 10px !important;
    font-family: 'Lexend', sans-serif !important;
    padding: 6px 10px !important;
}

.introjs-progress {
    background: #f1f5f9 !important;
    height: 3px !important;
}

.introjs-progressbar {
    background: #bb0a07 !important;
}