/* ============================================================
 * components.css — Bold Water ERP
 * ============================================================
 * Reusable UI components: badges, cards, market selector,
 * language toggle, drop zones, settings navigation.
 *
 * Loaded AFTER base.css so component-level rules can build on top
 * of page-level primitives.
 *
 * NOTE (v0.39.0): extracted from the inline <style> block of
 * index.html. style.css still holds most of the design system —
 * a future phase can pull more generic components out of it.
 * ============================================================ */


/* ── Status badges (Production / Insumos) ───────────────── */
.status-badge {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
}

.status-optimal {
    background: rgba(0, 242, 255, 0.1);
    color: var(--accent-cian);
}

.status-reorder {
    background: rgba(242, 255, 0, 0.1);
    color: #f2ff00;
}

.status-critical {
    background: rgba(255, 0, 76, 0.1);
    color: #ff004c;
}


/* ── Generic grid + glass card utilities ────────────────── */
.insumos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.glass-effect {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
    border-radius: 16px;
}


/* ── Market selector pills ──────────────────────────────── */
.market-selector-pro {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: rgba(15, 23, 42, 0.6);
    padding: 4px 12px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.pro-label {
    font-size: 0.65rem;
    font-weight: 800;
    color: var(--text-dim);
    letter-spacing: 1px;
}

.market-pill-group {
    display: flex;
    gap: 4px;
}

.market-pill-btn {
    background: transparent;
    border: none;
    color: var(--text-dim);
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.75rem;
    font-weight: 700;
    transition: all 0.2s;
}

.market-pill-btn.active {
    background: var(--accent-cian);
    color: #000;
}


/* ── Language toggle button ─────────────────────────────── */
.lang-toggle-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, rgba(0,242,255,0.2), rgba(139,92,246,0.2)) !important;
    border-color: rgba(0,242,255,0.65) !important;
    box-shadow: 0 0 16px rgba(0,242,255,0.25) !important;
    transform: translateY(-1px);
}
.lang-toggle-btn:active:not(:disabled) {
    transform: translateY(0px);
}
#btn-lang-fab:hover:not(:disabled) {
    box-shadow: 0 6px 28px rgba(0,242,255,0.35), 0 2px 10px rgba(0,0,0,0.7) !important;
}


/* ── Global Drag-and-Drop file zones ────────────────────── */
.drop-zone-wrapper {
    position: relative;
    transition: all 0.2s ease;
}
.drop-zone-wrapper.drag-over {
    outline: 2px dashed var(--accent-cian, #00f2ff);
    outline-offset: 2px;
    background: rgba(0, 242, 255, 0.06) !important;
    border-radius: 8px;
}
.drop-zone-wrapper.drag-over::after {
    content: '📂 Soltar archivo aquí';
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 10, 20, 0.75);
    color: var(--accent-cian, #00f2ff);
    font-weight: 700;
    font-size: 0.9rem;
    border-radius: 8px;
    z-index: 10;
    pointer-events: none;
}


/* ── Settings tab system ────────────────────────────────── */
.settings-nav {
    display: flex;
    gap: 1rem;
    padding: 0 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    margin-bottom: 1.5rem;
}

.settings-nav-btn {
    background: none;
    border: none;
    color: var(--text-dim);
    padding: 12px 16px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.85rem;
    transition: all 0.2s;
    border-bottom: 2px solid transparent;
    display: flex;
    align-items: center;
    gap: 8px;
}

.settings-nav-btn:hover {
    color: var(--primary-white);
}

.settings-nav-btn.active {
    color: var(--accent-cian);
    border-bottom-color: var(--accent-cian);
}

.settings-pane {
    display: none;
    animation: settingsFadeIn 0.3s ease;
}

.settings-pane.active {
    display: block;
}

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