/*
 * Marconi Club - pagina «Member List Search» (articolo 191): stile della ricerca soci.
 * Spostato dall'articolo il 12/10/2026, contenuto identico. Il template lo carica solo nelle pagine
 * che contengono <div id="mc-members">.
 */

    /* --- CONTENITORE PRINCIPALE --- */
    .mc-container { 
        font-family: 'Segoe UI', Arial, sans-serif; 
        max-width: 700px; 
        margin: 20px auto; 
        color: #000; 
        border: 1px solid #bbb; 
        background: #fff; 
    }

	/* Stile per l'avviso segnalazioni */
	.mc-notice {
		background: #fff9e6;            /* Giallo molto tenue */
		border-left: 5px solid #ffc107; /* Bordo giallo intenso per attirare l'occhio */
		padding: 12px;
		margin: 10px 15px;              /* Margini per allinearsi al contenuto */
		border-radius: 4px;
		font-size: 14px;
		color: #856404;                 /* Testo scuro coordinato */
		font-weight: 500;
		line-height: 1.4;
		text-align: center;
	}
    
    /* --- BARRA FILTRI --- */
    .mc-filter-bar { 
        background: #f4f4f4; 
        padding: 10px 15px 0 15px; 
        border-bottom: 2px solid #ccc; 
        display: flex; 
        flex-direction: column; 
    }

    .mc-filter-top {
        display: flex;
        align-items: center;
        gap: 8px;
        padding-bottom: 10px;
        width: 100%;
        position: relative;
    }

    .mc-filter-bar input, 
    .mc-filter-bar select { 
        padding: 5px 10px; 
        border: 1px solid #aaa; 
        border-radius: 4px; 
        font-size: 14px;
        height: 34px; 
        box-sizing: border-box; 
        color: #000;
        outline: none; 
        transition: all 0.2s ease;
    }

    .input-error {
        border-color: #dc3545 !important;
        box-shadow: 0 0 5px rgba(220, 53, 69, 0.5) !important;
    }

    #fCall { 
		width: 180px; /* Leggermente più largo per ospitare la freccina del datalist */
		text-transform: uppercase; 
	}
	#fMin, #fMax { width: 80px; }
	#fSK { width: 130px; }

    /* --- PULSANTI --- */
    .btn-toggle { 
        display: flex; height: 34px; padding: 0 12px; cursor: pointer; background: #fff; 
        border: 1px solid #aaa; border-radius: 4px; font-weight: bold; align-items: center; gap: 6px;
    }
    .btn-toggle svg { width: 16px; height: 16px; fill: #000; display: block; }

    .btn-reset { 
        width: 34px; height: 34px; background: #fff; border: 1px solid #aaa; border-radius: 4px; 
        cursor: pointer; display: flex; align-items: center; justify-content: center; flex-shrink: 0; 
    }
    .btn-reset svg { width: 16px; height: 16px; fill: #666; }

    #fCount { 
        background: #007bff; 
        color: white; 
        padding: 4px 12px; 
        border-radius: 15px; 
        font-size: 13px; 
        font-weight: bold; 
        white-space: nowrap; 
        margin-left: auto;
        transition: background-color 0.3s ease;
    }

    #fCount.count-error { background: #dc3545 !important; }

    /* --- TABELLA --- */
    .mc-table-wrapper { 
        max-height: 530px; 
        overflow-y: scroll; 
        scrollbar-width: none; 
        -ms-overflow-style: none;
    }
    .mc-table-wrapper::-webkit-scrollbar { display: none; }
    .mc-table { width: 100%; border-collapse: collapse; }
    
    .grid-row {
        display: grid;
        grid-template-columns: 25% 10% 45% 20%; 
        width: 100%;
    }

    .mc-table thead { position: sticky; top: 0; z-index: 100; }
    .mc-table thead th { 
        background: #DCEEF9; padding: 10px 5px; border: 1px solid #bbb; 
        font-weight: bold; color: #000; display: flex; align-items: center;
    }

    .th-call, .th-name { justify-content: flex-start; text-align: left; }
    .th-sk, .th-mc { justify-content: center; text-align: center; }

    .mc-table td { 
        padding: 8px 5px; border: 1px solid #eee; font-size: 13px; 
        color: #000; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
        display: flex; align-items: center;
    }

    .row-sk { background-color: #E8E8E8 !important; }
    .sk-icon { width: 14px; height: 14px; fill: #000; }

    .mobile-header-row { display: none; }

    /* --- RESPONSIVE MOBILE --- */
    @media (max-width: 768px) {
        .mc-filter-bar { position: sticky; top: 0; z-index: 1000; }
        .mc-filter-top { flex-direction: column; align-items: flex-start; }

        .filter-group { 
            display: none; width: 100%; flex-direction: column; align-items: flex-start; gap: 10px; padding-bottom: 10px; 
        }
        .filter-group.active { display: flex; }

        .filter-footer-mobile { display: flex; justify-content: space-between; align-items: center; width: 100%; }

        #fCount { position: absolute; right: 0; top: 4px; margin-left: 0; }
        .filter-group.active #fCount { position: static; }

        .mobile-header-row { 
            display: grid; grid-template-columns: 25% 10% 45% 20%; width: calc(100% + 30px);
            background: #DCEEF9; border-top: 1px solid #bbb; margin: 0 -15px !important;
        }
        .mobile-header-row div { 
            padding: 10px 5px; border-right: 1px solid #bbb; font-weight: bold; font-size: 12px; display: flex; align-items: center;
        }
        .mobile-header-row div:last-child { border-right: none; }
        .mh-call, .mh-name { justify-content: flex-start; }
        .mh-sk, .mh-mc { justify-content: center; }

		.mc-table-wrapper { 
			max-height: 340px !important; /* Forza l'altezza a 340px solo su mobile */
		}

        .mc-table thead { display: none; } 
        .mc-table tr { display: grid; grid-template-columns: 25% 10% 45% 20%; }
        .mc-table td { font-size: 12px; }
    }

    @media (min-width: 769px) {
        .btn-toggle { display: none; }
        .filter-group { display: flex !important; align-items: center; gap: 8px; flex-grow: 1; }
        .filter-footer-mobile { display: flex; align-items: center; gap: 8px; }
        #fCount { position: static !important; margin-left: auto; }
    }
	/* Stili per l'ordinamento */
	/* Regola base per le colonne ordinabili (mantiene il cursore e lo spazio a destra) */
	.sortable { 
		cursor: pointer; 
		user-select: none; 
		position: relative; 
		padding-right: 25px !important; 
	}
	
	/* Solo per le intestazioni della colonna MC# (Desktop e Mobile): aggiunge il bilanciamento a sinistra */
	.th-mc.sortable, .mh-mc.sortable { 
		padding-left: 25px !important; 
	}
	
	/* Solo per le intestazioni della colonna CALL: assicuriamoci che il padding sinistro resti quello standard */
	.th-call.sortable, .mh-call.sortable { 
		padding-left: 5px !important; /* Ripristina l'allineamento originale a sinistra */
	}
	
	.sortable:hover { background-color: #c5e2f5 !important; }
	
	.sort-icon { 
		position: absolute; 
		right: 4px; 
		width: 18px; 
		height: 18px; 
		fill: #666; 
	}

	/* Effetto hover sulla CALL (senza sottolineatura) */
    .call-link {
        color: inherit;
        text-decoration: none;
        transition: color 0.2s ease;
    }

    /* Effetto per PC (hover) e Mobile (active) */
    .call-link:hover, .call-link:active {
        color: #007bff !important;
        text-decoration: none !important;
    }
