/* Estilos Generales */
.directorio-atletas-container {
    display: block;
    width: 100%;
}

.directorio-atletas-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between; /* Espacio entre las columnas */
}

.atleta-card {
    width: calc(50% - 20px); /* Dos columnas con espacio entre ellas */
    margin: 10px;
    border: 1px solid #ddd;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border-radius: 5px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Estilos para la Ficha del Atleta */
.atleta-ficha {
    border: 2px solid #000;
    border-radius: 10px;
    width: 450px;
    height: 250px;
    font-family: Arial, sans-serif;
    display: flex;
    flex-direction: row;
    padding: 0;
    position: relative;
    margin: 10px auto;
    overflow: hidden;
    background-color: #333;
    color: #fff;
}

.atleta-header {
    width: 40%;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.atleta-profile-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.atleta-name-container {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    padding: 10px;
}

.atleta-name {
    font-size: 1.1em;
    font-weight: bold;
    color: #fff;
    margin: 0;
}

.atleta-body {
    width: 60%;
    padding: 15px;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.event-logo-container {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 220px;
    height: 90px;
}

.event-logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.atleta-datos-container {
    margin-top: 0;
    font-size: 0.95em;
    max-width: calc(100% - 100px);
    margin-bottom: 15px;
}

.atleta-body p {
    font-size: 0.95em;
    margin: 5px 0;
    color: #fff;
    line-height: 1.4;
}

.atleta-qrcode-wrapper {
    position: absolute;
    bottom: 15px;
    right: 15px;
    background: white;
    padding: 5px;
    border-radius: 5px;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.atleta-qrcode-container {
    width: 70px;
    height: 70px;
    background: white;
}

.atleta-qrcode-container img {
    width: 100%;
    height: 100%;
    display: block;
}

/*boton de descarga*/
.download-btn-container{
  text-align: center;
}
.download-ficha-btn{
  background-color: #007cba;
  color: #fff;
  padding: 5px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}
.download-ficha-btn:hover{
  background-color: #005f91;
}

/* Estilos para la Paginación */
.directorio-pagination {
    text-align: center;
    margin-top: 20px;
}

.directorio-pagination .page-numbers {
    display: inline-block;
    padding: 5px 10px;
    margin: 0 5px;
    border: 1px solid #ddd;
    text-decoration: none;
    border-radius: 5px;
}

.directorio-pagination .page-numbers.current {
    background-color: #007cba;
    color: #fff;
    border-color: #007cba;
}

.directorio-pagination .page-numbers:hover {
    background-color: #eee;
}

/* Estilos para el Buscador */
.directorio-search-container {
    margin: 20px auto;
    max-width: 600px;
    padding: 0 15px;
}

.search-form {
    display: flex;
    justify-content: center;
    position: relative;
}

.search-field {
    width: 100%;
    padding: 12px 20px;
    font-size: 16px;
    border: 2px solid #ddd;
    border-radius: 25px;
    outline: none;
    transition: all 0.3s ease;
    background-color: white;
}

.search-field:focus {
    border-color: #007cba;
    box-shadow: 0 0 5px rgba(0,124,186,0.2);
}

.search-field::placeholder {
    color: #666;
    opacity: 0.7;
}

/* Animación de carga durante la búsqueda */
.searching .search-field {
    background-image: url('data:image/svg+xml;charset=utf8,%3Csvg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"%3E%3Cpath d="M12 4V1L8 5l4 4V6c3.31 0 6 2.69 6 6 0 1.01-.25 1.97-.7 2.8l1.46 1.46C19.54 15.03 20 13.57 20 12c0-4.42-3.58-8-8-8zm0 14c-3.31 0-6-2.69-6-6 0-1.01.25-1.97.7-2.8L5.24 7.74C4.46 8.97 4 10.43 4 12c0 4.42 3.58 8 8 8v3l4-4-4-4v3z"/%3E%3C/svg%3E');
    background-position: right 15px center;
    background-repeat: no-repeat;
    background-size: 20px;
    padding-right: 45px;
}

/* Mensaje de búsqueda y no resultados */
.searching-message,
.no-results-message {
    text-align: center;
    padding: 20px;
    margin: 20px 0;
    border-radius: 5px;
}

.searching-message {
    color: #0073aa;
    background-color: #f0f6fc;
    border: 1px solid #c5d9ed;
}

.no-results-message {
    color: #666;
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    font-style: italic;
}

/* Estilos para el Admin*/
.wp-list-table .column-apellido,
.wp-list-table .column-cedula,
.wp-list-table .column-delegacion,
.wp-list-table .column-n_con,
.wp-list-table .column-n_cor{
  width: 100px;
}
.download-section{
  margin-bottom: 10px;
}

/*Alertas*/
.alert{
  padding: 5px;
  margin-bottom: 10px;
  border-radius: 5px;
}
.alert-success{
  background-color: #d4edda;
  color: #155724;
}
.alert-error{
  background-color: #f8d7da;
  color: #721c24;
}

/*Media Queries*/
@media (max-width: 768px) {
    .atleta-card {
        width: calc(100% - 20px);
    }
    
    .atleta-ficha {
        width: 100%;
        max-width: 450px;
        height: auto;
        aspect-ratio: 450/250; /* Mantener la proporción de la ficha */
    }

    .atleta-header {
        width: 40%;
    }

    .atleta-body {
        width: 60%;
        padding: 10px;
        justify-content: flex-end; /* Mantener alineación inferior */
    }

    .event-logo-container {
        width: 140px; /* Reducir proporcionalmente */
        height: 60px;
        top: 5px;
        right: 5px;
    }

    .atleta-datos-container {
        margin-top: 0;
        font-size: 0.85em;
        max-width: calc(100% - 70px); /* Ajustar espacio para QR más pequeño */
        margin-bottom: 10px;
    }

    .atleta-body p {
        font-size: 0.85em;
        margin: 3px 0;
        line-height: 1.3;
    }

    .atleta-name {
        font-size: 0.95em;
    }

    .atleta-qrcode-wrapper {
        width: 60px;
        height: 60px;
        padding: 3px;
        bottom: 10px;
        right: 10px;
    }

    .atleta-qrcode-container {
        width: 54px;
        height: 54px;
    }

    .atleta-name-container {
        padding: 8px;
    }
}

/* Estilos para el Formulario de Registro */
#atleta-registration-form {
    max-width: 600px;
    margin: 2rem auto;
    padding: 2rem;
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

#atleta-registration-form .form-group {
    margin-bottom: 1.5rem;
    position: relative;
}

#atleta-registration-form label {
    display: block;
    margin-bottom: 0.5rem;
    color: #333;
    font-weight: 500;
    font-size: 0.95rem;
}

#atleta-registration-form input {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 2px solid #e1e1e1;
    border-radius: 5px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

#atleta-registration-form input:focus {
    border-color: #007cba;
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.1);
}

#atleta-registration-form button[type="submit"] {
    width: 100%;
    padding: 1rem;
    background: #007cba;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

#atleta-registration-form button[type="submit"]:hover {
    background: #005f91;
}

/* Efectos de validación */
#atleta-registration-form input:invalid {
    border-color: #dc3545;
}

#atleta-registration-form input:valid {
    border-color: #28a745;
}

/* Estilos para mensajes de error y éxito */
#atleta-registration-form-container .alert {
    padding: 1rem;
    margin: 1rem 0;
    border-radius: 5px;
    font-weight: 500;
}

#atleta-registration-form-container .alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

#atleta-registration-form-container .alert-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Responsive */
@media (max-width: 768px) {
    #atleta-registration-form {
        margin: 1rem;
        padding: 1.5rem;
    }
    
    #atleta-registration-form input {
        padding: 0.7rem;
    }
    
    #atleta-registration-form button[type="submit"] {
        padding: 0.8rem;
    }
}

/* Estilos para el campo de foto */
.file-input-container {
    border: 2px dashed #e1e1e1;
    padding: 1rem;
    text-align: center;
    border-radius: 5px;
    margin-top: 0.5rem;
    transition: all 0.3s ease;
}

.file-input-container:hover {
    border-color: #007cba;
    background-color: rgba(0, 124, 186, 0.05);
}

.preview-container {
    margin-top: 1rem;
    max-width: 200px;
    margin-left: auto;
    margin-right: auto;
}

#preview-image {
    max-width: 100%;
    height: auto;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Estilos para campos requeridos */
.required {
    color: #dc3545;
    margin-left: 4px;
}

#atleta-registration-form h2 {
    color: #333;
    margin-bottom: 1rem;
    text-align: center;
}

#atleta-registration-form .form-description {
    color: #666;
    text-align: center;
    margin-bottom: 2rem;
    font-size: 0.95rem;
}

/* Ajustes responsive para la foto */
@media (max-width: 768px) {
    .file-input-container {
        padding: 0.8rem;
    }
    
    .preview-container {
        max-width: 150px;
    }
}

/* Estilos para el formulario de acceso al directorio */
.directorio-access-form-container {
    max-width: 400px;
    margin: 2rem auto;
    padding: 2rem;
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.directorio-access-form h3 {
    color: #333;
    margin-bottom: 1.5rem;
    text-align: center;
    font-size: 1.5rem;
}

.directorio-access-form .form-group {
    margin-bottom: 1.5rem;
}

.directorio-access-form label {
    display: block;
    margin-bottom: 0.5rem;
    color: #333;
    font-weight: 500;
}

.directorio-access-form input[type="password"] {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 2px solid #e1e1e1;
    border-radius: 5px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.directorio-access-form input[type="password"]:focus {
    border-color: #007cba;
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.1);
}

.directorio-access-submit {
    width: 100%;
    padding: 1rem;
    background: #007cba;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.directorio-access-submit:hover {
    background: #005f91;
}

.directorio-error-message {
    background-color: #f8d7da;
    color: #721c24;
    padding: 1rem;
    margin-bottom: 1rem;
    border: 1px solid #f5c6cb;
    border-radius: 5px;
    text-align: center;
}

.directorio-logout-container {
    text-align: right;
    margin-bottom: 1rem;
}

.directorio-logout-btn {
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 5px;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.directorio-logout-btn:hover {
    background: #c82333;
}

@media (max-width: 768px) {
    .directorio-access-form-container {
        margin: 1rem;
        padding: 1.5rem;
    }
}

/* Estilos para la página de verificación */
.verification-page {
    max-width: 800px;
    margin: 20px auto;
    padding: 20px;
    background: white;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
    border-radius: 10px;
    position: relative;
}

.verification-content {
    padding: 20px;
}

.verification-content h1 {
    text-align: center;
    color: #333;
    margin-bottom: 30px;
    font-size: 24px;
}

.atleta-info {
    display: flex;
    gap: 30px;
    margin-bottom: 30px;
}

.atleta-foto {
    flex: 0 0 200px;
}

.atleta-foto img {
    width: 100%;
    height: auto;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.atleta-datos {
    flex: 1;
}

.atleta-datos h2 {
    margin: 0 0 20px 0;
    color: #333;
    font-size: 20px;
}

.datos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.dato-item {
    background: #f8f9fa;
    padding: 10px;
    border-radius: 5px;
}

.dato-item .label {
    display: block;
    font-weight: bold;
    color: #666;
    margin-bottom: 5px;
}

.dato-item .value {
    color: #333;
    font-size: 16px;
}

.verification-footer {
    border-top: 1px solid #eee;
    padding-top: 20px;
    margin-top: 20px;
    text-align: center;
}

.verification-date,
.verification-code {
    color: #666;
    margin: 5px 0;
}

@media (max-width: 768px) {
    .atleta-info {
        flex-direction: column;
    }

    .atleta-foto {
        flex: 0 0 auto;
        max-width: 200px;
        margin: 0 auto;
    }

    .datos-grid {
        grid-template-columns: 1fr;
    }
}

/* Estilos para el Filtro de Estados */
.directorio-filter-container {
    margin: 20px auto;
    max-width: 600px;
    padding: 0 15px;
}

.filter-form {
    display: flex;
    justify-content: center;
}

.estado-select {
    width: 100%;
    padding: 12px 20px;
    font-size: 16px;
    border: 2px solid #ddd;
    border-radius: 25px;
    outline: none;
    transition: all 0.3s ease;
    background-color: white;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url('data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23007CB2%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E');
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 12px;
    padding-right: 45px;
}

.estado-select:focus {
    border-color: #007cba;
    box-shadow: 0 0 5px rgba(0,124,186,0.2);
}

.estado-select:hover {
    border-color: #007cba;
}

/* Responsive */
@media (max-width: 768px) {
    .estado-select {
        padding: 10px 15px;
        font-size: 14px;
    }
}
