/* ===== TEMA DE ALTA ACCESIBILIDAD ===== */

/* Fuente base más grande y legible */
html {
    font-size: 16px;
}

body {
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
}

/* Inputs más grandes y fáciles de usar */
.form-control,
.form-select {
    font-size: 1.1rem;
    padding: 0.75rem 1rem;
}

.form-control:focus,
.form-select:focus {
    border-color: #7952b3;
    box-shadow: 0 0 0 0.25rem rgba(121, 82, 179, 0.25);
}

/* Botones con mejor contraste */
.btn {
    font-weight: 500;
    padding: 0.625rem 1.25rem;
}

.btn-lg {
    padding: 0.875rem 1.5rem;
    font-size: 1.1rem;
}

/* Validación de formularios Blazor */
.valid.modified:not([type=checkbox]) {
    outline: 2px solid #7952b3;
}

.invalid {
    outline: 2px solid #dc3545;
}

.validation-message {
    color: #dc3545;
    font-size: 0.95rem;
    font-weight: 500;
}

/* Error boundary */
.blazor-error-boundary {
    background: #dc3545;
    padding: 1rem;
    color: white;
}

.blazor-error-boundary::after {
    content: "Ocurrió un error.";
}

/* Skip link para accesibilidad */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: #7952b3;
    color: white;
    padding: 12px 24px;
    z-index: 1100;
    font-weight: 600;
}

.skip-link:focus {
    top: 0;
}

/* Bottom navigation para móvil */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1030;
    padding-bottom: env(safe-area-inset-bottom);
}

.bottom-nav-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.5rem 1rem;
    color: #6c757d;
    transition: color 0.15s ease-in-out;
}

.bottom-nav-link:hover,
.bottom-nav-link.active {
    color: #7952b3;
}

.bottom-nav-link i {
    margin-bottom: 0.25rem;
}

/* Espacio para bottom nav en móvil */
.has-bottom-nav {
    padding-bottom: 5rem;
}

/* Input de PIN centrado */
.pin-input {
    text-align: center;
    font-size: 2rem;
    letter-spacing: 0.75rem;
    font-family: monospace;
    font-weight: bold;
}

/* Cards con mejor sombra */
.card {
    border-radius: 0.75rem;
}

.card.shadow-sm {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) !important;
}

/* Alertas más visibles */
.alert {
    font-weight: 500;
    border-radius: 0.75rem;
    border-width: 2px;
}

/* Badges más legibles */
.badge {
    font-weight: 600;
    padding: 0.5em 0.75em;
}

/* Inputs numéricos sin spinners (mejor para móvil) */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type="number"] {
    -moz-appearance: textfield;
}

/* Focus visible para accesibilidad */
:focus-visible {
    outline: 3px solid #7952b3;
    outline-offset: 2px;
}

/* Transiciones suaves */
.card,
.btn,
.form-control {
    transition: all 0.15s ease-in-out;
}

/* Loading overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1050;
}

/* ===== PIN KEYPAD ===== */

/* Display de puntos del PIN */
.pin-display {
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 0.5rem;
}

.pin-dot {
    width: 40px;
    height: 40px;
    border: 3px solid #dee2e6;
    border-radius: 50%;
    background: white;
    transition: all 0.15s ease;
}

.pin-dot.filled {
    background: #7952b3;
    border-color: #7952b3;
}

/* Teclado numérico */
.num-keypad .btn {
    border-radius: 0.75rem;
    transition: transform 0.1s ease, box-shadow 0.1s ease;
}

.num-keypad .btn:active {
    transform: scale(0.95);
}

.num-keypad .btn:hover:not(:disabled) {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* Navegación desktop en header */
.btn-success-subtle {
    background: rgba(255, 255, 255, 0.15);
    border: none;
}

.btn-success-subtle:hover {
    background: rgba(255, 255, 255, 0.25);
}

.btn-success-subtle.active {
    background: rgba(255, 255, 255, 0.3);
}

/* Responsive utilities */
@media (max-width: 576px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}