/* ==========================================================================
   VARIABLES & BASE
   ========================================================================== */
:root {
    --ob-bg: #131722;
    --ob-panel: #1e222d;
    --ob-border: #2a2e39;
    --ob-text-muted: #787b86;
    --ob-text: #d1d4dc;
    --ob-text-light: #ffffff;
    --ob-green: #089981;
    --ob-red: #f23645;
    --ob-blue: #2962ff;
    --ob-gold: #e2a03f;
}

.etea-ob-overlay {
    position: fixed; 
    top: 0; 
    left: 0; 
    width: 100vw; 
    height: 100vh;
    background: rgba(10, 12, 18, 0.92); 
    backdrop-filter: blur(10px);
    z-index: 999999; 
    display: flex; 
    align-items: center; 
    justify-content: center;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.etea-ob-box {
    background: var(--ob-panel); 
    border: 1px solid var(--ob-blue);
    padding: 35px; 
    border-radius: 12px; 
    max-width: 700px; 
    width: 95%;
    box-shadow: 0 0 60px rgba(41, 98, 255, 0.25);
    display: flex; 
    flex-direction: column; 
    max-height: 92vh;
    position: relative;
    overflow: hidden;
}

/* Header Title & Desc */
.etea-ob-title {
    color: var(--ob-green); 
    font-family: 'Share Tech Mono', monospace;
    font-size: 2em; 
    margin: 0 0 10px 0; 
    text-align: center;
    letter-spacing: 1px;
}

.etea-ob-desc {
    color: var(--ob-text-muted); 
    font-size: 14px; 
    text-align: center;
    margin-bottom: 25px; 
    line-height: 1.6;
    max-width: 550px;
    margin-left: auto;
    margin-right: auto;
}

/* ==========================================================================
   SEARCH BAR (AUTOCOMPLETE)
   ========================================================================== */
.etea-ob-search-wrapper { 
    position: relative; 
    margin-bottom: 25px; 
}

.etea-ob-search-input {
    width: 100%; 
    background: var(--ob-bg); 
    border: 1px solid var(--ob-border);
    color: var(--ob-text-light); 
    padding: 14px 18px; 
    border-radius: 8px;
    font-size: 15px; 
    font-family: 'Share Tech Mono', monospace; 
    outline: none; 
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.etea-ob-search-input:focus { 
    border-color: var(--ob-blue); 
    box-shadow: 0 0 15px rgba(41, 98, 255, 0.3); 
    background: #1a1e2a;
}

.etea-ob-autocomplete-list {
    position: absolute; 
    top: 100%; 
    left: 0; 
    right: 0;
    background: var(--ob-panel); 
    border: 1px solid var(--ob-blue);
    border-radius: 0 0 8px 8px; 
    z-index: 100; 
    max-height: 280px; 
    overflow-y: auto;
    display: none; 
    box-shadow: 0 20px 40px rgba(0,0,0,0.7);
}

/* ==========================================================================
   NAVIGATION TABS
   ========================================================================== */
.etea-ob-tabs {
    display: flex; 
    gap: 5px; 
    margin-bottom: 20px; 
    overflow-x: auto;
    padding-bottom: 8px; 
    border-bottom: 1px solid var(--ob-border);
}

.etea-ob-tabs::-webkit-scrollbar { height: 3px; }
.etea-ob-tabs::-webkit-scrollbar-thumb { background: var(--ob-border); border-radius: 4px; }

.etea-ob-tab-btn {
    background: transparent; 
    border: none; 
    color: var(--ob-text-muted);
    padding: 10px 15px; 
    font-size: 11px; 
    font-weight: 800; 
    cursor: pointer;
    border-radius: 6px; 
    white-space: nowrap; 
    transition: all 0.2s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-family: 'Share Tech Mono', monospace;
}

.etea-ob-tab-btn.active { 
    background: rgba(41, 98, 255, 0.15); 
    color: var(--ob-blue); 
    box-shadow: inset 0 0 10px rgba(41, 98, 255, 0.1);
}

.etea-ob-tab-btn:hover:not(.active) {
    color: var(--ob-text-light);
    background: rgba(255, 255, 255, 0.05);
}

/* ==========================================================================
   CONTENT GRID & CARDS
   ========================================================================== */
.etea-ob-tab-content-wrapper {
    flex-grow: 1; 
    overflow-y: auto; 
    min-height: 250px;
    padding-right: 8px; 
    margin-bottom: 25px;
}

.etea-ob-tab-content-wrapper::-webkit-scrollbar { width: 5px; }
.etea-ob-tab-content-wrapper::-webkit-scrollbar-thumb { background: var(--ob-border); border-radius: 10px; }

.etea-ob-tab-pane { display: none; }
.etea-ob-tab-pane.active { display: block; animation: fadeIn 0.4s ease-out; }

@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

.etea-ob-grid {
    display: grid; 
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); 
    gap: 12px;
}

.etea-ob-card {
    background: var(--ob-bg); 
    border: 1px solid var(--ob-border);
    padding: 12px; 
    border-radius: 8px; 
    display: flex; 
    align-items: center; 
    gap: 12px;
    cursor: pointer; 
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1); 
    user-select: none;
}

.etea-ob-card:hover { 
    border-color: var(--ob-blue); 
    background: rgba(41, 98, 255, 0.05);
    transform: translateY(-2px);
}

.etea-ob-card.selected { 
    border-color: var(--ob-green); 
    background: rgba(8, 153, 129, 0.1); 
    box-shadow: 0 0 15px rgba(8, 153, 129, 0.2); 
}

.etea-ob-card-logo { 
    width: 32px; 
    height: 32px; 
    border-radius: 50%; 
    background: #fff; 
    padding: 3px; 
    object-fit: contain; 
    flex-shrink: 0;
}

.etea-ob-card-logo-placeholder { 
    width: 32px; 
    height: 32px; 
    border-radius: 50%; 
    background: var(--ob-panel); 
    color: var(--ob-text-muted); 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    font-size: 12px; 
    font-weight: bold; 
    border: 1px solid var(--ob-border); 
    flex-shrink: 0;
}

.etea-ob-card-info { 
    display: flex; 
    flex-direction: column; 
    flex-grow: 1; 
    overflow: hidden; 
}

.etea-ob-card-ticker { 
    font-weight: bold; 
    color: var(--ob-text-light); 
    font-family: 'Share Tech Mono', monospace; 
    font-size: 14px; 
}

.etea-ob-card-sec { 
    font-size: 10px; 
    color: var(--ob-text-muted); 
    white-space: nowrap; 
    overflow: hidden; 
    text-overflow: ellipsis; 
}

.etea-ob-card-val { 
    font-size: 12px; 
    font-family: 'Share Tech Mono', monospace; 
    font-weight: bold; 
    text-align: right; 
    min-width: 50px;
}

.etea-ob-val-bullish { color: var(--ob-green); }
.etea-ob-val-bearish { color: var(--ob-red); }
.etea-ob-val-neutral { color: var(--ob-text-muted); }

/* ==========================================================================
   FOOTER BAR & STATUS
   ========================================================================== */
.etea-ob-footer { 
    text-align: center; 
    border-top: 1px solid var(--ob-border); 
    padding-top: 25px; 
}

.etea-ob-status-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    flex-wrap: wrap;
    gap: 10px;
}

.etea-ob-status { 
    font-size: 11px; 
    color: var(--ob-text-muted); 
    text-transform: uppercase;
    font-family: 'Share Tech Mono', monospace;
    font-weight: bold;
}

.etea-ob-status strong { color: var(--ob-blue); }

.etea-ob-selected-badges { 
    display: flex; 
    flex-wrap: wrap; 
    gap: 6px; 
    justify-content: flex-end; 
    min-height: 25px; 
}

.etea-ob-badge { 
    background: rgba(41, 98, 255, 0.2); 
    color: var(--ob-blue); 
    padding: 4px 10px; 
    border-radius: 4px; 
    font-size: 10px; 
    font-weight: bold; 
    font-family: 'Share Tech Mono', monospace;
    border: 1px solid rgba(41, 98, 255, 0.3);
}

/* ==========================================================================
   BUTTON GRID (3 BUTTONS SUPPORT)
   ========================================================================== */
.etea-ob-button-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    margin-top: 5px;
}

.etea-ob-btn-primary, 
.etea-ob-btn-secondary {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 14px 20px;
    border-radius: 6px;
    font-family: 'Share Tech Mono', monospace;
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    letter-spacing: 1px;
    white-space: nowrap;
}

/* Bouton principal (SAVE & START) */
.etea-ob-btn-primary {
    background: var(--ob-green); 
    color: #fff;
    box-shadow: 0 4px 15px rgba(8, 153, 129, 0.3);
}

.etea-ob-btn-primary:hover { 
    background: #0ac2a0; 
    box-shadow: 0 6px 20px rgba(8, 153, 129, 0.5); 
    transform: translateY(-2px);
}

.etea-ob-btn-primary:disabled {
    background: var(--ob-border);
    color: var(--ob-text-muted);
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

/* Boutons secondaires (SKIP, LOGIN) */
.etea-ob-btn-secondary {
    background: var(--ob-panel);
    border: 1px solid var(--ob-border);
    color: var(--ob-text-muted);
}

.etea-ob-btn-secondary:hover {
    background: #2a2e39;
    color: var(--ob-text-light);
    border-color: var(--ob-text-muted);
}

/* Style spécial pour le bouton LOGIN dans le footer */
.etea-ob-btn-blue {
    background: rgba(41, 98, 255, 0.1);
    border: 1px solid var(--ob-blue);
    color: var(--ob-blue);
}

.etea-ob-btn-blue:hover {
    background: var(--ob-blue);
    color: #fff;
    box-shadow: 0 0 15px rgba(41, 98, 255, 0.4);
}

/* ==========================================================================
   RESPONSIVE TWEAKS
   ========================================================================== */
@media (max-width: 600px) {
    .etea-ob-box { padding: 20px; }
    .etea-ob-grid { grid-template-columns: 1fr; }
    .etea-ob-button-grid { grid-template-columns: 1fr; }
    .etea-ob-status-bar { flex-direction: column; align-items: center; }
    .etea-ob-selected-badges { justify-content: center; }
}