/**
 * Stili pubblici per Atletica Italia Directory
 */

/* Stili generali */
/* Importante: Applica questi stili a tutti i form nel sito */
input[type="text"], 
input[type="email"], 
input[type="url"], 
input[type="password"], 
input[type="search"], 
input[type="tel"], 
input[type="number"], 
textarea, 
select {
    background-color: #ffffff !important; /* Forza lo sfondo bianco in tutto il sito */
    height: 40px; /* Altezza uniforme */
    border: 1px solid #ddd !important;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.05) !important;
}

/* Eccezione per textarea che non dovrebbe avere altezza fissa */
textarea {
    height: auto !important;
    min-height: 100px;
}
.ait-container {
    margin: 0 auto;
    max-width: 1200px;
    padding: 20px;
}

.ait-clearfix::after {
    content: "";
    display: table;
    clear: both;
}

/* Messaggi */
.ait-message {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 4px;
}

.ait-success {
    background-color: #dff0d8;
    border: 1px solid #d6e9c6;
    color: #3c763d;
}

.ait-error {
    background-color: #f2dede;
    border: 1px solid #ebccd1;
    color: #a94442;
}

.ait-info {
    background-color: #d9edf7;
    border: 1px solid #bce8f1;
    color: #31708f;
}

.ait-warning {
    background-color: #fcf8e3;
    border: 1px solid #faebcc;
    color: #8a6d3b;
}

/* Bottoni */
.ait-button {
    display: inline-block;
    padding: 8px 16px;
    margin: 0;
    background-color: #0073aa;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    font-size: 18px;
    line-height: 1.5;
    transition: background-color 0.2s;
}

.ait-button:hover {
    background-color: #0085ba;
    color: #fff;
}

.ait-button:active {
    background-color: #006799;
    color: #fff;
}

.ait-button-secondary {
    background-color: #f7f7f7;
    color: #555;
    border: 1px solid #ccc;
}

.ait-button-secondary:hover {
    background-color: #f0f0f0;
    color: #444;
}

.ait-button-danger {
    background-color: #d9534f;
    color: #fff;
}

.ait-button-danger:hover {
    background-color: #c9302c;
}

/* Form */
.ait-form {
    margin-bottom: 20px;
}

.ait-form-section {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.ait-form-group {
    margin-bottom: 15px;
}

.ait-form-row {
    display: flex;
    flex-wrap: wrap;
    margin-right: -10px;
    margin-left: -10px;
}

.ait-form-row .ait-form-group {
    padding-right: 10px;
    padding-left: 10px;
}

.ait-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
}

.ait-input,
.ait-select,
.ait-textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    line-height: 1.5;
}

.ait-input:focus,
.ait-select:focus,
.ait-textarea:focus {
    border-color: #0073aa;
    outline: none;
    box-shadow: 0 0 0 1px #0073aa;
}

.ait-checkboxes {
    display: flex;
    flex-wrap: wrap;
    margin: -5px;
}

.ait-checkboxes label {
    display: flex;
    align-items: center;
    margin: 5px;
    font-weight: normal;
    cursor: pointer;
}

.ait-checkboxes input[type="checkbox"] {
    margin-right: 5px;
}

.ait-form-actions {
    margin-top: 20px;
}

.ait-upload-progress {
    height: 5px;
    background-color: #f5f5f5;
    border-radius: 3px;
    margin-top: 10px;
    overflow: hidden;
}

.ait-progress-bar {
    height: 100%;
    background-color: #0073aa;
    width: 0;
    transition: width 0.2s;
}

.ait-helper-text {
    font-size: 12px;
    color: #666;
    margin-top: 5px;
}

/* Login e registrazione */
.ait-login-container {
    max-width: 500px;
    margin: 0 auto;
    background: #fff;
    padding: 20px;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.ait-login-tabs {
    display: flex;
    margin-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.ait-login-tabs .ait-tab {
    padding: 10px 20px;
    font-weight: 600;
    text-decoration: none;
    color: #555;
    margin-right: 5px;
}

.ait-login-tabs .ait-tab.active {
    border-bottom: 2px solid #0073aa;
    color: #0073aa;
}

.ait-form-links {
    text-align: center;
    margin-top: 15px;
}

.ait-form-links a {
    color: #0073aa;
    text-decoration: none;
}

.ait-form-links a:hover {
    text-decoration: underline;
}



/* Cards */
.ait-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.ait-card {
    display: block;
    text-decoration: none;
    color: inherit;
    background-color: #fff;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    padding:15px;
}

.ait-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.ait-card-friend {
    border-left: 4px solid #4CAF50;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.ait-card-friend:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.25);
}

.ait-friend-badge {
    display: inline-block;
    background-color: #4CAF50;
    color: white;
    font-size: 12px;
    font-weight: bold;
    padding: 3px 8px;
    border-radius: 12px;
    margin-right: 10px;
    vertical-align: middle;
}

.ait-card p{margin-bottom: 0;}

.ait-card-header {
    padding: 15px;
    display: flex;
    align-items: center;
    flex-direction: column;
}

.ait-card-logo {
    margin-right: 15px;
}

.ait-card-title {
    margin: 0;
    font-size: 18px;
}

.ait-card-image img {
    width: 100%;
    height: auto;
    display: block;
}

.ait-card-content {
    padding: 15px;
}

.ait-card-actions {
    padding: 15px;
    background-color: #f9f9f9;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: flex-end;
}

.ait-card-actions .ait-button {
    margin-left: 10px;
}

/* Mappa */
.ait-mappa {
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 20px;
    border: 1px solid #ddd;
}

.ait-popup h3 {
    margin-top: 0;
    margin-bottom: 10px;
}

.ait-popup img {
    margin-bottom: 10px;
    display: block;
}

.ait-popup p {
    margin-bottom: 10px;
}

/* Loading */
.ait-loading {
    text-align: center;
    padding: 40px;
}

.ait-spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid rgba(0, 115, 170, 0.2);
    border-radius: 50%;
    border-top-color: #0073aa;
    animation: ait-spin 1s ease-in-out infinite;
    margin-bottom: 10px;
}

@keyframes ait-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Ricerca */
.ait-ricerca-form {
    background-color: #f9f9f9;
    padding: 20px;
    border-radius: 4px;
    margin-bottom: 20px;
}

.ait-results-info {
    text-align: center;
    padding: 20px;
    background-color: #f9f9f9;
    border-radius: 4px;
    margin-bottom: 20px;
}

.ait-pagination {
    text-align: center;
    margin-top: 20px;
}

/* Responsive */
@media (max-width: 768px) {
    .ait-form-row .ait-form-group {
        flex: 0 0 100%;
        max-width: 100%;
    }
    
    .ait-dashboard-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .ait-dashboard-header .ait-logo {
        margin-top: 15px;
    }
    
    .ait-tabs {
        flex-wrap: wrap;
    }
    
    .ait-tab-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .ait-tab-header button {
        margin-top: 10px;
    }
    
    .ait-cards {
        grid-template-columns: 1fr;
    }
}

/* Protezione contatti */
.ait-protected {
    direction: rtl;
    unicode-bidi: bidi-override;
    user-select: none;
}

/* Ottimizzazione form di ricerca */
.ait-ricerca-form {
    background-color: #f9f9f9;
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
}

.ait-main-filters {
    display: block;
    justify-content: space-between;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.ait-main-filters .ait-form-group {
    flex: 1;
    margin-right: 10px;
    min-width: 150px;
}

.ait-main-filters .ait-form-group:last-child {
    margin-right: 0;
}

.ait-specialita-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.ait-specialita-container {
    flex: 1;
    margin-right: 20px;
}

.ait-form-actions {
    display: flex;
    align-items: flex-end;
    white-space: nowrap;
}

.ait-form-actions button {
    margin-left: 10px;
}

.ait-form-actions button:first-child {
    margin-left: 0;
}

/* Rendere il form più compatto in desktop */
@media (min-width: 768px) {
    .ait-ricerca-form {
        padding: 15px 20px;
    }

    .ait-form-group label {
        margin-bottom: 3px;
        font-size: 14px;
    }

    .ait-input,
    .ait-select {
        padding: 6px 10px;
    }

    .ait-checkboxes {
        display: flex;
        flex-wrap: wrap;
        margin: -3px;
        overflow-y: auto;
    }

    .ait-checkboxes label {
        margin: 3px;
        font-size: 13px;
        padding: 3px 6px;
    }
}

/* Fissa visualizzazione responsive */
@media (max-width: 767px) {
    .ait-main-filters {
        flex-direction: column;
    }

    .ait-main-filters .ait-form-group {
        margin-right: 0;
        margin-bottom: 10px;
        width: 100%;
    }

    .ait-specialita-row {
        flex-direction: column;
    }

    .ait-specialita-container {
        margin-right: 0;
        margin-bottom: 15px;
        width: 100%;
    }

    .ait-form-actions {
        width: 100%;
        justify-content: space-between;
    }
}

.ait-categoria-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
    color: white;
    margin-bottom: 10px;
}

.ait-categoria-badge.ragazzi {
    background-color: #4CAF50;
    /* Verde */
}

.ait-categoria-badge.adulti {
    background-color: #2196F3;
    /* Blu */
}

.ait-categoria-badge.individuali {
    background-color: #9C27B0;
    /* Viola */
}

.ait-categoria-badge.agonismo {
    background-color: #F44336;
    /* Rosso */
}

.ait-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

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

.ait-table th {
    background-color: #f5f5f5;
    font-weight: bold;
}

.ait-table tr.ait-unread {
    background-color: #f0f7ff;
    font-weight: bold;
}

.ait-status-unread {
    color: #0066cc;
    font-weight: bold;
}

.ait-status-read {
    color: #666;
}

.ait-button-small {
    padding: 4px 8px;
    font-size: 12px;
}

/* Stili per il modal */
.ait-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.4);
}
.ait-modal-content {
    background-color: #fefefe;
    margin: 10% auto;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 8px;
    width: 80%;
    max-width: 600px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    position: relative;
}

.ait-modal-close {
    color: #aaa;
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.ait-modal-close:hover {
    color: #333;
}

.ait-messaggio-meta {
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
    color: #666;
}

.ait-messaggio-content {
    line-height: 1.6;
}

/* Aggiungi questo alla sezione <style> esistente o nel file CSS */
.ait-message-counter {
    display: inline-block;
    background-color: #e74c3c;
    color: white;
    border-radius: 50%;
    min-width: 20px;
    height: 20px;
    line-height: 20px;
    text-align: center;
    font-size: 12px;
    font-weight: bold;
    padding: 0 4px;
    margin-left: 5px;
}

.ait-unread {
    font-weight: bold;
    background-color: rgba(231, 76, 60, 0.1);
}

.ait-status-unread {
    color: #e74c3c;
    font-weight: bold;
}

.ait-status-read {
    color: #27ae60;
}

/* Stile per il form di risposta */
.ait-reply-form {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #ddd;
}

.ait-reply-form textarea {
    width: 100%;
    min-height: 120px;
    margin-bottom: 10px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.ait-messaggio-content {
    margin-bottom: 20px;
    padding: 15px;
    background-color: #f9f9f9;
    border-radius: 4px;
    border-left: 4px solid #0073aa;
}

.ait-messaggio-actions {
    margin-top: 10px;
    text-align: right;
}



/* Stili pagina rivendicazione */
.ait-claim-container {
    max-width: 800px;
    margin: 30px auto;
    background-color: #fff;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.ait-claim-header {
    margin-bottom: 25px;
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
}

.ait-claim-description {
    color: #666;
    font-size: 16px;
    line-height: 1.5;
}

/* Stili badge verifica */
.ait-verified-badge {
    display: inline-flex;
    align-items: center;
    background-color: #e6f7ff;
    color: #0073aa;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 14px;
    margin-left: 10px;
    vertical-align: middle;
}

.ait-verified-badge i {
    margin-right: 5px;
    color: #00a0d2;
}

/* Stili messaggi */
.ait-message {
    padding: 20px;
    border-radius: 5px;
    margin: 20px 0;
}

.ait-message h3 {
    margin-top: 0;
}

.ait-success {
    background-color: #f0f9eb;
    border-left: 4px solid #67c23a;
    color: #529b2e;
}

.ait-error {
    background-color: #fef0f0;
    border-left: 4px solid #f56c6c;
    color: #c03639;
}

/* Stili verifica email */
#email-verification-container {
    background-color: #f7f9fb;
    padding: 15px;
    border-radius: 5px;
    margin-top: 20px;
    border: 1px solid #d1e1ff;
}

#verification_code {
    letter-spacing: 4px;
    font-size: 18px;
    text-align: center;
    width: 150px;
}