/**
 * Fijate Tools - Guía gráfica de primeros auxilios y urgencias
 * Estilos canónicos adaptados a móvil y escritorio, soporte modo claro/oscuro y print.
 */

:root {
  --font-main: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Outfit', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Colores canónicos claros */
  --bg-app: #f8fafc;
  --bg-card: #ffffff;
  --bg-subtle: #f1f5f9;
  --border-color: #e2e8f0;
  --border-focus: #3b82f6;

  --text-main: #0f172a;
  --text-muted: #475569;
  --text-faint: #64748b;

  --color-danger: #dc2626;
  --color-danger-bg: #fef2f2;
  --color-danger-border: #fecaca;

  --color-warning: #ea580c;
  --color-warning-bg: #fff7ed;
  --color-warning-border: #fed7aa;

  --color-success: #16a34a;
  --color-success-bg: #f0fdf4;
  --color-success-border: #bbf7d0;

  --color-info: #0284c7;
  --color-info-bg: #eff6ff;
  --color-info-border: #bfdbfe;

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;
}

/* Modo oscuro (data-theme="dark" o clase dark) */
[data-theme="dark"],
.dark {
  --bg-app: #0b0f19;
  --bg-card: #151c2c;
  --bg-subtle: #1e293b;
  --border-color: #334155;
  --border-focus: #60a5fa;

  --text-main: #f8fafc;
  --text-muted: #cbd5e1;
  --text-faint: #94a3b8;

  --color-danger: #f87171;
  --color-danger-bg: #450a0a;
  --color-danger-border: #7f1d1d;

  --color-warning: #fb923c;
  --color-warning-bg: #431407;
  --color-warning-border: #7c2d12;

  --color-success: #4ade80;
  --color-success-bg: #052e16;
  --color-success-border: #14532d;

  --color-info: #38bdf8;
  --color-info-bg: #082f49;
  --color-info-border: #0c4a6e;

  --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 8px -1px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 10px 20px -3px rgba(0, 0, 0, 0.6);
}

/* Base */
html {
  scroll-behavior: smooth;
}

*, *::before, *::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font-main);
  background-color: var(--bg-app);
  color: var(--text-main);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* Layout Principal */
.main-wrapper.tool-layout {
  max-width: 1320px;
  margin: 0 auto;
  padding: 16px;
}

.tool-with-sidebar {
  display: flex;
  gap: 24px;
  align-items: flex-start;
}

.tool-main-content {
  flex: 1 1 0%;
  min-width: 0;
}

/* Barra lateral publicitaria */
.tool-ad-sidebar {
  width: 300px;
  flex-shrink: 0;
  display: none;
}

@media (min-width: 1536px) {
  .tool-ad-sidebar {
    display: block;
  }
}

.ad-sticky-box {
  position: sticky;
  top: 80px;
}

/* Botón SOS cabecera */
.btn-top-sos {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #ef4444, #b91c1c);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-full);
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(220, 38, 38, 0.35);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  animation: pulseSos 2.5s infinite;
}

.btn-top-sos:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(220, 38, 38, 0.45);
}

@keyframes pulseSos {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4);
  }
  50% {
    box-shadow: 0 0 0 8px rgba(239, 68, 68, 0);
  }
}

/* Banner de Emergencia / PAS Superior */
.emergency-callout-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background-color: var(--color-danger-bg);
  border: 1px solid var(--color-danger-border);
  border-radius: var(--radius-lg);
  padding: 14px 20px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
}

.emergency-icon-wrap {
  font-size: 28px;
  flex-shrink: 0;
}

.emergency-text {
  flex: 1 1 0%;
  font-size: 14px;
  color: var(--text-main);
}

.emergency-text strong {
  color: var(--color-danger);
  font-size: 15px;
}

.emergency-text p {
  margin: 4px 0 0 0;
  line-height: 1.4;
}

.emergency-tel-link {
  color: #ffffff;
  background-color: #dc2626;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-weight: 800;
  text-decoration: none;
  display: inline-block;
  margin-left: 4px;
}

/* Panel de Triaje Rápido («¿Qué está pasando?») */
.triage-hero-section {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-md);
}

.triage-hero-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.triage-hero-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.triage-hero-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
}

.triage-hero-subtitle {
  color: var(--text-muted);
  font-size: 14px;
}

.triage-question-card {
  background-color: var(--bg-subtle);
  border-radius: var(--radius-md);
  padding: 18px;
  border: 1px solid var(--border-color);
}

.triage-question {
  margin: 0 0 14px 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--text-main);
}

.triage-options-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

@media (min-width: 640px) {
  .triage-options-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.btn-triage-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-align: left;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  min-height: 44px;
  transition: all 0.15s ease;
  width: 100%;
}

.btn-triage-option:hover {
  border-color: var(--border-focus);
  background: var(--bg-subtle);
  transform: translateY(-1px);
}

.btn-triage-danger:hover {
  border-color: var(--color-danger);
  background: var(--color-danger-bg);
}

.btn-triage-warning:hover {
  border-color: var(--color-warning);
  background: var(--color-warning-bg);
}

.btn-triage-option .triage-option-arrow {
  color: var(--text-faint);
  font-size: 16px;
  margin-left: 8px;
}

.triage-footer-actions {
  margin-top: 14px;
}

.btn-text-back {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  padding: 6px 0;
}

.btn-text-back:hover {
  color: var(--text-main);
  text-decoration: underline;
}

/* Veredicto de Triaje */
.triage-verdict-card {
  background-color: var(--bg-card);
  border: 2px solid var(--color-danger);
  border-radius: var(--radius-md);
  padding: 20px;
  text-align: center;
}

.triage-verdict-badge {
  display: inline-block;
  background: var(--color-danger);
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  margin-bottom: 10px;
}

.triage-verdict-title {
  margin: 0 0 8px 0;
  font-size: 18px;
  font-weight: 700;
  color: var(--text-main);
}

.triage-verdict-desc {
  margin: 0 0 16px 0;
  color: var(--text-muted);
  font-size: 14px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.triage-verdict-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

/* Buscador y Filtros */
.search-filter-section {
  margin-bottom: 24px;
}

.search-input-wrapper {
  position: relative;
  margin-bottom: 14px;
}

.search-input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-faint);
  pointer-events: none;
}

.search-protocols-input {
  width: 100%;
  min-height: 44px;
  padding: 10px 14px 10px 42px;
  font-size: 15px;
  font-family: inherit;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background-color: var(--bg-card);
  color: var(--text-main);
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.search-protocols-input:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.category-filter-pills {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 6px;
  -webkit-overflow-scrolling: touch;
}

.category-filter-tab {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.category-filter-tab:hover {
  background: var(--bg-subtle);
  color: var(--text-main);
}

.category-filter-tab.is-active {
  background: #0284c7;
  color: #ffffff;
  border-color: #0284c7;
}

/* Cuadrícula de Selección de Protocolos */
.protocols-selection-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin-bottom: 28px;
}

@media (min-width: 640px) {
  .protocols-selection-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .protocols-selection-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.protocol-selector-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  display: flex;
  flex-direction: column;
  position: relative;
}

.protocol-selector-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-focus);
  box-shadow: var(--shadow-md);
}

.protocol-selector-card.is-selected {
  border-color: #0284c7;
  box-shadow: 0 0 0 2px #0284c7;
  background-color: var(--color-info-bg);
}

.selector-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.selector-icon {
  font-size: 24px;
}

.selector-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
}

.badge-danger {
  background-color: var(--color-danger-bg);
  color: var(--color-danger);
  border: 1px solid var(--color-danger-border);
}

.badge-warning {
  background-color: var(--color-warning-bg);
  color: var(--color-warning);
  border: 1px solid var(--color-warning-border);
}

.badge-info {
  background-color: var(--color-info-bg);
  color: var(--color-info);
  border: 1px solid var(--color-info-border);
}

.selector-title {
  margin: 0 0 6px 0;
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.3;
}

.selector-desc {
  margin: 0 0 12px 0;
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.4;
  flex: 1 1 0%;
}

.selector-footer {
  margin-top: auto;
}

.selector-btn-fake {
  font-size: 13px;
  font-weight: 700;
  color: #0284c7;
}

/* Artículo de Detalle del Protocolo */
#protocol-detail-container,
.protocol-card {
  scroll-margin-top: 85px;
}

.protocol-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-md);
  margin-bottom: 30px;
}

.protocol-header {
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 20px;
  margin-bottom: 24px;
}

.protocol-header-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.protocol-badge {
  font-size: 12px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: var(--radius-full);
}

.protocol-time-critical {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--color-danger);
  font-size: 13px;
  font-weight: 700;
}

.protocol-title {
  margin: 0 0 6px 0;
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 800;
  color: var(--text-main);
}

.protocol-subtitle {
  margin: 0 0 16px 0;
  color: var(--text-muted);
  font-size: 15px;
}

.protocol-quick-rule-box {
  background-color: var(--bg-subtle);
  border-left: 4px solid var(--color-danger);
  padding: 12px 16px;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.quick-rule-label {
  display: block;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--color-danger);
  letter-spacing: 0.5px;
  margin-bottom: 2px;
}

.quick-rule-text {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
}

/* Metrónomo RCP Interactivo */
.metronome-interactive-panel {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.08), rgba(249, 115, 22, 0.08));
  border: 2px solid var(--color-danger);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 28px;
}

.metronome-flex-layout {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

@media (min-width: 640px) {
  .metronome-flex-layout {
    flex-direction: row;
  }
}

.metronome-visual-circle {
  width: 130px;
  height: 130px;
  border-radius: var(--radius-full);
  background: var(--bg-card);
  border: 4px solid var(--color-danger);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(220, 38, 38, 0.2);
  flex-shrink: 0;
  transition: transform 0.08s ease;
}

.metronome-visual-circle.pulsing {
  transform: scale(1.1);
  box-shadow: 0 0 25px rgba(239, 68, 68, 0.6);
  background-color: #fee2e2;
}

.metronome-visual-circle.pause-breaths {
  border-color: #0284c7;
  background-color: #e0f2fe;
}

.metronome-count {
  font-family: var(--font-mono);
  font-size: 38px;
  font-weight: 800;
  color: var(--color-danger);
  line-height: 1;
}

.metronome-unit {
  font-size: 11px;
  color: var(--text-faint);
  font-weight: 600;
  text-transform: uppercase;
}

.metronome-controls-area {
  flex: 1 1 0%;
  width: 100%;
}

.metronome-rate-badge {
  display: inline-block;
  background: var(--color-danger-bg);
  color: var(--color-danger);
  font-weight: 700;
  font-size: 13px;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  margin-bottom: 6px;
}

.metronome-status {
  margin: 0 0 14px 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-main);
}

.text-breaths-alert {
  color: #0284c7;
  font-weight: 800;
}

.metronome-btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}

.btn-action-large {
  min-height: 44px;
  padding: 10px 18px;
  font-size: 15px;
  font-weight: 700;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
}

@media (min-width: 640px) {
  .btn-action-large {
    width: auto;
  }
}

.btn-danger {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: #ffffff;
}

.btn-danger:hover {
  background: linear-gradient(135deg, #dc2626, #b91c1c);
}

.btn-danger.is-active {
  background: #334155;
  color: #ffffff;
}

.btn-secondary {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 10px 14px;
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 44px;
}

.btn-secondary:hover {
  background: var(--bg-subtle);
}

.btn-secondary.is-muted {
  opacity: 0.65;
}

.metronome-cycle-bar {
  background-color: var(--bg-subtle);
  border: 1px solid var(--border-color);
  height: 10px;
  border-radius: var(--radius-full);
  overflow: hidden;
  position: relative;
}

.metronome-cycle-fill {
  background: linear-gradient(90deg, #ef4444, #f97316);
  height: 100%;
  transition: width 0.08s linear;
}

.metronome-cycle-markers {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-faint);
  font-weight: 600;
  margin-top: 4px;
}

/* Selector de variantes por edad (Adulto, Niño, Bebé) */
.age-selector-wrapper {
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-bottom: 28px;
}

.age-selector-label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.age-tab-group {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin-bottom: 14px;
}

.btn-age-tab {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  padding: 10px 8px;
  font-size: 13px;
  font-weight: 700;
  border-radius: var(--radius-md);
  cursor: pointer;
  min-height: 40px;
  text-align: center;
  transition: all 0.15s ease;
}

.btn-age-tab:hover {
  background: var(--bg-subtle);
  color: var(--text-main);
}

.btn-age-tab.is-active {
  background: #0284c7;
  color: #ffffff;
  border-color: #0284c7;
}

.age-variant-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px;
}

.age-data-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

@media (min-width: 640px) {
  .age-data-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.age-data-item {
  display: flex;
  flex-direction: column;
}

.age-data-label {
  font-size: 11px;
  text-transform: uppercase;
  color: var(--text-faint);
  font-weight: 700;
}

.age-data-value {
  font-size: 14px;
  color: var(--text-main);
}

.age-data-note {
  margin: 10px 0 0 0;
  font-size: 13px;
  color: #0284c7;
  font-weight: 600;
}

/* Línea temporal de pasos ilustrados */
.protocol-steps-section {
  margin-bottom: 30px;
}

.steps-heading {
  margin: 0 0 18px 0;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
}

.steps-timeline {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.step-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 18px;
  box-shadow: var(--shadow-sm);
}

.step-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.step-number-pill {
  background: #0284c7;
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  flex-shrink: 0;
}

.step-title {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  color: var(--text-main);
}

.step-illustration-wrapper {
  margin-bottom: 14px;
  overflow: hidden;
  border-radius: var(--radius-md);
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}

.step-illustration-svg {
  width: 100%;
  height: auto;
  display: block;
}

.step-description {
  margin: 0 0 12px 0;
  font-size: 14px;
  color: var(--text-main);
  line-height: 1.6;
}

.step-highlight-callout {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  background: var(--color-info-bg);
  border: 1px solid var(--color-info-border);
  color: #0369a1;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 600;
}

/* Grid Qué SÍ hacer vs Qué NUNCA hacer */
.do-dont-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-bottom: 28px;
}

@media (min-width: 640px) {
  .do-dont-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.do-card {
  background: var(--color-success-bg);
  border: 1px solid var(--color-success-border);
  border-radius: var(--radius-lg);
  padding: 18px;
}

.dont-card {
  background: var(--color-danger-bg);
  border: 1px solid var(--color-danger-border);
  border-radius: var(--radius-lg);
  padding: 18px;
}

.do-header, .dont-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.do-header h4 {
  margin: 0;
  color: var(--color-success);
  font-size: 16px;
  font-weight: 700;
}

.dont-header h4 {
  margin: 0;
  color: var(--color-danger);
  font-size: 16px;
  font-weight: 700;
}

.do-list, .dont-list {
  margin: 0;
  padding-left: 20px;
  font-size: 13px;
  color: var(--text-main);
  line-height: 1.5;
}

.do-list li {
  margin-bottom: 6px;
}

.dont-list li {
  margin-bottom: 6px;
}

/* Pie de tarjeta con SOS */
.protocol-card-footer {
  margin-top: 24px;
}

.footer-sos-banner {
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  text-align: center;
}

@media (min-width: 640px) {
  .footer-sos-banner {
    flex-direction: row;
    text-align: left;
  }
}

.sos-banner-icon {
  font-size: 32px;
  flex-shrink: 0;
}

.sos-banner-text {
  flex: 1 1 0%;
  font-size: 13px;
  color: var(--text-main);
}

.sos-banner-text strong {
  display: block;
  font-size: 14px;
  color: var(--color-danger);
  margin-bottom: 2px;
}

.sos-banner-text p {
  margin: 0;
  color: var(--text-muted);
}

.btn-sos-trigger {
  min-height: 44px;
  padding: 10px 20px;
  font-size: 15px;
  font-weight: 800;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  white-space: nowrap;
}

/* Sección de Impresión y Chuleta de Bolsillo */
.pocket-sheet-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-card);
  border: 1px dashed var(--border-color);
  border-radius: var(--radius-lg);
  padding: 14px 20px;
  margin-bottom: 30px;
}

.pocket-sheet-text {
  font-size: 13px;
  color: var(--text-muted);
}

.pocket-sheet-text strong {
  display: block;
  color: var(--text-main);
  font-size: 14px;
}

/* Modales canónicos fijate */
.fijate-modal-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 99999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.fijate-modal-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

.fijate-modal-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 540px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  transform: translateY(10px);
  transition: transform 0.2s ease;
}

.fijate-modal-overlay.is-open .fijate-modal-card {
  transform: translateY(0);
}

.fijate-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
}

.fijate-modal-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: var(--text-main);
}

.btn-close-modal {
  background: none;
  border: none;
  font-size: 24px;
  color: var(--text-faint);
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
}

.btn-close-modal:hover {
  color: var(--text-main);
}

.fijate-modal-body {
  padding: 20px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-main);
}

.modal-section-h4 {
  margin: 16px 0 6px 0;
  font-size: 15px;
  font-weight: 700;
  color: #0284c7;
}

.modal-section-h4:first-child {
  margin-top: 0;
}

.modal-p {
  margin: 0 0 10px 0;
  color: var(--text-muted);
}

.modal-112-call-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: #ffffff;
  padding: 12px 20px;
  border-radius: var(--radius-md);
  font-size: 18px;
  font-weight: 800;
  text-decoration: none;
  margin-bottom: 16px;
  min-height: 48px;
}

.modal-112-steps-ol {
  margin: 0 0 14px 0;
  padding-left: 20px;
}

.modal-112-steps-ol li {
  margin-bottom: 8px;
}

.fijate-modal-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* Botón general */
.btn-primary {
  background-color: #0284c7;
  color: #ffffff;
  border: none;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 700;
  border-radius: var(--radius-md);
  cursor: pointer;
  min-height: 40px;
}

.btn-primary:hover {
  background-color: #0369a1;
}

/* Estado de búsqueda vacía */
.empty-search-state {
  text-align: center;
  padding: 30px 16px;
  background: var(--bg-card);
  border: 1px dashed var(--border-color);
  border-radius: var(--radius-lg);
  grid-column: 1 / -1;
}

.empty-icon {
  font-size: 32px;
  display: block;
  margin-bottom: 8px;
}

.empty-title {
  margin: 0 0 4px 0;
  font-size: 16px;
  font-weight: 700;
}

.empty-desc {
  margin: 0 0 14px 0;
  font-size: 13px;
  color: var(--text-muted);
}

/* ESTILOS DE IMPRESIÓN (@media print) */
@media print {
  .app-header,
  .fijate-footer,
  .tools-ad-banner-section,
  .tool-ad-sidebar,
  .btn-top-sos,
  .search-filter-section,
  .protocols-selection-grid,
  .pocket-sheet-banner,
  .metronome-interactive-panel,
  .protocol-card-footer,
  .fijate-modal-overlay {
    display: none !important;
  }

  body {
    background: #ffffff !important;
    color: #000000 !important;
    font-size: 11pt;
  }

  .main-wrapper.tool-layout {
    max-width: 100% !important;
    padding: 0 !important;
  }

  .protocol-card {
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
  }

  .step-card {
    page-break-inside: avoid;
    border: 1px solid #ccc !important;
    margin-bottom: 12px;
  }

  .step-illustration-svg {
    max-height: 140px;
  }
}
