/* --- NACC CALCULATOR - V7.1 (760px + Box Bianco) --- */

/* 1. BLOCCO SCROLLBAR */
html { overflow-y: scroll !important; }

/* 2. CONTENITORE PRINCIPALE */
#nacc_container.NACC-Instance {
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
    background: transparent !important;
    padding: 0 !important;
    font-family: 'Poppins', sans-serif;
    color: #ffffff;
    text-align: center;
}

/* ⭐ MEDAGLIE LARGHE (960px) */
#nacc_container .NACC-Keytags {
    max-width: 960px;
    margin-left: auto;
    margin-right: auto;
}

/* ⭐ RISULTATI E BOX CONDIVIDI (restano 500px) */
#nacc_container .NACC-Results,
#nacc_container .nacc-bridge-cta {
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

/* 3. GRIGLIA SELEZIONI */
.NACC-Controls {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

#nacc_container select {
    flex: 1;
    min-width: 80px;
    padding: 12px 35px 12px 15px !important; 
    background-color: #ffffff !important;
    color: #085C84 !important;
    font-weight: 400 !important; 
    border: none;
    border-radius: 5px !important;
    font-size: 1rem;
    cursor: pointer;
    appearance: auto !important; 
    -webkit-appearance: menulist !important;
}

#nacc_container select:focus {
    outline: none !important;
    box-shadow: none !important;
}

/* 4. PULSANTI */
#nacc_container .NACC-Calculate-Button {
    width: 100%; 
    margin-top: 15px;
    padding: 15px 20px;
    background-color: #ffffff !important;
    color: #085C84 !important;
    border: none !important;
    border-radius: 5px !important;
    font-weight: 600 !important; 
    font-size: 1.2rem;
    text-transform: none !important;
    cursor: pointer;
    transition: all 0.3s ease;
}

#nacc_bridge_btn {
    width: auto !important;
    padding: 12px 20px;
    background-color: #ffffff !important;
    color: #085C84 !important;
    border: none !important;
    border-radius: 5px !important;
    font-family: 'Poppins', sans-serif;
    font-weight: 600 !important;
    font-size: 1.2rem;
    text-transform: none !important;
    cursor: pointer;
}

#nacc_container .NACC-Calculate-Button:focus,
#nacc_bridge_btn:focus {
    outline: none !important;
    box-shadow: none !important;
}

#nacc_container .NACC-Calculate-Button:hover,
#nacc_bridge_btn:hover {
    font-family: 'Poppins', sans-serif;
    background-color: #085C84 !important;
    color: #ffffff !important;
}

/* 5. RISULTATI */
#nacc_container .NACC-Results {
    margin: 2.5rem 0 1rem !important;
    animation: justFade 0.5s ease-out;
}

#nacc_container .NACC-Results-Text {
    font-size: 1.6rem;
    font-weight: 700;
    line-height: 1.2;
    display: block;
}

/* ⭐ 6. BOX CONDIVIDI - PIÙ BIANCO, TESTO BLU */
.nacc-bridge-cta {
    background-color: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.95);
    padding: 25px;
    margin-top: 30px;
    border-radius: 10px;
    backdrop-filter: blur(8px);
    animation: justFade 0.8s backwards;
}

.nacc-bridge-cta h4 {
    color: #085C84 !important; 
    margin-bottom: 20px;
    font-weight: 600;
    line-height: 1.4;
    text-transform: none;
    font-size: 1.2rem;
}

.nacc-bridge-cta div[style*="display:flex"] {
    flex-wrap: nowrap !important;
}

#nacc_bridge_name {
    font-family: 'Poppins', sans-serif;
    padding: 12px;
    border-radius: 5px !important;
    border: none;
    background-color: #ffffff !important;
    flex: 2;
    min-width: 100px;
    color: #085C84 !important;
    font-weight: 400 !important;
}

#nacc_bridge_name:-webkit-autofill,
#nacc_bridge_name:-webkit-autofill:hover,
#nacc_bridge_name:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 1000px #ffffff inset !important;
    -webkit-text-fill-color: #085C84 !important;
}

#nacc_bridge_name::placeholder {
    color: rgba(8, 92, 132, 0.7) !important;
    font-weight: 400;
}

#nacc_bridge_name:focus {
    outline: none !important;
    box-shadow: none !important;
}

.nacc-bridge-cta p {
    color: #085C84 !important;
    line-height: 1.5;
    margin: 0;
    font-size: 1.2rem;
    text-align: left;
}

#nacc-chart-wrapper {
    min-height: 0 !important;
}

#nacc-chart-wrapper:empty {
    display: none;
}

/* 7. IL CUORE */
.nacc-heart {
    display: block !important;       
    font-size: 1.6rem !important;
    line-height: 1 !important;
    margin-top: 20px !important;     
    color: #ff0000 !important;       
    filter: drop-shadow(0 0 4px rgba(255,0,0,0.5));
    text-align: center;
}

/* 8. ANIMAZIONE */
@keyframes justFade {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 9. PULIZIA */
#nacc_container .NACC-Header, 
#nacc_container .NACC-Days, 
#nacc_container .NACC-MainBlurb, 
#nacc_container fieldset { display: none !important; }




/* --- NACC HALL OF FAME (V14 - Endless Black) --- */

/* 1. Contenitore Esterno */
.NACC-Keytags {
    display: flex !important;
    justify-content: center !important;
    flex-wrap: wrap !important;
    width: 100%;
    margin: 35px 0 42px 0;
    gap: 12px;
}

/* 2. LOGICA SCALAGGIO DIMENSIONI */

/* 1 sola medaglia: GIGANTE (180px) */
.NACC-Keytags.nacc-grid-xl .NACC-Flip-Box,
.NACC-Keytags.nacc-grid-xl .NACC-Flip-Img {
    width: 180px; height: 180px;
}

/* 2-4 medaglie: GRANDI (150px) */
.NACC-Keytags.nacc-grid-l .NACC-Flip-Box,
.NACC-Keytags.nacc-grid-l .NACC-Flip-Img {
    width: 150px; height: 150px;
}

/* 5-6 medaglie: MEDIE (125px) */
.NACC-Keytags.nacc-grid-m .NACC-Flip-Box,
.NACC-Keytags.nacc-grid-m .NACC-Flip-Img {
    width: 125px; height: 125px;
}

/* 7-8 medaglie: PICCOLE (105px) */
.NACC-Keytags.nacc-grid-s .NACC-Flip-Box,
.NACC-Keytags.nacc-grid-s .NACC-Flip-Img {
    width: 105px; height: 105px;
}

/* 9-12 medaglie: EXTRA PICCOLE (90px) */
.NACC-Keytags.nacc-grid-xs .NACC-Flip-Box,
.NACC-Keytags.nacc-grid-xs .NACC-Flip-Img {
    width: 90px; height: 90px;
}

/* 13+ medaglie (VETERANI): MINUSCOLE (75px) */
.NACC-Keytags.nacc-grid-xxs .NACC-Flip-Box,
.NACC-Keytags.nacc-grid-xxs .NACC-Flip-Img {
    width: 75px; height: 75px;
}

/* 3. Il Box Interattivo */
.NACC-Flip-Box {
    position: relative;
    cursor: pointer;
    background: transparent;
    opacity: 0; 
    animation: naccEnter 0.8s ease-out forwards;
}

/* 4. Il Contenitore Interno */
.NACC-Flip-Inner {
    width: 100%; height: 100%;
    position: relative;
    transition: transform 0.6s ease-out;
}

/* ZOOM: 15% */
.NACC-Flip-Box:hover .NACC-Flip-Inner {
    transform: scale(1.15); 
    z-index: 100;
}

/* 5. Immagini e Gestione Stack */
.NACC-Flip-Front, .NACC-Flip-Back {
    position: absolute; top: 0; left: 0;
    width: 100%; height: 100%;
    display: flex; justify-content: center; align-items: center;
}

.NACC-Flip-Front {
    opacity: 1; z-index: 10;
    transition: opacity 0.5s ease-in-out;
}
.NACC-Flip-Back {
    opacity: 1; z-index: 5;
}

.NACC-Flip-Box:hover .NACC-Flip-Front { opacity: 0; }

.NACC-Flip-Img {
    width: 100%; height: 100%;
    filter: drop-shadow(0 8px 15px rgba(0,0,0,0.4));
}

@keyframes naccEnter {
    from { opacity: 0; transform: scale(0.6); }
    to { opacity: 1; transform: scale(1); }
}

.nacc-heart {
    display: block; width: 100%;
    font-size: 2rem; color: #ff0000;
    margin-top: 10px; animation: naccPulse 1s infinite;
}
@keyframes naccPulse {
    0% { transform: scale(1); } 50% { transform: scale(1.2); } 100% { transform: scale(1); }
}

/* ⭐ GRAFICO ESTERNO (fuori dal container) */
#nacc-external-chart {
    width: 100%;
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 20px;
}

.nacc-chart-external-wrapper {
    width: 100%;
}
