/* ══════════════════════════════════════════════════════
   NEXUS — dicom.css
   Panel DICOM inferior — VERSIÓN COMPACTA
   ══════════════════════════════════════════════════════ */

/* 🔥 FORZAR IBM PLEX SANS EN TODO EL PANEL DICOM */
.dicom-panel,
.dicom-panel * {
    font-family: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif !important;
}

/* ── BOTÓN TOGGLE ── */
#dicomPanelToggleBtn {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 150;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #3C96FE;
    border: 2px solid #3C96FE;
    color: #fff;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(60,150,255,0.3);
    transition: background 0.2s ease;
}
#dicomPanelToggleBtn:hover {
    background: #2A7ADE;
    border-color: #2A7ADE;
}
#dicomPanelToggleBtn svg {
    width: 20px;
    height: 20px;
    fill: #fff;
    display: block;
}

/* ── PANEL PRINCIPAL ── */
.dicom-panel {
    position: fixed;
    bottom: 0;
    right: 0;
    left: 0;
    width: 100%;
    max-height: 160px;
    background: rgba(28, 32, 43, 0.97);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    border-top: 1px solid rgba(150,161,178,0.08);
    border-radius: 10px 10px 0 0;
    z-index: 149;
    display: flex;
    flex-direction: column;
    box-shadow: 0 -8px 32px rgba(0,0,0,0.5);
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}
.dicom-panel.open   { transform: translateY(0); }
.dicom-panel.hidden { display: none !important; }

/* ── HEADER ── */
.dicom-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 4px 12px 3px;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    flex-shrink: 0;
    background: rgba(33, 44, 62, 0.85);
    position: relative;
}
.dicom-panel-header::before {
    content: '';
    position: absolute;
    top: 3px;
    left: 50%;
    transform: translateX(-50%);
    width: 28px;
    height: 2px;
    background: rgba(255,255,255,0.06);
    border-radius: 2px;
}
.dicom-panel-close {
    background: none;
    border: none;
    color: rgba(255,255,255,0.3);
    cursor: pointer;
    font-size: 14px;
    padding: 0 4px;
    line-height: 1;
    transition: color 0.2s;
}
.dicom-panel-close:hover { color: #fff; }

.dicom-panel-title {
    font-size: 11px;
    font-weight: 700;
    color: #3C96FE;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 5px;
}
.dicom-panel-title .carbon-icon {
    width: 13px;
    height: 13px;
}

/* ── CUERPO: 3 EJES EN FILA ── */
.dicom-panel-body {
    display: flex;
    flex-direction: row;
    gap: 4px;
    padding: 4px 8px;
    flex: 1;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: thin;
    scrollbar-color: rgba(150,161,178,0.15) transparent;
}
.dicom-panel-body::-webkit-scrollbar { height: 3px; }
.dicom-panel-body::-webkit-scrollbar-thumb {
    background: rgba(150,161,178,0.15);
    border-radius: 2px;
}

/* ── CADA EJE ── */
.dicom-axis-section {
    padding: 3px 8px;
    border-right: 1px solid rgba(255,255,255,0.03);
    min-width: 110px;
    flex: 1;
}
.dicom-axis-section:last-of-type { border-right: none; }

/* ── FILA SUPERIOR: etiqueta + botones ── */
.dicom-axis-toprow {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 2px;
    flex-wrap: nowrap;
}
.dicom-axis-badge {
    font-size: 11px;
    font-weight: 800;
    width: 18px;
    text-align: center;
    flex-shrink: 0;
}
.dicom-axis-name {
    font-size: 10px;
    color: rgba(255,255,255,0.4);
    flex: 1;
    font-weight: 500;
    white-space: nowrap;
}

/* ── BOTONES COMPACTOS ── */
.dicom-axis-btn {
    padding: 2px 7px;
    border-radius: 4px;
    font-size: 9px;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid rgba(255,255,255,0.06);
    background: rgba(255,255,255,0.03);
    color: rgba(255,255,255,0.35);
    transition: all 0.15s;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    height: 20px;
    line-height: 1;
    font-family: 'IBM Plex Sans', sans-serif;
}
.dicom-axis-btn:hover {
    background: rgba(60,150,255,0.08);
    border-color: #3C96FE;
    color: #fff;
}
.dicom-axis-btn.active {
    background: rgba(60,150,255,0.12);
    border-color: #3C96FE;
    color: #3C96FE;
}
.dicom-axis-btn svg {
    width: 8px;
    height: 8px;
    fill: currentColor;
}

/* ── BOTÓN RESET (NUEVO) ── */
.dicom-axis-btn.reset-btn {
    background: rgba(60,150,255,0.06);
    border-color: rgba(60,150,255,0.15);
    color: rgba(60,150,255,0.5);
}
.dicom-axis-btn.reset-btn:hover {
    background: rgba(60,150,255,0.12);
    border-color: #3C96FE;
    color: #3C96FE;
}
.dicom-axis-btn.reset-btn.active {
    background: rgba(60,150,255,0.12);
    border-color: #3C96FE;
    color: #3C96FE;
}

/* ── SLIDER ── */
.dicom-axis-sliderrow {
    display: flex;
    align-items: center;
    gap: 5px;
}
.dicom-axis-sliderrow input[type=range] {
    flex: 1;
    height: 3px;
    accent-color: #3C96FE;
    margin: 2px 0;
}
.dicom-axis-count {
    font-size: 9px;
    color: rgba(255,255,255,0.25);
    white-space: nowrap;
    min-width: 28px;
    text-align: right;
    font-family: 'IBM Plex Mono', monospace;
}

/* ── FOOTER: botones de acción global ── */
.dicom-panel-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    padding: 4px 12px;
    border-top: 1px solid rgba(255,255,255,0.03);
    flex-shrink: 0;
    background: rgba(33, 44, 62, 0.5);
}

/* ── BOTÓN RESET GLOBAL (AZUL - 25% más grande) ── */
.dicom-global-reset {
    padding: 6px 18px;
    border: 1.5px solid rgba(60,150,255,0.35);
    border-radius: 6px;
    background: rgba(60,150,255,0.06);
    color: #3C96FE;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: 'IBM Plex Sans', sans-serif;
    height: 33px;
    letter-spacing: 0.3px;
}
.dicom-global-reset:hover {
    background: rgba(60,150,255,0.12);
    border-color: #3C96FE;
}
.dicom-global-reset svg {
    width: 14px;
    height: 14px;
    fill: currentColor;
}

/* ── BOTÓN LIMPIAR (ROJO - 25% más grande) ── */
.dicom-clear-btn {
    padding: 6px 18px;
    border: 1.5px solid rgba(217,92,92,0.35);
    border-radius: 6px;
    background: rgba(217,92,92,0.06);
    color: #D95C5C;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: 'IBM Plex Sans', sans-serif;
    height: 33px;
    letter-spacing: 0.3px;
}
.dicom-clear-btn:hover {
    background: rgba(217,92,92,0.12);
    border-color: #D95C5C;
}
.dicom-clear-btn svg {
    width: 14px;
    height: 14px;
    fill: currentColor;
}

/* ── RESPONSIVE ── */
@media(max-width:640px) {
    .dicom-panel { max-height: 180px; }
    #dicomPanelToggleBtn { bottom: 16px; right: 16px; width: 40px; height: 40px; }
    .dicom-axis-section { min-width: 75px; padding: 2px 4px; }
    .dicom-axis-btn { font-size: 7px; padding: 1px 4px; height: 16px; }
    .dicom-axis-name { font-size: 8px; }
    .dicom-axis-badge { font-size: 9px; width: 14px; }
    .dicom-axis-count { font-size: 7px; min-width: 22px; }
    .dicom-panel-title { font-size: 9px; }
    .dicom-panel-footer { padding: 3px 8px; gap: 6px; }
    .dicom-clear-btn { 
        font-size: 11px; 
        padding: 4px 12px; 
        height: 28px; 
    }
    .dicom-clear-btn svg {
        width: 12px;
        height: 12px;
    }
    .dicom-global-reset { 
        font-size: 11px; 
        padding: 4px 12px; 
        height: 28px; 
    }
    .dicom-global-reset svg {
        width: 12px;
        height: 12px;
    }
}