/* ============================================
   MÓDULO: Impresión
   Archivo: css/modules/impresion.css

   Contiene estilos específicos del módulo Impresión:
   cola de impresión, estaciones, configuración QZ Tray.
   Estilos responsive en: css/responsive/impresion/
   ============================================ */

/* ── Estructura principal ── */
.ipr-page {
    padding: 0;
}

/* ── Breadcrumb ── */
.ipr-breadcrumb {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.ipr-breadcrumb-link {
    color: #6b7280;
    text-decoration: none;
    font-size: 14px;
}

.ipr-breadcrumb-sep {
    color: #d1d5db;
}

.ipr-page-title {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    color: #1e293b;
}

/* ── Loading / estados vacíos ── */
.ipr-loading {
    text-align: center;
    padding: 40px;
    color: #6b7280;
}

.ipr-empty {
    text-align: center;
    padding: 20px;
    color: #6b7280;
}

/* ── Guía paso a paso ── */
.ipr-guide-banner {
    background: #f0f9ff;
    padding: 20px;
    border: 2px solid #0ea5e9;
    margin-bottom: 16px;
}

.ipr-guide-title {
    margin: 0 0 16px 0;
    color: #0369a1;
    font-size: 16px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.ipr-guide-grid {
    display: grid;
    gap: 12px;
}

/* Step card base */
.ipr-step-card {
    background: white;
    padding: 14px 16px;
    border-radius: 8px;
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.ipr-step-card--blue   { border-left: 4px solid #0369a1; }
.ipr-step-card--green  { border-left: 4px solid #10b981; }
.ipr-step-card--amber  { border-left: 4px solid #f59e0b; }
.ipr-step-card--purple { border-left: 4px solid #8b5cf6; }

/* Step number circle */
.ipr-step-num {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    flex-shrink: 0;
    color: white;
}

.ipr-step-num--blue   { background: #0369a1; }
.ipr-step-num--green  { background: #10b981; }
.ipr-step-num--amber  { background: #f59e0b; }
.ipr-step-num--purple { background: #8b5cf6; }

/* Step body */
.ipr-step-body {
    flex: 1;
}

.ipr-step-subtitle {
    font-weight: 700;
    font-size: 13px;
    margin-bottom: 4px;
}

.ipr-step-subtitle--blue   { color: #0369a1; }
.ipr-step-subtitle--green  { color: #10b981; }
.ipr-step-subtitle--amber  { color: #f59e0b; }
.ipr-step-subtitle--purple { color: #8b5cf6; }

.ipr-step-desc {
    margin: 0;
    color: #64748b;
    font-size: 12px;
    line-height: 1.4;
}

.ipr-step-desc--mb {
    margin: 0 0 8px 0;
    color: #64748b;
    font-size: 12px;
    line-height: 1.4;
}

/* Step action links */
.ipr-step-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    color: white;
    text-decoration: none;
    font-weight: 600;
    font-size: 11px;
    border-radius: 4px;
}

.ipr-step-link--blue  { background: #0369a1; }
.ipr-step-link--green { background: var(--btn-aceptar, #10b981); }

/* Certificate note box */
.ipr-cert-note {
    margin-top: 8px;
    padding: 10px;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 4px;
    font-size: 11px;
    color: #166534;
}

.ipr-cert-note code {
    background: #dcfce7;
    padding: 1px 4px;
}

/* Guide footer with QZ status */
.ipr-guide-footer {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid #bae6fd;
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.ipr-qz-box {
    text-align: center;
    padding: 8px 14px;
    background: white;
    border-radius: 6px;
    border: 1px solid #bae6fd;
}

.ipr-qz-label {
    font-size: 10px;
    color: #64748b;
    margin-bottom: 4px;
}

.ipr-qz-status-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

/* QZ status dots */
.ipr-qz-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.ipr-qz-dot--lg {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.ipr-qz-dot--ok  { background: #10b981; }
.ipr-qz-dot--err { background: #ef4444; }

.ipr-qz-text {
    font-weight: 700;
    font-size: 11px;
}

.ipr-qz-text--lg  { font-size: 12px; font-weight: 700; }
.ipr-qz-text--ok  { color: #10b981; }
.ipr-qz-text--err { color: #ef4444; }

.ipr-btn-verify {
    margin-top: 4px;
    padding: 3px 8px;
    background: #e2e8f0;
    border: none;
    cursor: pointer;
    font-size: 10px;
    border-radius: 3px;
}

/* ── Sección genérica ── */
.ipr-section {
    background: white;
    padding: 18px;
    border: 1px solid #d1d5db;
}

.ipr-section--mt {
    margin-top: 16px;
}

.ipr-section-header {
    border-bottom: 2px solid #e5e7eb;
    padding-bottom: 10px;
    margin-bottom: 16px;
}

.ipr-section-header--flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ipr-section-title {
    margin: 0;
    color: #0a2463;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.ipr-section-subtitle {
    margin: 6px 0 0 0;
    color: #6b7280;
    font-size: 13px;
}

/* ── Botones de acción de sección ── */
.ipr-btn-action {
    padding: 8px 16px;
    background: #0d2e7a;
    color: white;
    border: 2px solid #0a2463;
    cursor: pointer;
    font-weight: 700;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ── Contador de cola ── */
.ipr-count-badge {
    padding: 4px 10px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 12px;
}

.ipr-count-badge--pending { background: #fef3c7; color: #92400e; }
.ipr-count-badge--clear   { background: #dbeafe; color: #1e40af; }

/* ── Info box de cola ── */
.ipr-queue-info {
    margin-top: 12px;
    padding: 12px;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 6px;
}

.ipr-queue-info-text {
    font-size: 12px;
    color: #166534;
}

.ipr-queue-info-steps {
    display: block;
    margin-top: 4px;
    color: #15803d;
}

/* ── Tablas ── */
.ipr-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

.ipr-thead-row--dark {
    background: #e5e7eb;
    border-bottom: 2px solid #9ca3af;
}

.ipr-thead-row--light {
    background: #f3f4f6;
    border-bottom: 1px solid #d1d5db;
}

.ipr-th {
    padding: 10px 12px;
    text-align: left;
    font-size: 11px;
    font-weight: 700;
    color: #0d2e7a;
    text-transform: uppercase;
}

.ipr-th--sm {
    padding: 8px 12px;
    text-align: left;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

.ipr-th--center { text-align: center; }

.ipr-tr {
    border-bottom: 1px solid #e5e7eb;
}

.ipr-td {
    padding: 12px;
    font-size: 13px;
    color: #374151;
}

.ipr-td--sm {
    padding: 10px 12px;
    font-size: 12px;
}

.ipr-td--smx {
    padding: 10px;
    font-size: 12px;
}

.ipr-td--center { text-align: center; }
.ipr-td--muted  { color: #6b7280; }

/* ── Impresoras detectadas ── */
.ipr-printer-badge {
    padding: 4px 12px;
    background: #dbeafe;
    color: #1e40af;
    border: 1px solid #93c5fd;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

.ipr-btn-set-default {
    padding: 4px 10px;
    background: #f3f4f6;
    color: #6b7280;
    border: 1px solid #d1d5db;
    cursor: pointer;
    font-size: 11px;
}

.ipr-btn-upload {
    padding: 6px 12px;
    background: var(--btn-editar, #f59e0b);
    color: white;
    border: none;
    cursor: pointer;
    font-size: 11px;
}

.ipr-btn-test {
    padding: 6px 12px;
    background: var(--btn-imprimir, #0d2e7a);
    color: white;
    border: none;
    cursor: pointer;
    font-size: 11px;
}

.ipr-btn-download {
    padding: 5px 10px;
    background: #2563eb;
    color: white;
    text-decoration: none;
    font-size: 11px;
    margin-right: 4px;
    display: inline-block;
}

.ipr-btn-print {
    padding: 5px 10px;
    background: var(--btn-imprimir, #0d2e7a);
    color: white;
    border: none;
    cursor: pointer;
    font-size: 11px;
    margin-right: 4px;
}

.ipr-btn-delete {
    padding: 5px 10px;
    background: var(--btn-eliminar, #ef4444);
    color: white;
    border: none;
    cursor: pointer;
    font-size: 11px;
}

/* ── Mensajes de estado en detectar impresoras ── */
.ipr-warning-box {
    text-align: center;
    padding: 40px;
    color: #f59e0b;
    background: #fffbeb;
    border: 1px solid #fbbf24;
}

.ipr-error-box {
    text-align: center;
    padding: 40px;
    color: #ef4444;
    background: #fef2f2;
    border: 1px solid #fecaca;
}

/* ── Tarjeta de estado de estación ── */
.ipr-station-state {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    border-radius: 8px;
}

.ipr-station-state--active    { background: #f0fdf4; border: 1px solid #bbf7d0; }
.ipr-station-state--available { background: #fef3c7; border: 1px solid #fde68a; }
.ipr-station-state--none      { background: #fef2f2; border: 1px solid #fecaca; }

.ipr-station-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.ipr-station-icon i {
    color: white;
    font-size: 24px;
}

.ipr-station-icon--active    { background: #10b981; }
.ipr-station-icon--available { background: #f59e0b; }
.ipr-station-icon--none      { background: #ef4444; }

.ipr-station-state-info { flex: 1; }

.ipr-station-state-title {
    font-weight: 700;
    font-size: 14px;
}

.ipr-station-state-title--active    { color: #166534; }
.ipr-station-state-title--available { color: #92400e; }
.ipr-station-state-title--none      { color: #991b1b; }

.ipr-station-state-desc {
    font-size: 12px;
}

.ipr-station-state-desc--active    { color: #15803d; }
.ipr-station-state-desc--available { color: #a16207; }
.ipr-station-state-desc--none      { color: #b91c1c; }

/* Botones de registro de estación */
.ipr-btn-desregistrar {
    padding: 10px 16px;
    background: var(--btn-eliminar, #ef4444);
    color: white;
    border: none;
    cursor: pointer;
    font-weight: 600;
    font-size: 12px;
    border-radius: 6px;
}

.ipr-btn-registrar {
    padding: 10px 16px;
    background: var(--btn-aceptar, #10b981);
    color: white;
    border: none;
    cursor: pointer;
    font-weight: 600;
    font-size: 12px;
    border-radius: 6px;
}

/* ── Lista de estaciones registradas ── */
.ipr-stations-grid {
    display: grid;
    gap: 12px;
}

.ipr-station-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
}

.ipr-station-avatar {
    width: 40px;
    height: 40px;
    background: #0d2e7a;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.ipr-station-avatar i {
    color: white;
    font-size: 18px;
}

.ipr-station-info { flex: 1; }

.ipr-station-name {
    font-weight: 700;
    color: #1e293b;
    font-size: 13px;
}

.ipr-station-detail {
    font-size: 11px;
    color: #64748b;
}

.ipr-station-time {
    font-size: 10px;
    color: #94a3b8;
}

.ipr-station-online {
    text-align: center;
}

.ipr-station-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    background: #10b981;
    border-radius: 50%;
}

.ipr-station-dot-label {
    font-size: 10px;
    color: #10b981;
    font-weight: 600;
}

/* ── Barra de acciones derecha en cabecera de sección ── */
.ipr-header-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

/* ── Cola de impresión — ID de trabajo ── */
.ipr-queue-id {
    text-align: center;
    font-size: 12px;
    font-weight: 700;
    color: #0d2e7a;
}

/* ============================================
   CLASES EXTRAÍDAS DE ESTILOS INLINE
   Refactoring: eliminar style="" del JS
   ============================================ */

/* Contenedor de lista con altura mínima */
.ipr-list-container {
    min-height: 60px;
}

.ipr-list-container--lg {
    min-height: 100px;
}

/* Íconos de título de sección */
.ipr-section-title i {
    margin-right: 8px;
}

/* Ícono grande en estados de carga/vacío */
.ipr-icon--lg {
    font-size: 24px;
    margin-bottom: 10px;
    display: block;
}

.ipr-icon--lg-fade {
    font-size: 24px;
    margin-bottom: 10px;
    display: block;
    opacity: 0.5;
}

/* Ícono inline pequeño (info, etc.) */
.ipr-icon--inline {
    margin-right: 6px;
}

/* Variante de ipr-empty con texto en cursiva */
.ipr-empty--italic {
    font-style: italic;
}

/* Modificadores de padding para caja de error */
.ipr-error-box--p20 { padding: 20px; }
.ipr-error-box--p16 { padding: 16px; }

/* Estado de carga compacto (texto + spinner inline) */
.ipr-status-loading {
    color: #64748b;
    font-size: 12px;
}

/* Spinner grande dentro de ipr-loading */
.ipr-loading i {
    font-size: 24px;
}

/* Colores de íconos por semántica */
.ipr-icon--navy   { color: #0d2e7a; }
.ipr-icon--amber  { color: #f59e0b; }
.ipr-icon--green  { color: #10b981; }

/* Márgenes de íconos inline */
.ipr-icon--mr10 { margin-right: 10px; }
.ipr-icon--mr8  { margin-right: 8px; }
.ipr-icon--mr6  { margin-right: 6px; }

/* Ancho fijo para columna ID en tabla de cola */
.ipr-th--id { width: 50px; }

/* Span de mensaje de error pequeño */
.ipr-error-text {
    font-size: 12px;
    color: #6b7280;
}
