/**
 * SECMCA Comercio Internacional (v2): formato estándar de SECMCADATOS.
 * La mayor parte del estilo viene del tema (clases lateral-menu, params-box, subjects-wraper,
 * graphic-container, etc.). Aquí solo van los ajustes propios de esta sección.
 */

/* ---------- Página de la sección: sin el banner gris de la plantilla (como SECMCADATOS) ---------- */
.scmc-pagina .hero-bg { display: none !important; }

/* La plantilla sube el recuadro blanco -128px sobre el banner y le pone bordes/relleno a TODO
   ".container" dentro de #box-container. Sin banner, eso tapaba el contenido y encimaba las cajas. */
.scmc-pagina #box-container > .container { margin-top: 0 !important; border: 0 !important; max-width: 1140px !important; padding: 0 15px !important; margin-left: auto !important; margin-right: auto !important; }
#box-container .scmc .container { margin: 0 auto !important; padding: 0 15px !important; border: 0 !important; background: none !important; max-width: 100% !important; z-index: auto !important; }
#box-container .scmc .container .row { margin-bottom: 0; }
.scmc-pagina .scmc { padding-top: 40px; }

/* ---------- Página de inicio (tarjetas como /secmcadatos) ---------- */
.scmc-landing .scmc-landing-title { font-size: 20px; font-weight: 900; color: #004e9c; margin: 0 0 6px; }
.scmc-landing .scmc-landing-sub { font-size: 14px; line-height: 1.43; color: #061e3d; margin: 0; }
.scmc-landing .subjects-wraper ul li a { display: inline-block; }
/* Tarjetas de un tercio de ancho (si una fila queda con una sola tarjeta, no se estira) */
@media (min-width: 992px) { .scmc-landing .col-box { flex: 0 0 33.333%; max-width: 33.333%; min-width: 0; } }

/* ---------- Consulta: menú lateral ---------- */
.scmc .lateral-menu .body-lateral-menu h3 { margin-bottom: 9px; }
.scmc .lateral-menu .body-lateral-menu h3.active { color: #061e3d; font-weight: 900; text-decoration: underline; text-decoration-color: #2451a4; }
.scmc .lateral-menu .body-lateral-menu .more { margin-top: 6px; }
.scmc .lateral-menu .scmc-otras { margin-top: 12px; padding-top: 12px; border-top: 1px solid #e8ebf2; }
.scmc .lateral-menu .scmc-otras a { font-size: 14px; color: #004e9c; }

/* ---------- Consulta: parámetros ---------- */
.scmc #main-pills-tab .nav-link { cursor: default; }
.scmc .params-box .scmc-buscar { padding: 12px 25px 0; }
.scmc .params-box .scmc-buscar input { font-size: 14px; }
.scmc .params-box .box-content .custom-control[hidden] { display: none !important; }
.scmc .scmc-chips { padding-top: 0; }
.scmc .scmc-chips .options a { color: #686868; font-weight: 700; text-decoration: none; }
.scmc .scmc-chips-nota { font-size: 13px; color: #686868; margin: 0; }
.scmc .scmc-rango-titulo { font-size: 18px; font-weight: 900; color: #004e9c; }
.scmc .scmc-freq { text-align: center; }
.scmc .scmc-freq .d-flex { justify-content: center; }
.tab-content .parameters .params-box .scmc-freq .custom-control { display: inline-flex; padding: 0 0 0 1.5rem !important; margin-right: 1.25rem; background: none !important; text-transform: none; }
.scmc .scmc-rango-msg { color: #686868; }
.scmc .scmc-rango-error { color: red; }
.scmc .send-params .scmc-nota { margin: 10px 0 0; font-size: 14px; text-align: center; }
.scmc .scmc-nota.is-warn { color: #7a5200; }
.scmc .scmc-nota.is-error { color: #c0392b; }
.scmc .scmc-loading { color: #686868; font-style: italic; margin: 0; padding: 8px 0; }
.scmc .scmc-msg { padding: 14px 16px; border-radius: 4px; background: #f6f8fb; border: 1px solid #e8ebf2; font-size: 14px; }
.scmc .scmc-msg.is-error { background: #fdecea; border-color: #f3b8b3; color: #8c1d18; }

/* ---------- Resultado ---------- */
.scmc .graphic-container .header-graphic .graphic-box .dropdown ul li a { display: block; width: 100%; text-decoration: none; }
.scmc .graphic-container .header-graphic .graphic-box .scmc-json { height: 38px; padding-left: 20px; display: flex; align-items: center; background: #f2f2f2; color: black; font-weight: bold; cursor: pointer; }
.scmc .graphic-container .header-graphic .nav-pills a { text-decoration: none; }
.scmc .scmc-volver { cursor: pointer; }
.scmc .scmc-tabla-tools { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; font-size: 14px; }
.scmc .scmc-tabla-tools a { color: #004e9c; }
.scmc .scmc-tabla-tools input { margin-left: 6px; border: 1px solid #b9c6e0; height: 28px; padding: 0 8px; }

/* Contenedor de la tabla: como SECMCADATOS (desplazable), pero sin dejar 600px vacíos si hay pocas filas */
.scmc .scmc-table-wrapper { position: relative; height: auto !important; max-height: 600px; max-width: 100%; overflow: auto; }
.scmc .scmc-overlay { position: absolute; inset: 0; background: rgba(255,255,255,.7); z-index: 6; display: flex; align-items: flex-start; justify-content: center; padding-top: 60px; }
.scmc .scmc-overlay span { background: #fff; border: 1px solid #e8ebf2; border-radius: 20px; padding: 6px 16px; font-size: 14px; color: #686868; }

/* Tabla: mismo aspecto que la de SECMCADATOS (table table-striped table-results) */
.scmc .scmc-table { font-family: futura, sans-serif; color: #343a40; }
.scmc .scmc-table p { margin: 0; color: #585858; font-family: futura, sans-serif; }
.scmc .scmc-table .scmc-tit { border: 0 !important; }
.scmc .scmc-table .scmc-tit th { border: 0 !important; padding: 0 !important; text-align: left !important; background: #fff; }
.scmc .scmc-table .scmc-tit p { font-weight: 700; font-size: 16px; line-height: 28px; }
.scmc .scmc-table .scmc-cols th { font-size: 15px; font-weight: 700; padding: 8px; text-align: center; white-space: nowrap; background: #fff; }
.scmc .scmc-table .scmc-cols th.c2 { text-align: left; }
.scmc .scmc-table .scmc-cols th.sub { font-size: 13px; font-weight: 600; }
.scmc .scmc-table td { font-size: 14px; padding: 8px; }
.scmc .scmc-table td.num { padding: 8px 14px; white-space: nowrap; }
.scmc .scmc-table td.num p { font-size: 15px; }
.scmc .scmc-table td.c1 { white-space: nowrap; color: #585858; }
.scmc .scmc-table td.c2 { min-width: 220px; max-width: 380px; }
.scmc .scmc-table td.c2 p { overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.scmc .scmc-table tr.is-parent td { font-weight: 700; }
.scmc .scmc-table tr.is-parent td p { font-weight: 700; }
.scmc .scmc-table tr.is-child td.child p { padding-left: 18px; }
.scmc .scmc-table tr.is-child td.child-code { padding-left: 30px; }
.scmc .scmc-table tr[hidden] { display: none !important; }
.scmc .scmc-table .scmc-total td, .scmc .scmc-table .scmc-total td p { font-weight: 700; color: #061e3d; }
.scmc .scmc-tog { width: 15px; height: 15px; padding: 0; margin-right: 8px; border: 1px solid #b8b0b0; background: #fff; color: #0050a4; font-weight: 900; font-size: 12px; line-height: 12px; cursor: pointer; vertical-align: middle; }

/* Paginación */
.scmc .scmc-pag { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 14px; font-size: 14px; }
.scmc .scmc-pag-info { color: #686868; margin: 10px 0 0; font-size: 14px; }
.scmc .scmc-pag .scmc-pag-info { margin: 0; }
.scmc .scmc-pag-btns { display: flex; gap: 4px; flex-wrap: wrap; }
.scmc .scmc-pag-btns button { min-width: 34px; height: 32px; padding: 0 10px; border: 1px solid #b9c6e0; background: #fff; color: #004e9c; border-radius: 2px; cursor: pointer; }
.scmc .scmc-pag-btns button.is-on { background: #004e9c; border-color: #004e9c; color: #fff; }
.scmc .scmc-pag-btns button:disabled { opacity: .45; cursor: default; }
.scmc .scmc-pag-btns .gap { padding: 0 4px; align-self: center; color: #686868; }

/* Gráfico */
.scmc .scmc-chart-wrap { position: relative; height: 380px; margin-bottom: 20px; }
.scmc .scmc-btn-grafico { display: inline-flex; align-items: center; justify-content: space-around; gap: 8px; width: 184px; background: #f7b903 !important; border-color: #f7b903 !important; }

/* ---------- Protección contra estilos del tema ----------
   El tema pone display:block en thead/tbody y bordes/anchos en th/td, lo que desalinea las columnas. */
.scmc .scmc-table { display: table !important; table-layout: auto !important; width: 100% !important; min-width: 0 !important; max-width: none !important; border-collapse: collapse !important; margin: 0 !important; }
.scmc .scmc-table thead { display: table-header-group !important; width: auto !important; }
.scmc .scmc-table tbody { display: table-row-group !important; width: auto !important; }
.scmc .scmc-table tfoot { display: table-footer-group !important; width: auto !important; }
.scmc .scmc-table tr { display: table-row !important; width: auto !important; }
.scmc .scmc-table th, .scmc .scmc-table td { display: table-cell !important; width: auto !important; float: none !important; vertical-align: middle !important; border-top: 1px solid #dee2e6; border-bottom: 1px solid #dee2e6; }
.scmc .scmc-table tfoot td { border-top: 2px solid #004e9c !important; }
