/*
 * public-standalone.css
 * CSS estático para las vistas públicas standalone (no usan _Layout):
 *   - Error/TooManyRequests.cshtml
 *   - VerificarCredencial/CredencialNoEncontrada.cshtml
 *   - VerificarCredencial/ResultadoCredencial.cshtml
 *   - Verificar/Index.cshtml
 *   - Verificar/ResultadoVerificacion.cshtml
 *
 * Reemplaza Tailwind Play CDN para eliminar toda dependencia externa
 * (sin CDN, sin Google Fonts). Las reglas replican exactamente las clases
 * Tailwind v3 usadas en el markup de esas vistas, con los valores oficiales
 * de la paleta. No modificar el HTML de las vistas: los nombres de clase
 * deben coincidir con los originales.
 *
 * Colores de marca: primary var(--brand-primary), primary-dark var(--brand-primary-dark) (alias accent).
 */

/* ------------------------------------------------------------------ */
/* Mini-preflight (subset del preflight de Tailwind v3)               */
/* ------------------------------------------------------------------ */
*,
::before,
::after {
    box-sizing: border-box;
    border-width: 0;
    border-style: solid;
    border-color: #e5e7eb; /* gray-200: color de borde por defecto */
}

html {
    line-height: 1.5;
    -webkit-text-size-adjust: 100%;
    -moz-tab-size: 4;
    tab-size: 4;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

body {
    margin: 0;
    line-height: inherit;
}

h1,
h2 {
    font-size: inherit;
    font-weight: inherit;
    margin: 0;
}

p {
    margin: 0;
}

a {
    color: inherit;
    text-decoration: inherit;
}

strong {
    font-weight: bolder;
}

img,
svg {
    display: block;
    vertical-align: middle;
}

table {
    text-indent: 0;
    border-color: inherit;
    border-collapse: collapse;
}

th,
td {
    padding: 0;
    text-align: left;
}

/* Controles de formulario (subset del preflight de Tailwind v3) */
button,
input,
optgroup,
select,
textarea {
    font-family: inherit;
    font-size: 100%;
    font-weight: inherit;
    line-height: inherit;
    color: inherit;
    margin: 0;
    padding: 0;
}

button,
select {
    text-transform: none;
}

button,
[type='button'],
[type='submit'],
[type='reset'] {
    -webkit-appearance: button;
    background-color: transparent;
    background-image: none;
}

button {
    cursor: pointer;
}

::placeholder {
    opacity: 1;
    color: #9ca3af; /* gray-400 */
}

/* ------------------------------------------------------------------ */
/* Layout / display                                                   */
/* ------------------------------------------------------------------ */
.flex { display: flex; }
.inline-flex { display: inline-flex; }
.grid { display: grid; }
.inline-block { display: inline-block; }
.block { display: block; }

.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }

.flex-1 { flex: 1 1 0%; }
.shrink-0 { flex-shrink: 0; }

.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }

.overflow-hidden { overflow: hidden; }
.overflow-x-auto { overflow-x: auto; }

.min-h-screen { min-height: 100vh; }
.mx-auto { margin-left: auto; margin-right: auto; }

.max-w-md { max-width: 28rem; }
.max-w-3xl { max-width: 48rem; }
.max-w-4xl { max-width: 56rem; }
.min-w-full { min-width: 100%; }

.whitespace-nowrap { white-space: nowrap; }

/* ------------------------------------------------------------------ */
/* Sizing                                                             */
/* ------------------------------------------------------------------ */
.w-8 { width: 2rem; }
.h-8 { height: 2rem; }
.w-20 { width: 5rem; }
.h-20 { height: 5rem; }
.w-24 { width: 6rem; }
.h-24 { height: 6rem; }

/* ------------------------------------------------------------------ */
/* Spacing: padding                                                   */
/* ------------------------------------------------------------------ */
.p-3 { padding: 0.75rem; }
.p-4 { padding: 1rem; }
.p-6 { padding: 1.5rem; }
.p-8 { padding: 2rem; }

.px-2 { padding-left: 0.5rem; padding-right: 0.5rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }
.py-8 { padding-top: 2rem; padding-bottom: 2rem; }

.pr-4 { padding-right: 1rem; }
.pl-2 { padding-left: 0.5rem; }
.pt-6 { padding-top: 1.5rem; }
.pb-4 { padding-bottom: 1rem; }

/* ------------------------------------------------------------------ */
/* Spacing: margin                                                    */
/* ------------------------------------------------------------------ */
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; }
.mr-3 { margin-right: 0.75rem; }

/* ------------------------------------------------------------------ */
/* Spacing: space-between (selector entre hijos)                      */
/* ------------------------------------------------------------------ */
.space-y-4 > :not([hidden]) ~ :not([hidden]) { margin-top: 1rem; }
.space-y-6 > :not([hidden]) ~ :not([hidden]) { margin-top: 1.5rem; }

/* ------------------------------------------------------------------ */
/* Gap                                                                */
/* ------------------------------------------------------------------ */
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }

/* ------------------------------------------------------------------ */
/* Typography                                                         */
/* ------------------------------------------------------------------ */
.font-body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.text-xs { font-size: 0.75rem; line-height: 1rem; }
.text-sm { font-size: 0.875rem; line-height: 1.25rem; }
.text-lg { font-size: 1.125rem; line-height: 1.75rem; }
.text-xl { font-size: 1.25rem; line-height: 1.75rem; }
.text-2xl { font-size: 1.5rem; line-height: 2rem; }
.text-3xl { font-size: 1.875rem; line-height: 2.25rem; }
.text-5xl { font-size: 3rem; line-height: 1; }

.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }

.uppercase { text-transform: uppercase; }
.italic { font-style: italic; }
.tracking-wider { letter-spacing: 0.05em; }

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

/* ------------------------------------------------------------------ */
/* Colores de texto                                                   */
/* ------------------------------------------------------------------ */
.text-white { color: #fff; }
.text-gray-400 { color: #9ca3af; }
.text-gray-500 { color: #6b7280; }
.text-gray-600 { color: #4b5563; }
.text-gray-700 { color: #374151; }
.text-gray-800 { color: #1f2937; }
.text-gray-900 { color: #111827; }
.text-amber-500 { color: #f59e0b; }
.text-yellow-500 { color: #eab308; }
.text-green-600 { color: #16a34a; }
.text-green-700 { color: #15803d; }
.text-red-600 { color: #dc2626; }
.text-red-800 { color: #991b1b; }
.text-accent { color: var(--brand-primary); }

/* ------------------------------------------------------------------ */
/* Colores de fondo                                                   */
/* ------------------------------------------------------------------ */
.bg-white { background-color: #fff; }
.bg-gray-50 { background-color: #f9fafb; }
.bg-gray-100 { background-color: #f3f4f6; }
.bg-gray-200 { background-color: #e5e7eb; }
.bg-red-50 { background-color: var(--brand-primary-soft); }
.bg-red-100 { background-color: #fee2e2; }
.bg-green-500 { background-color: #22c55e; }
.bg-amber-500 { background-color: #f59e0b; }
.bg-\[\#F5F5F4\] { background-color: #F5F5F4; }

/* Colores de marca (accent = primary) */
.bg-accent { background-color: var(--brand-primary); }
.bg-accent-dark { background-color: var(--brand-primary-dark); }

/* ------------------------------------------------------------------ */
/* Bordes                                                             */
/* ------------------------------------------------------------------ */
.rounded-lg { border-radius: 0.5rem; }
.rounded-xl { border-radius: 0.75rem; }
.rounded-full { border-radius: 9999px; }

.border { border-width: 1px; }
.border-b { border-bottom-width: 1px; }
.border-t { border-top-width: 1px; }
.border-l-4 { border-left-width: 4px; }

.border-gray-300 { border-color: #d1d5db; }
.border-red-600 { border-color: #dc2626; }

/* ------------------------------------------------------------------ */
/* Efectos                                                            */
/* ------------------------------------------------------------------ */
.shadow-sm {
    box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
}

.shadow-lg {
    box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

.opacity-50 { opacity: 0.5; }
.opacity-90 { opacity: 0.9; }

.transition-colors {
    transition-property: color, background-color, border-color, text-decoration-color, fill, stroke;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}

.pointer-events-none { pointer-events: none; }

/* ------------------------------------------------------------------ */
/* Variantes de estado                                                */
/* ------------------------------------------------------------------ */
.hover\:bg-accent-dark:hover { background-color: var(--brand-primary-dark); }
.hover\:bg-gray-200:hover { background-color: #e5e7eb; }

.focus\:ring-2:focus {
    --ring-color: rgba(59, 130, 246, 0.5); /* blue-500/50: default ring */
    box-shadow: 0 0 0 2px var(--ring-color);
}
.focus\:ring-red-500:focus { --ring-color: #ef4444; }
.focus\:border-red-500:focus { border-color: #ef4444; }

.last\:border-b-0:last-child { border-bottom-width: 0; }

/* ------------------------------------------------------------------ */
/* Responsive: sm (>= 640px)                                          */
/* ------------------------------------------------------------------ */
@media (min-width: 640px) {
    .sm\:p-6 { padding: 1.5rem; }
    .sm\:text-2xl { font-size: 1.5rem; line-height: 2rem; }
    .sm\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ------------------------------------------------------------------ */
/* Responsive: md (>= 768px)                                          */
/* ------------------------------------------------------------------ */
@media (min-width: 768px) {
    .md\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .md\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .md\:col-span-2 { grid-column: span 2 / span 2; }
}

/* ------------------------------------------------------------------ */
/* Información pública: términos, privacidad y soporte                 */
/* ------------------------------------------------------------------ */
.public-info-body {
    min-height: 100vh;
    margin: 0;
    background: #f3f5f8;
    color: #172033;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.public-info-page {
    min-height: 100vh;
    padding: clamp(1.25rem, 4vw, 3rem) 1rem 1.5rem;
    background:
        radial-gradient(circle at 8% 4%, var(--brand-primary-soft), transparent 27rem),
        radial-gradient(circle at 94% 8%, rgba(51, 65, 85, 0.08), transparent 24rem);
}

.public-info-shell {
    width: min(100%, 56rem);
    margin: 0 auto;
}

.public-info-nav {
    display: flex;
    min-height: 3rem;
    margin-bottom: 1.25rem;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.public-info-back {
    display: inline-flex;
    min-height: 2.75rem;
    padding: 0 0.75rem;
    align-items: center;
    gap: 0.5rem;
    border-radius: 0.75rem;
    color: #475569;
    font-size: 0.875rem;
    font-weight: 700;
    text-decoration: none;
    transition: color 150ms ease, background-color 150ms ease;
}

.public-info-back:hover,
.public-info-back:focus-visible {
    background: #fff;
    color: var(--brand-primary);
    outline: none;
}

.public-info-back:focus-visible,
.public-info-contact-link:focus-visible {
    box-shadow: 0 0 0 3px var(--brand-primary-soft);
}

.public-info-back svg {
    width: 1.2rem;
    height: 1.2rem;
    flex: 0 0 auto;
}

.public-info-logo {
    display: block;
    width: auto;
    max-width: 12rem;
    height: 2.75rem;
    object-fit: contain;
    object-position: right center;
}

.public-info-card {
    overflow: hidden;
    border: 1px solid #dde3eb;
    border-radius: 1.25rem;
    background: #fff;
    box-shadow: 0 1.5rem 4.5rem rgba(15, 23, 42, 0.10);
}

.public-info-header {
    position: relative;
    overflow: hidden;
    padding: clamp(1.5rem, 4vw, 2.5rem);
    border-bottom: 1px solid #e2e8f0;
}

.public-info-header-accent {
    position: absolute;
    inset: 0 0 0 auto;
    width: 12rem;
    background: linear-gradient(135deg, transparent, var(--brand-primary-soft));
    opacity: 0.85;
}

.public-info-heading {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.public-info-icon {
    display: grid;
    width: 3rem;
    height: 3rem;
    flex: 0 0 3rem;
    place-items: center;
    border-radius: 0.85rem;
    background: var(--brand-primary-soft);
    color: var(--brand-primary);
}

.public-info-icon svg {
    width: 1.65rem;
    height: 1.65rem;
}

.public-info-eyebrow {
    margin: 0 0 0.35rem;
    color: var(--brand-primary);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.public-info-heading h1 {
    margin: 0;
    color: #0f172a;
    font-size: clamp(1.55rem, 4vw, 2rem);
    font-weight: 800;
    letter-spacing: -0.025em;
    line-height: 1.2;
}

.public-info-subtitle {
    margin: 0.55rem 0 0;
    color: #64748b;
    font-size: 0.925rem;
    line-height: 1.6;
}

.public-info-content {
    padding: clamp(1.5rem, 4vw, 2.5rem);
}

.document-copy {
    overflow-wrap: anywhere;
    color: #334155;
    font-size: 0.975rem;
    line-height: 1.8;
    white-space: pre-wrap;
}

.public-info-empty {
    display: flex;
    padding: 1.15rem 1.25rem;
    align-items: flex-start;
    gap: 0.85rem;
    border: 1px solid #fde68a;
    border-radius: 0.9rem;
    background: #fffbeb;
    color: #78350f;
}

.public-info-empty > svg {
    width: 1.4rem;
    height: 1.4rem;
    flex: 0 0 auto;
    margin-top: 0.05rem;
    color: #b45309;
}

.public-info-empty strong {
    display: block;
    margin-bottom: 0.2rem;
    font-size: 0.9rem;
}

.public-info-empty p {
    margin: 0;
    font-size: 0.875rem;
    line-height: 1.55;
}

.public-info-contact {
    display: flex;
    margin-top: 2rem;
    padding: 1.15rem 1.25rem;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.9rem;
    background: #f8fafc;
}

.public-info-contact-title,
.public-info-contact-copy {
    margin: 0;
}

.public-info-contact-title {
    color: #0f172a;
    font-size: 0.9rem;
    font-weight: 750;
}

.public-info-contact-copy {
    margin-top: 0.25rem;
    color: #64748b;
    font-size: 0.78rem;
    line-height: 1.5;
}

.public-info-contact-link {
    display: inline-flex;
    min-height: 2.65rem;
    padding: 0.65rem 1rem;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    border-radius: 0.65rem;
    background: var(--brand-primary);
    color: #fff;
    font-size: 0.825rem;
    font-weight: 700;
    text-decoration: none;
    transition: filter 150ms ease, transform 150ms ease;
}

.public-info-contact-link:hover {
    filter: brightness(0.92);
    transform: translateY(-1px);
}

.public-info-contact-link svg {
    width: 1.15rem;
    height: 1.15rem;
    flex: 0 0 auto;
}

.public-info-footer {
    margin-top: 1.25rem;
    color: #64748b;
    font-size: 0.75rem;
    text-align: center;
}

@media (max-width: 639px) {
    .public-info-page {
        padding: 1rem 0.75rem 1.25rem;
    }

    .public-info-logo {
        max-width: 9.5rem;
        height: 2.25rem;
    }

    .public-info-heading {
        gap: 0.8rem;
    }

    .public-info-icon {
        width: 2.7rem;
        height: 2.7rem;
        flex-basis: 2.7rem;
    }

    .public-info-contact {
        align-items: stretch;
        flex-direction: column;
    }

    .public-info-contact-link {
        width: 100%;
    }
}
