/* ==========================================================
   HUÁNUCO REGIÓN — MICROSITIO LEGAL
   Archivo: reset.css
   Ruta: /legales/assets/css/reset.css
   Versión: 1.0
   ========================================================== */

/* ==========================================================
   MODELO DE CAJA
   ========================================================== */

*,
*::before,
*::after {
    box-sizing: border-box;
}

/* ==========================================================
   DOCUMENTO
   ========================================================== */

html {
    min-height: 100%;
    scroll-behavior: smooth;
    text-size-adjust: 100%;
    -webkit-text-size-adjust: 100%;
}

body {
    min-width: 320px;
    min-height: 100vh;
    margin: 0;
    background: var(--tr-background-page);
    color: var(--tr-text-primary);
    font-family: var(--tr-font-family-primary);
    font-size: var(--tr-font-size-base);
    font-weight: var(--tr-font-weight-regular);
    line-height: var(--tr-line-height-relaxed);
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ==========================================================
   SELECCIÓN DE TEXTO
   ========================================================== */

::selection {
    background: var(--tr-selection-background);
    color: var(--tr-selection-color);
}

/* ==========================================================
   MÁRGENES BASE
   ========================================================== */

h1,
h2,
h3,
h4,
h5,
h6,
p,
figure,
blockquote,
dl,
dd {
    margin: 0;
}

ul,
ol {
    margin: 0;
    padding: 0;
}

fieldset {
    margin: 0;
    padding: 0;
    border: 0;
}

/* ==========================================================
   TIPOGRAFÍA
   ========================================================== */

h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--tr-text-primary);
    font-family: var(--tr-font-family-heading);
    font-weight: var(--tr-font-weight-extrabold);
    line-height: var(--tr-line-height-heading);
    text-wrap: balance;
}

p,
li,
dd,
dt,
blockquote {
    overflow-wrap: break-word;
}

strong,
b {
    font-weight: var(--tr-font-weight-bold);
}

small {
    font-size: var(--tr-font-size-sm);
}

abbr[title] {
    text-decoration: underline dotted;
    text-decoration-thickness: 1px;
    text-underline-offset: 0.18em;
    cursor: help;
}

/* ==========================================================
   ENLACES
   ========================================================== */

a {
    color: var(--tr-text-link);
    text-decoration: none;
    text-decoration-thickness: 0.08em;
    text-underline-offset: 0.18em;
}

    a:hover {
        color: var(--tr-text-link-hover);
    }

    a:not([class]):hover {
        text-decoration: underline;
    }

a,
button,
input,
select,
textarea,
summary {
    -webkit-tap-highlight-color: transparent;
}

/* ==========================================================
   LISTAS
   ========================================================== */

ul[role="list"],
ol[role="list"] {
    list-style: none;
}

/* ==========================================================
   MULTIMEDIA
   ========================================================== */

img,
picture,
svg,
video,
canvas {
    display: block;
    max-width: 100%;
}

img,
picture,
video,
canvas {
    height: auto;
}

svg {
    overflow: visible;
}

iframe {
    display: block;
    max-width: 100%;
    border: 0;
}

/* ==========================================================
   FORMULARIOS
   ========================================================== */

button,
input,
optgroup,
select,
textarea {
    margin: 0;
    color: inherit;
    font: inherit;
    line-height: inherit;
}

button,
select {
    text-transform: none;
}

button,
[type="button"],
[type="reset"],
[type="submit"] {
    appearance: button;
    -webkit-appearance: button;
}

button,
[type="button"],
[type="reset"],
[type="submit"],
[role="button"] {
    cursor: pointer;
}

    button:disabled,
    input:disabled,
    select:disabled,
    textarea:disabled {
        cursor: not-allowed;
        opacity: var(--tr-opacity-disabled);
    }

input,
select,
textarea {
    max-width: 100%;
}

textarea {
    resize: vertical;
}

input[type="search"] {
    appearance: textfield;
    -webkit-appearance: textfield;
}

    input[type="search"]::-webkit-search-decoration,
    input[type="search"]::-webkit-search-cancel-button,
    input[type="search"]::-webkit-search-results-button,
    input[type="search"]::-webkit-search-results-decoration {
        appearance: none;
        -webkit-appearance: none;
    }

input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    margin: 0;
}

::-webkit-file-upload-button {
    font: inherit;
    -webkit-appearance: button;
}

/* ==========================================================
   TABLAS
   ========================================================== */

table {
    width: 100%;
    border-collapse: collapse;
    border-spacing: 0;
}

caption {
    text-align: left;
}

th {
    text-align: left;
}

/* ==========================================================
   ELEMENTOS INTERACTIVOS
   ========================================================== */

summary {
    display: list-item;
    cursor: pointer;
}

details > summary:first-of-type {
    list-style-position: inside;
}

dialog {
    padding: 0;
    border: 0;
}

    dialog::backdrop {
        background: rgba(16, 16, 18, var(--tr-opacity-overlay));
    }

/* ==========================================================
   CÓDIGO
   ========================================================== */

code,
kbd,
samp,
pre {
    font-family: var(--tr-font-family-monospace);
    font-size: 0.95em;
}

pre {
    overflow-x: auto;
    white-space: pre;
}

code {
    overflow-wrap: break-word;
}

/* ==========================================================
   SEPARADORES
   ========================================================== */

hr {
    height: 1px;
    margin: 0;
    border: 0;
    background: var(--tr-border-color);
}

/* ==========================================================
   ACCESIBILIDAD Y ENFOQUE
   ========================================================== */

:focus {
    outline: none;
}

:focus-visible {
    outline: var(--tr-focus-outline-width) solid var(--tr-focus-outline-color);
    outline-offset: var(--tr-focus-outline-offset);
}

[hidden] {
    display: none !important;
}

/* Elemento accesible para lectores de pantalla */
.tr-sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* Permite que un elemento oculto sea visible al recibir foco */
.tr-sr-only-focusable:focus,
.tr-sr-only-focusable:focus-visible {
    position: static !important;
    width: auto !important;
    height: auto !important;
    padding: var(--tr-space-3) var(--tr-space-4) !important;
    margin: 0 !important;
    overflow: visible !important;
    clip: auto !important;
    white-space: normal !important;
}

/* ==========================================================
   SCROLLBAR
   ========================================================== */

* {
    scrollbar-width: thin;
    scrollbar-color: var(--tr-color-gray-400) var(--tr-color-gray-100);
}

    *::-webkit-scrollbar {
        width: 11px;
        height: 11px;
    }

    *::-webkit-scrollbar-track {
        background: var(--tr-color-gray-100);
    }

    *::-webkit-scrollbar-thumb {
        border: 3px solid var(--tr-color-gray-100);
        border-radius: var(--tr-radius-full);
        background: var(--tr-color-gray-400);
    }

        *::-webkit-scrollbar-thumb:hover {
            background: var(--tr-color-gray-500);
        }

/* ==========================================================
   MOVIMIENTO REDUCIDO
   ========================================================== */

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ==========================================================
   IMPRESIÓN
   ========================================================== */

@media print {
    html,
    body {
        min-width: 0;
        background: var(--tr-color-white);
        color: var(--tr-color-black);
    }

    a {
        color: inherit;
        text-decoration: none;
    }

    img,
    svg,
    table,
    pre,
    blockquote {
        break-inside: avoid;
    }

    h1,
    h2,
    h3,
    h4,
    h5,
    h6 {
        break-after: avoid;
    }

    p,
    li {
        orphans: 3;
        widows: 3;
    }
}
