/* ========================================
   MODE CONTAINERS
   ======================================== */
.mode-container {
    display: none;
}

.mode-container.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

/* ========================================
   INPUT HELP ICONS (TOOLTIPS)
   ======================================== */
.input-help-icon {
    position: absolute;
    top: 12px;
    right: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    background: rgba(91, 155, 213, 0.2);
    border: 1px solid rgba(91, 155, 213, 0.4);
    border-radius: 50%;
    color: #7bc9a6;
    font-size: 11px;
    font-weight: 700;
    cursor: help;
    transition: all 0.3s ease;
    z-index: 10;
}

.input-help-icon:hover {
    background: rgba(91, 155, 213, 0.35);
    border-color: rgba(91, 155, 213, 0.6);
    transform: scale(1.15);
}

/* ========================================
   TOOLTIPS
   ======================================== */
.grimoire-tooltip {
    position: fixed;
    background: rgba(10, 10, 20, 0.97);
    backdrop-filter: blur(32px);
    -webkit-backdrop-filter: blur(32px);
    color: #d1d5db;
    padding: 0;
    border-radius: 14px;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.6;
    max-width: 360px;
    text-align: left;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 100000;
    border: 1px solid rgba(91, 155, 213, 0.4);
    box-shadow: 0 16px 64px rgba(0, 0, 0, 0.9), 0 8px 32px rgba(91, 155, 213, 0.3);
    font-family: 'Lora', serif;
    overflow: hidden;
}

.grimoire-tooltip.visible {
    opacity: 1;
    visibility: visible;
}

.tooltip-header {
    background: linear-gradient(135deg, rgba(91, 155, 213, 0.25), rgba(123, 201, 166, 0.2));
    padding: 12px 16px;
    font-weight: 700;
    font-size: 12px;
    letter-spacing: 0.05em;
    color: #7bc9a6;
    border-bottom: 1px solid rgba(91, 155, 213, 0.3);
    text-transform: uppercase;
    line-height: 1.4;
}

.tooltip-body {
    padding: 12px 16px;
    color: #d1d5db;
    line-height: 1.6;
}

.tooltip-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #7bc9a6;
    font-size: 13px;
    opacity: 0.6;
    transition: opacity 0.3s ease;
    font-style: normal;
    line-height: 1;
    margin-left: 4px;
} 

/* ========================================
   MOBILE FIXES - Add to responsive.css
   Critical fixes for mobile issues
   ======================================== */

/* Force override mode toggle to be thin and pill-shaped */
.mode-toggle {
    padding: 3px !important;
    gap: 3px !important;
    border-radius: 24px !important;
}

.mode-toggle-btn {
    padding: 7px 11px !important;
    font-size: 10px !important;
    min-width: 65px !important;
    border-radius: 21px !important;
    font-weight: 600 !important;
}

/* Fix search input disappearing on mobile */
@media (max-width: 768px) {
    .rune-search-input {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box !important;
    }
    
    .rune-search-wrapper {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        overflow: hidden !important;
    }
}

/* Collapse toggle positioning fix */
.filter-collapse-toggle {
    position: absolute !important;
    top: 12px !important;
    right: 16px !important;
    z-index: 1002 !important;
    padding: 6px 12px !important;
    font-size: 11px !important;
    white-space: nowrap !important;
}

/* Make sure controls wrapper has position relative */
.runes-controls-wrapper {
    position: relative !important;
}

/* Ensure collapsed state works properly */
.runes-controls.collapsed {
    max-height: 0 !important;
    opacity: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
    overflow: hidden !important;
}

/* When collapsed, still show toggle button area */
.runes-controls.collapsed + .filter-collapse-toggle,
.runes-controls.collapsed .filter-collapse-toggle {
    opacity: 1 !important;
    visibility: visible !important;
    position: static !important;
    display: block !important;
    margin: 0 auto 20px !important;
}

/* Alternative: Keep toggle visible when collapsed */
.runes-controls-wrapper.has-collapsed-filters {
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Extra mobile refinements */
@media (max-width: 480px) {
    .mode-toggle {
        padding: 2px !important;
        gap: 2px !important;
        border-radius: 20px !important;
    }
    
    .mode-toggle-btn {
        padding: 6px 9px !important;
        font-size: 9.5px !important;
        min-width: 60px !important;
        border-radius: 18px !important;
    }
    
    .filter-collapse-toggle {
        top: 10px !important;
        right: 14px !important;
        padding: 5px 10px !important;
        font-size: 10px !important;
    }
}

@media (max-width: 375px) {
    .mode-toggle-btn {
        padding: 5px 8px !important;
        font-size: 9px !important;
        min-width: 55px !important;
        border-radius: 17px !important;
    }
}

/* Ensure nothing overrides these critical mobile styles */
@media (max-width: 768px) {
    /* Force thin mode toggle on ALL mobile devices */
    .header .mode-toggle,
    #modeToggle {
        padding: 3px !important;
    }
    
    .header .mode-toggle-btn,
    #typeRunesBtn,
    #clickRunesBtn {
        padding: 7px 11px !important;
        min-height: auto !important;
        height: auto !important;
    }
}
