/* START CSS CONFIGURATORE BOOTSTRAP 5 */
html {overflow-x:hidden}
body {
    font-family: "Raleway", sans-serif;    
    font-optical-sizing: auto;
    font-weight: 400;
    font-style: normal;
    background: #f4f4f4;
}
#smartwizard {border:none}
.carousel-control-next, .carousel-control-prev {
    width: 20px;
    height: 20px;
    background-color: #B0B0B1;
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.7;
}
.carousel-control-next:hover, .carousel-control-prev:hover {
    opacity: 1;
}
.carousel-control-next-icon, .carousel-control-prev-icon {
    width: 15px;
    height: 15px;
}
#container-grey {background: #f4f4f4;}
.sw .toolbar>.sw-btn {background: #9C9A78;border: 1px solid  #9C9A78;color:#0F161C}
.nav {
    background: #0f161c;
    margin-left:-15px;
    margin-right:-10px;
    margin-top:-1.5rem!important;
    padding-top:1.5rem!important;
    margin-bottom:30px;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.2);
}
.sw-theme-dots>.nav .nav-link.active {
    color: #9c9a78 !important;
    cursor: pointer;
}
.sw-theme-dots>.nav .nav-link.active::after {
    background-color: #9c9a78 !important;
    box-shadow: 0 1px 7px 1px rgba(0, 0, 0, .3);
}
.accordion-button:not(.collapsed) {
    color: #9c9a78;
    background-color: #212529;
    box-shadow: inset 0 calc(-1* var(--bs-accordion-border-width)) 0 var(--bs-accordion-border-color);
}
.accordion-button {
    text-transform: uppercase;
    font-weight:700;
}
.sw-theme-dots>.nav {
    margin-bottom: 40px;
}
.accettazionePrivacy {
    margin-left: 7px;
}
.alert {right: 0px !important;left: -10px;text-align: center;font-weight:700}
#user-notes {height:200px}
#download_button {width:200px}
#country_id::-webkit-scrollbar {
    width: 8px; /* Larghezza della barra */
}

#country_id::-webkit-scrollbar-track {
    background-color: #f1f1f1; /* Colore dello sfondo della barra */
    border-radius: 10px; /* Arrotonda i bordi della track */
}

#country_id::-webkit-scrollbar-thumb {
    background-color: #9C9A78; /* Colore della barra di scorrimento */
    border-radius: 10px; /* Arrotonda i bordi del thumb */
}

#country_id::-webkit-scrollbar-thumb:hover {
    background-color: #555; /* Colore quando si passa sopra con il mouse */
}
.btn-dark, .btn-secondary {font-weight:700;width:100%}
.sw-btn {
    font-weight:700 !important;
    width:100% !important;
    text-transform:uppercase !important;
    width:fit-content !important;
}
.visuali .visualeSingola {
    width: 100%;
    text-align:center;
}
ul.colorsList li div.cerchioEsterno {
    border-radius: 100%;
}
ul.colorsList li div div.cerchioImmagine img {
    width: 50px;
    height: 50px;
    border-radius: 100%;
}
.sw-theme-dots>.nav .nav-link.done {
    color: #ceccad;
    cursor: pointer;
}
.sw-theme-dots>.nav .nav-link.done::after {
    background-color: #ceccad;
}
#preview {height:fit-content}
#rightStage {
    height: 740px;
    overflow-y: auto;
    padding: 15px;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 0 15px rgba(0,0,0,0.05);
}
/* Personalizzazione della barra di scorrimento */
#rightStage::-webkit-scrollbar {
    width: 8px; /* Larghezza della barra */
}

#rightStage::-webkit-scrollbar-track {
    background-color: #f1f1f1; /* Colore dello sfondo della barra */
    border-radius: 10px; /* Arrotonda i bordi della track */
}

#rightStage::-webkit-scrollbar-thumb {
    background-color: #9C9A78; /* Colore della barra di scorrimento */
    border-radius: 10px; /* Arrotonda i bordi del thumb */
}

#rightStage::-webkit-scrollbar-thumb:hover {
    background-color: #555; /* Colore quando si passa sopra con il mouse */
}
.tab-content {min-height: 700px;}
/* Stile per il contenitore principale */
.containerColoreSingolo {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* Cerchio esterno per l'immagine */
.cerchioEsterno {
    width: 80px; /* Regola la dimensione del cerchio */
    height: 80px;
    border-radius: 50%;
    background: #ddd; /* Colore di sfondo se serve */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1px;
}
.cerchioEsterno:hover {background: #0F161C; /* Colore di sfondo se serve */}
/* Cerchio interno che contiene l'immagine */
.cerchioImmagine {
    width: 70px; /* Deve essere leggermente più piccolo del cerchioEsterno */
    height: 70px;
    border-radius: 50%;
    overflow: hidden;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Immagini dentro il cerchio */
.cerchioImmagine img {
    width: 100%;
    height: auto;
    border-radius: 50%;
}

/* Nome del colore sotto l'elemento */
.nomeColore {
    margin-top: 10px;
    font-size: 14px;
    font-weight: bold;
    text-align: center;
}

/* Testo aggiuntivo tipo "Extra Costo" */
.nomeColore small {
    font-size: 12px;
    color: #888;
    text-transform: lowercase;
}

/* Layout responsive: ridurre la dimensione sui dispositivi piccoli */
@media (max-width: 768px) {
    .cerchioEsterno {
        width: 60px;
        height: 60px;
    }

    .cerchioImmagine {
        width: 50px;
        height: 50px;
    }

    .nomeColore {
        font-size: 12px;
    }
}
h3 {text-transform: uppercase;font-weight:500;font-size: 1rem;padding-top:15px}
/* ✅ RESPONSIVE FLEXBOX PER MOBILE */
@media (max-width: 768px) {
    #preview {height:fit-content}
}
/* END CSS BOOTSTRAP 5 CONFIGURATORE */

/* ✅ PROGRESS BAR ALWAYS VISIBLE */
.progress-container { position: sticky; top: 0; background: white; z-index: 10; padding: 10px 0; }

/* ✅ STEP NAVIGATION BOTTONI MIGLIORATI */
.sw-toolbar { position: sticky; bottom: 0; background: white; padding: 10px; border-top: 1px solid #ddd; }

/* ✅ TRANSIZIONI FLUIDE TRA STEP */
.tab-pane {
    opacity: 0;
    transform: translateX(-20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    display: none; /* Fix per garantire compatibilità con SmartWizard */
}
.tab-pane.active { opacity: 1; transform: translateX(0); }
.tab-pane.active.show {
    opacity: 1;
    transform: translateX(0);
    display: block; /* Assicura che il contenuto sia visibile */
}
.visuali .visualeSingola {
    background-color: #fff;
    margin-bottom: 20px;
}
/* ✅ BOTTONI COLORI & SPAZIATURA */
.color-option { cursor: pointer; border: 2px solid transparent; padding: 15px; width: 100px; text-align: center; }
.color-option.active { border: 3px solid black; }

/* Feedback tattile per dispositivi touch */
.touch-active {
    transform: scale(0.97);
    opacity: 0.9;
    transition: transform 0.1s, opacity 0.1s;
}

/* Migliora visualizzazione note e alert */
.noteWindow.alert {
    margin-top: 10px;
    border-radius: 5px;
    padding: 10px 15px;
}

/* Migliora l'aspetto del summary */
#summary {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 350px;
    max-width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    z-index: 1050;
    border-radius: 10px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.2);
}

/* ✅ ACCESSORI SELEZIONABILI */
.accessory-card { cursor: pointer; border: 2px solid #ddd; transition: all 0.2s ease; }
.accessory-card.selected { border: 3px solid black; background-color: #f8f9fa; }

/*NUOVO CSS CONFIGURATORE*/
.tab-content {height:auto !important}
.carousel-inner {padding:0;height:auto !important}
ul.colorsList {height:auto !important}
.navbar-brand img {height:50px;width:auto;}
/* ✅ RESPONSIVE FLEXBOX PER MOBILE */
@media (max-width: 768px) {
    .mobile-flex { flex-direction: column !important; text-align: center; }
}

/* La lista è sempre visibile su desktop */
.nav {
    display: block;
}
/* Mostra il pulsante di toggle su mobile */
#toggle-btn {
    display: none;
}

.bottoni-config-desktop {
        padding-left: 2rem;
}
.visuali .visualeSingola img {
    width: 100% !important;
}
#change-model-mobile {display:none}
#summary-mobile {display:none}
.form-dek-mob {margin-left:-20px}
/* Su mobile, la lista è nascosta di default */
@media (max-width: 768px) {
    .nav {
        display: none;
        margin-top: -25px !important;
        padding-right: 0px;
        border-radius: 0 0 10px 10px;
        box-shadow: 0 10px 15px rgba(0,0,0,0.1);
    }

    /* Mostra il pulsante di toggle su mobile */
    #toggle-btn {
        display: block;
        width: 100%;
        background-color: #0F161C;
        border:none;
        color:#fff;
        padding: 10px;
        font-weight: 600;
        letter-spacing: 1px;
        position: sticky;
        top: 0;
        z-index: 1000;
    }
    
    ol, ul {padding-right: 12px;padding-left: 12px;margin-top:20px}

    .visuali .visualeSingola {
        width: 32%;
        padding: 20px;
    }
    
    .bottoni-config-desktop {
         display:none;
    }
    
    #current_version {margin-top: 0px !important;margin-bottom: 30px;}
    
    #rightStage {
        height: auto;
        max-height: 300px;
        overflow-y: auto;
        padding: 10px;
        margin-bottom: 30px;
    }
    
    #change-model-mobile {display:block;background:#b3ae6a;padding:15px;border-radius:5px;margin-bottom:5px;}
    #summary-mobile {display:block;background:#b0b0b1;padding:15px;border-radius:5px;}
    
    .form-dek-mob {margin-left:0px}
    .alert-info {margin-left:20px}
    .rigaPrivacy {margin-left:0px}

    .containerColoreSingolo {
        margin-bottom: 15px;
    }

    .accordion-button {
        padding: 10px 15px;
        font-size: 14px;
    }

    .accordion-body {
        padding: 10px;
    }

    /* Miglioramento carousel su mobile */
    .carousel-control-next, .carousel-control-prev {
        width: 30px;
        height: 30px;
        background-color: rgba(176, 176, 177, 0.8);
    }

    /* Miglioramento summary su mobile */
    #summary {
        position: fixed;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: 90%;
        max-height: 80vh;
        overflow-y: auto;
        z-index: 1050;
    }

    /* Miglioramento della scheda prodotto visualizzata */
    #leftStage {
        margin-bottom: 20px;
    }
    
    /* Pulsanti più grandi e facili da toccare su mobile */
    .btn {
        padding: 12px 15px;
        font-size: 14px;
    }
    
    /* OVERRIDE REGOLE OBSOLETE DI MEDIAQUERIES.CSS */
    #summary {
        display: none;
        /* Reset del vecchio posizionamento */
        position: fixed !important;
        top: 50% !important;
        left: 50% !important;
        transform: translate(-50%, -50%) !important;
        width: 350px !important;
        max-width: 90% !important;
        height: auto !important;
        max-height: 80vh !important;
        overflow-y: auto !important;
        z-index: 1050 !important;
        padding: 0 !important;
        background: #fff !important;
        opacity: 1 !important;
    }
    
    /* Reset spaziature e posizionamenti obsoleti */
    #previewStepTitle {
        margin-top: 20px !important;
    }
    
    /* Reset bottoni di navigazione */
    .PreviewBack.btn.prev,
    .PreviewNext.btn.next {
        position: static !important;
        left: auto !important;
        right: auto !important;
        margin: 10px !important;
    }
    
    /* Reset per il container dell'immagine */
    #current_version {
        margin-top: 0 !important;
        margin-bottom: 20px !important;
    }
    
    /* Reset visuali */
    .visuali .visualeSingola img {
        width: auto !important;
        max-width: 100% !important;
    }
    
    /* Reset altezze fisse */
    .stageHeight {
        height: auto !important;
        min-height: auto !important;
    }
    
    /* Reset padding e margini */
    #smartwizard {
        padding: 0 !important;
    }
    
    /* Reset stage previews */
    #stage_preview_side_left.stage,
    #stage_preview_side_right.stage {
        width: auto !important;
        max-width: 100% !important;
    }
    
    /* Overlay per il summary */
    .summary-overlay {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background-color: rgba(0,0,0,0.5);
        z-index: 1040;
    }
    
    /* Miglioramenti UI touch */
    .optionsThumb, .btn, .accordion-button {
        -webkit-tap-highlight-color: rgba(0,0,0,0);
    }
    
    /* Animazioni più fluide per dispositivi meno potenti */
    .tab-pane {
        transition: opacity 0.2s ease, transform 0.2s ease;
    }
}

/* Ottimizzazioni specifiche per tablet */
@media (min-width: 768px) and (max-width: 992px) {
    #rightStage {
        height: 500px;
    }
    
    .cerchioEsterno {
        width: 70px;
        height: 70px;
    }
    
    .cerchioImmagine {
        width: 60px;
        height: 60px;
    }
    
    .bottoni-config-desktop {
        padding-left: 1rem;
    }
}

/* Fix per elementi specifici in modalità desktop */
@media (min-width: 992px) {
    .visuali .visualeSingola {
        margin-bottom: 15px;
    }
    
    #stage_preview_side_left,
    #stage_preview_side_right {
        max-width: 85%;
        margin: 0 auto;
    }
}

/* Miglioramenti accessibilità */
.nav-link:focus, .btn:focus, .accordion-button:focus, .optionsThumb:focus {
    outline: 2px solid #9c9a78;
    outline-offset: 2px;
}

/* Miglioramenti stampa */
@media print {
    .nav, #toggle-btn, .toggleSummary, .switchPoppa, .switchPrua, .switchReset {
        display: none !important;
    }
    
    #summary {
        display: block !important;
        position: static !important;
        transform: none !important;
        width: 100% !important;
        max-width: 100% !important;
        box-shadow: none !important;
        border: 1px solid #ddd !important;
    }
}

/* Component Dependencies Styling */
.dependency-placeholder {
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 2px dashed #dee2e6;
    border-radius: 10px;
    margin: 20px 0;
    transition: all 0.3s ease;
}

.dependency-placeholder:hover {
    border-color: #9c9a78;
    background: linear-gradient(135deg, #f8f9fa 0%, #f1f3f5 100%);
}

.dependency-placeholder p {
    margin: 0;
    font-size: 1rem;
    color: #6c757d;
    text-align: center;
}

.dependency-placeholder i {
    color: #9c9a78;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

/* Loading state for dependent components */
.dependency-loading {
    opacity: 0.7;
    pointer-events: none;
}

.dependency-loading .spinner-border {
    width: 2rem;
    height: 2rem;
    border-width: 0.2em;
    color: #9c9a78;
}

/* Enhanced styling for dependent components */
.dependent-component {
    position: relative;
    transition: all 0.3s ease;
}

.dependent-component.disabled {
    opacity: 0.5;
    pointer-events: none;
}

.dependent-component.highlighted {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(156, 154, 120, 0.3);
}