/* ============================================
   ESTILOS DEL FRONTEND - PADRÓN PROFESIONAL
   ============================================ */

.padron-publico {
    margin: 20px 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

/* ============================================
   BUSCADOR
   ============================================ */

.padron-search {
    margin-bottom: 20px;
}

.padron-search-form {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.padron-search-form input[type="text"] {
    padding: 10px 15px;
    border: 2px solid #ddd;
    border-radius: 4px;
    min-width: 250px;
    flex: 1;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.padron-search-form input[type="text"]:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 1px #0073aa;
}

.padron-search-form button {
    padding: 10px 20px;
    background: #0073aa;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: background 0.3s ease;
}

.padron-search-form button:hover {
    background: #005a87;
}

.padron-search-form button:active {
    transform: translateY(1px);
}

.padron-clear-search {
    color: #0073aa;
    text-decoration: none;
    font-size: 14px;
    padding: 5px 10px;
}

.padron-clear-search:hover {
    text-decoration: underline;
}

/* ============================================
   INFO DE BÚSQUEDA
   ============================================ */

.padron-search-info {
    background: #e8f4f8;
    padding: 12px 15px;
    border-radius: 4px;
    margin-bottom: 15px;
    border-left: 4px solid #0073aa;
    font-size: 14px;
}

/* ============================================
   TABLA
   ============================================ */

.padron-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    background: white;
}

.padron-table th,
.padron-table td {
    padding: 12px 15px;
    text-align: left;
    border: 1px solid #ddd;
}

.padron-table th {
    background-color: #0073aa;
    color: white;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 13px;
    letter-spacing: 0.5px;
}

.padron-table tbody tr {
    transition: background-color 0.2s ease;
}

.padron-table tbody tr:nth-child(even) {
    background-color: #f8f9fa;
}

.padron-table tbody tr:hover:not(.tachada) {
    background-color: #e8f4f8;
}

/* Filas tachadas (dadas de baja) */
.padron-table .tachada td {
    text-decoration: line-through;
    color: #999;
    background-color: #fff5f5 !important;
    opacity: 0.7;
}

/* Badge de Baja */
.badge.baja {
    background: #dc3232;
    color: white;
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 11px;
    margin-left: 8px;
    font-weight: bold;
    display: inline-block;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Estados */
.estado-activo {
    color: #46b450;
    font-weight: 600;
}

.estado-baja {
    color: #dc3232;
    font-weight: 600;
}

/* ============================================
   PAGINACIÓN
   ============================================ */

.padron-pagination {
    margin-top: 25px;
    text-align: center;
    padding: 15px 0;
}

.padron-pagination .page-numbers {
    display: inline-block;
    padding: 8px 12px;
    margin: 0 3px;
    border: 1px solid #ddd;
    text-decoration: none;
    border-radius: 4px;
    color: #0073aa;
    font-size: 14px;
    transition: all 0.3s ease;
}

.padron-pagination .page-numbers.current {
    background: #0073aa;
    color: white;
    border-color: #0073aa;
    font-weight: 600;
}

.padron-pagination .page-numbers:hover:not(.current) {
    background: #f8f9fa;
    border-color: #0073aa;
}

.padron-pagination .page-numbers.dots {
    border: none;
    cursor: default;
}

.padron-pagination .page-numbers.dots:hover {
    background: transparent;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media screen and (max-width: 782px) {
    .padron-search-form {
        flex-direction: column;
        align-items: stretch;
    }
    
    .padron-search-form input[type="text"] {
        min-width: 100%;
    }
    
    .padron-search-form button {
        width: 100%;
    }
    
    .padron-table {
        font-size: 13px;
    }
    
    .padron-table th,
    .padron-table td {
        padding: 8px 10px;
    }
    
    /* Hacer tabla scrolleable horizontalmente en móviles */
    .padron-results {
        overflow-x: auto;
    }
}

@media screen and (max-width: 600px) {
    .padron-table {
        font-size: 12px;
    }
    
    .padron-table th,
    .padron-table td {
        padding: 6px 8px;
    }
    
    .badge.baja {
        font-size: 10px;
        padding: 2px 6px;
    }
}

/* ============================================
   MENSAJES VACÍOS
   ============================================ */

.padron-table tbody td[colspan] {
    text-align: center;
    padding: 30px;
    color: #646970;
    font-style: italic;
}

/* ============================================
   ACCESIBILIDAD
   ============================================ */

.padron-search-form input[type="text"]:focus,
.padron-search-form button:focus,
.padron-clear-search:focus {
    outline: 2px solid #0073aa;
    outline-offset: 2px;
}

/* Skip to results link for screen readers */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border-width: 0;
}

/* ============================================
   PRINT STYLES
   ============================================ */

@media print {
    .padron-search,
    .padron-pagination {
        display: none;
    }
    
    .padron-table {
        box-shadow: none;
    }
    
    .padron-table tbody tr:hover {
        background-color: transparent !important;
    }
}
