/* ==========================================================================
   1. STRUTTURA BASE E LAYOUT DELLA DASHBOARD
   ========================================================================== */
/* 🌍 OTTIMIZZAZIONE MODULI PER LINGUA ARABA (RTL) */


body { 
    font-family: -apple-system, system-ui, sans-serif; 
    background-color: #f0f2f5; 
    margin: 0; 
    /* 0 in alto, 20px a destra, 20px in basso, 20px a sinistra */
    padding: 0 20px 20px 20px; 
}

.dashboard-box { 
    width: 90% !important; 
    max-width: 90% !important;  
    margin: 0 auto; 
    background: white; 
    padding: 30px; 
    border-radius: 12px; 
    box-shadow: 0 4px 15px rgba(0,0,0,0.05); 
}

.header-dash { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    border-bottom: 2px solid #edf2f7; 
    padding-bottom: 15px; 
    margin-bottom: 25px; 
}

h2, h3 { 
    margin: 0; 
    color: #0a2540; 
}

h3 { 
    margin-bottom: 15px; 
    border-bottom: 1px solid #edf2f7; 
    padding-bottom: 5px; 
    margin-top: 25px; 
    color: #4a5568; 
    font-size: 16px; 
    text-transform: uppercase; 
}

/* ==========================================================================
   2. ELEMENTI DEI FORM E INPUT CONTROLLI
   ========================================================================== */
.form-group { 
    margin-bottom: 15px; 
    text-align: left; 
}

.form-row { 
    display: grid; 
    grid-template-columns: 1fr 1fr; 
    gap: 15px; 
}

label { 
    display: block; 
    margin-bottom: 6px; 
    font-weight: 600; 
    color: #4a5568; 
    font-size: 14px; 
}

input[type="text"], input[type="email"], select, textarea { 
    width: 100%; 
    padding: 10px; 
    border: 1px solid #cbd5e0; 
    border-radius: 6px; 
    box-sizing: border-box; 
    font-size: 15px; 
}

input[type="color"] { 
    width: 60px; 
    height: 35px; 
    border: 1px solid #cbd5e0; 
    border-radius: 6px; 
    cursor: pointer; 
    padding: 2px; 
}

.color-group { 
    display: flex; 
    align-items: center; 
    gap: 10px; 
}

.btn-save { 
    background: #0052cc; 
    color: white; 
    border: none; 
    padding: 12px 25px; 
    border-radius: 6px; 
    font-size: 16px; 
    font-weight: bold; 
    cursor: pointer; 
}

.btn-logout { 
    background: #ff5e62; 
    color: white; 
    text-decoration: none; 
    padding: 8px 15px; 
    border-radius: 6px; 
    font-size: 14px; 
    font-weight: bold; 
}

/* ==========================================================================
   3. DESIGN DELLO SLIDER VERTICALE (FOTO PROFILO)
   ========================================================================== */
.slider-vertical-wrapper {
    position: relative;
}

#profile-pos-slider {
    writing-mode: vertical-lr;
    direction: rtl;
    width: 20px;
    height: 100%;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    background: transparent;
}

#profile-pos-slider::-webkit-slider-runnable-track {
    background: #e2e8f0;
    border-radius: 4px;
    width: 6px;
}

#profile-pos-slider::-moz-range-track {
    background: #e2e8f0;
    border-radius: 4px;
    width: 6px;
}

#profile-pos-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    background: #326d8f;
    border-radius: 50%;
    height: 16px;
    width: 16px;
    margin-left: -5px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.15);
    transition: background 0.1s ease;
}

#profile-pos-slider::-webkit-slider-thumb:hover {
    background: #244f69;
}

#profile-pos-slider::-moz-range-thumb {
    background: #326d8f;
    border: none;
    border-radius: 50%;
    height: 16px;
    width: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.15);
    transition: background 0.1s ease;
}

#profile-pos-slider::-moz-range-thumb:hover {
    background: #244f69;
}


/* ==========================================================================
   4. COMPONENTI DI INTERFACCIA (ALERT, GALLERIA, SMARTPHONE)
   ========================================================================== */
.alert { 
    padding: 15px; 
    border-radius: 6px; 
    margin-bottom: 20px; 
    font-size: 14px; 
    text-align: left; 
}

.alert-error { 
    background: #fff5f5; 
    color: #c53030; 
    border: 1px solid #feb2b2; 
}

.alert-success { 
    background: #f0fff4; 
    color: #2f855a; 
    border: 1px solid #9ae6b4; 
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.gallery-item {
    position: relative;
    aspect-ratio: 1 / 1;
    border: 1px solid #cbd5e0;
    border-radius: 8px;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.gallery-item img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
}

.gallery-item.is-transparent {
    background-image: linear-gradient(45deg, #eee 25%, transparent 25%), 
                      linear-gradient(-45deg, #eee 25%, transparent 25%), 
                      linear-gradient(45deg, transparent 75%, #eee 75%), 
                      linear-gradient(-45deg, transparent 75%, #eee 75%);
    background-size: 10px 10px;
    background-position: 0 0, 0 5px, 5px 5px, 5px 0;
}

.btn-delete-thumb {
    position: absolute;
    top: -8px;
    right: -8px;
    background: rgba(255, 94, 98, 0.9);
    color: white;
    border: none;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    font-size: 11px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99;
}

.smartphone-mockup {
    position: relative;
    width: 320px;
    height: 640px;
    background: #111;
    border: 12px solid #2d3748;
    border-radius: 36px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.15), 0 1px 3px rgba(0,0,0,0.3);
    overflow: hidden;
    background-color: #000;
}

.smartphone-camera {
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 12px;
    height: 12px;
    background: #222;
    border-radius: 50%;
    z-index: 20;
    box-shadow: inset 0 1px 2px rgba(255,255,255,0.2);
}

.smartphone-speaker {
    position: absolute;
    top: 4px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 4px;
    background: #333;
    border-radius: 2px;
    z-index: 20;
}

.smartphone-mockup iframe {
    width: 100%;
    height: 100%;
    border: none;
    background: #fff;
    display: block;
    border-radius: 24px;
}

.col-smartphone-sticky {
    position: sticky !important;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

@media (min-width: 992px) {
    .sticky-top-lg {
        position: sticky !important;
        top: 25px;
        height: calc(100vh - 50px);
    }
    .order-lg-1 { order: 1 !important; }
    .order-lg-2 { order: 2 !important; }
}

@keyframes spin-loader {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}


/* Stile base per smartphone e tablet (il telefono sta in alto, il form sotto) */
.responsive-smartphone-column {
    position: relative;
    padding-top: 20px;
    padding-bottom: 20px;
    z-index: 10;
}

/* Stile per computer (Desktop - schermi grandi) */
@media (min-width: 992px) {
    .responsive-smartphone-column {
        position: sticky !important;
        top: 0 !important;
        height: 100vh !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
    }
}
/* Stile per computer (Desktop - schermi grandi) */
@media (min-width: 992px) {
    .responsive-smartphone-column {
        position: sticky !important;
        /* Usa la coordinata dinamica passata da PHP, se non esiste usa 52px come fallback */
        top: var(--smartphone-top, 52px) !important;
        height: 100vh !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        transition: top 0.2s ease, height 0.2s ease; /* Rende fluido il cambio se il banner scompare */
    }
}
/* ==========================================================================
   5. OVERLAY DI CARICAMENTO (LOADER SYSTEM)
   ========================================================================== */
.loader-overlay-container {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.85);
    z-index: 10000;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-family: sans-serif;
}

.loader-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #326d8f;
    border-radius: 50%;
    animation: spin-loader 1s linear infinite;
    margin-bottom: 12px;
}

.loader-message {
    font-weight: bold;
    color: #2b4a5c;
}

/* ==========================================================================
   6. INTERFACCIA RITAGLIO IMMAGINE (CROPPER MODAL)
   ========================================================================== */
.crop-modal-container {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 15, 15, 0.95);
    z-index: 9999;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}

.crop-modal-body {
    width: 90%;
    max-width: 750px;
    height: 60vh;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #333;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.crop-target-img {
    max-width: 100%;
}

.crop-modal-actions {
    margin-top: 20px;
    display: flex;
    gap: 15px;
}

.btn-crop-cancel {
    padding: 10px 20px;
    background: #4a5568;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
}

.btn-crop-confirm {
    padding: 10px 20px;
    background: #326d8f;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    box-shadow: 0 4px 12px rgba(50,109,143,0.3);
}

/* ==========================================================================
   7. SEZIONE MARKETING E GESTIONE QR CODE
   ========================================================================= */
.marketing-section {
    background: #f8fafc; 
    border: 1px solid #e2e8f0; 
    padding: 20px; 
    border-radius: 8px; 
    margin-top: 0px; 
    margin-bottom: 25px; 
    box-sizing: border-box; 
    width: 100%;
}

.marketing-title {
    margin: 0 0 8px 0; 
    color: #0a2540; 
    font-size: 16px; 
    font-weight: 700; 
    text-transform: uppercase; 
    letter-spacing: 0.5px;
}

.marketing-link-text {
    text-align: left; 
    font-size: 15px; 
    color: #4a5568; 
    margin-bottom: 12px; 
    line-height: 1.4;
}

.marketing-public-link {
    color: #0052cc; 
    font-weight: bold; 
    text-decoration: underline;
}

.marketing-tip-box {
    font-size: 13px; 
    color: #1a1d20 !important; /*color: #718096; */
    line-height: 1.5; 
    border-left: 3px solid #326d8f; 
    padding-left: 10px;
}

.qrcode-wrapper {
    background: white; 
    padding: 5px; 
    border-radius: 8px; 
    border: 1px solid #cbd5e0; 
    box-shadow: 0 4px 10px rgba(0,0,0,0.03); 
    width: 150px; 
    height: 150px; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    margin-bottom: 10px; 
    box-sizing: border-box;
}

.qrcode-img {
    max-width: 100%; 
    max-height: 100%; 
    object-fit: contain;
}

.btn-qrcode-download {
    background: #326d8f; 
    font-size: 11px; 
    padding: 4px 8px; 
    text-decoration: none; 
    text-align: center; 
    display: inline-block; 
    font-weight: bold; 
    width: 100%; 
    max-width: 110px; 
    box-sizing: border-box; 
    border-radius: 4px;
}

.qrcode-placeholder {
    width: 130px; 
    height: 130px; 
    background: #edf2f7; 
    border-radius: 8px; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    font-size: 11px; 
    color: #a0aec0; 
    border: 1px dashed #cbd5e0; 
    padding: 10px; 
    text-align: center; 
    box-sizing: border-box;
}

/* ==========================================================================
   8. COMPONENTI DEI FORM AGGIUNTIVI E DIVISORI
   ========================================================================= */
.template-selector-group {
    margin-bottom: 25px;
}

.section-divider {
    border: 0; 
    height: 1px; 
    background: #808080; 
    margin-top: 30px; 
    margin-bottom: 70px;
}

/* ==========================================================================
   9. MODULO IMMAGINI (FOTO PROFILO & COPERTINA)
   ========================================================================== */
.image-module-box {
    background: #f8fafc; 
    border: 1px solid #e2e8f0; 
    padding: 15px; 
    border-radius: 8px; 
    height: 100%; 
    display: flex; 
    flex-direction: column;
}

/* --- SOTTO-COMPONENTI FOTO PROFILO --- */
.profile-header-row {
    display: flex; 
    align-items: center; 
    width: 100%; 
    margin-bottom: 15px;
}

.profile-section-title {
    font-weight: bold; 
    color: #4a5568; 
    margin: 0; 
    white-space: nowrap;
}

.square-checkbox-wrapper {
    display: flex; 
    align-items: center; 
    gap: 6px; 
    cursor: pointer; 
}

.square-checkbox-wrapper input[type="checkbox"] {
    cursor: pointer; 
    width: 14px; 
    height: 14px; 
}

/* 🎯 FORZATURA SPAZIATURA SULLA CHECKBOX DEL PROFILO */
#square-profile-checkbox {
    display: inline-block !important; /* Trasforma l'input in un blocco solido per sbloccare i margini */
    margin-left: 15px !important;    /* Spinge la checkbox verso destra dell'esatta quantità di pixel */
    margin-right: -1px !important;    /* Garantisce un micro-spazio tra la checkbox e la parola "Square" */
    
    /* Allineamento verticale (Opzionale: la centra al millimetro rispetto al testo se Bootstrap la storce) */
    vertical-align: middle !important; 
    cursor: pointer;
}

.square-checkbox-label {
    font-weight: bold !important; 
    color: #4a5568 !important; /* Metti pure il rosso per testare, poi rimetterai #4a5568 */
    margin: 0 !important; 
    white-space: nowrap !important; 
    letter-spacing: 0.5px !important;
    cursor: pointer;
}

.flex-spacer {
    flex-grow: 1;
}

.slider-vertical-label {
    font-size: 11px; 
    font-weight: 600; 
    color: #718096; 
    text-transform: uppercase; 
    letter-spacing: 0.5px; 
    width: 100px; 
    text-align: center; 
    white-space: nowrap;
}

.profile-controls-row {
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    width: 100%; 
    margin-top: auto;
}

.profile-avatar-actions {
    display: flex; 
    align-items: center; 
    gap: 15px;
}

#dashboard-avatar-container {
    width: 80px !important; 
    height: 80px !important; 
    flex-shrink: 0;
}

/* --- Gestione dinamica forma Avatar in Dashboard --- */
#dashboard-avatar-container {
    overflow: hidden;
    transition: border-radius 0.3s ease;
    border: 2px solid #cbd5e0; /* Se vuoi una cornice anche nella dashboard */
}

#dashboard-avatar-container.is-round {
    border-radius: 50% !important;
}

#dashboard-avatar-container.is-square {
    border-radius: 10px !important; /* Arrotondamento per lo stato quadrato */
}



.profile-avatar-img {
    width: 100% !important; 
    height: 100% !important; 
    object-fit: cover;
}

.btn-change-image {
    background: #326d8f; 
    font-size: 13px; 
    padding: 6px 12px;
}

.slider-outer-wrapper {
    width: 100px; 
    flex-shrink: 0; 
    display: flex; 
    justify-content: center;
}

.profile-slider-height {
    height: 80px; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    width: 100%;
}

#profile-input, #main-input {
    display: none;
}

/* --- SOTTO-COMPONENTI COPERTINA (MAIN) --- */
.main-cover-title {
    font-weight: bold; 
    color: #4a5568; 
    display: block; 
    margin-bottom: 5px;
}

.main-cover-row {
    display: flex; 
    align-items: center; 
    gap: 15px; 
    margin-top: 10px;
}

.main-cover-preview-box {
    position: relative !important;
    overflow: visible !important;
    width: 120px; 
    height: 80px; 
    border: 1px solid #cbd5e0; 
    border-radius: 6px; 
    background: #fff; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    background-image: linear-gradient(45deg, #eee 25%, transparent 25%), 
                      linear-gradient(-45deg, #eee 25%, transparent 25%), 
                      linear-gradient(45deg, transparent 75%, #eee 75%), 
                      linear-gradient(-45deg, transparent 75%, #eee 75%); 
    background-size: 8px 8px; 
    flex-shrink: 0;
}

.main-cover-img {
    width: 100%; 
    height: 100%; 
    object-fit: cover;
}

/* Sposta il bottone della copertina sullo spigolo esterno */
.main-cover-preview-box .btn-delete-thumb {
    position: absolute !important;
    top: -12px !important;
    right: -12px !important;
    z-index: 99 !important;
}

.main-cover-placeholder {
    font-size: 11px; 
    color: #a0aec0;
}

/* ==========================================================================
   10. STRUTTURA FLUIDA IMPOSTAZIONI DESIGN (FONT & CARATTERI)
   ========================================================================== */
.design-flex-row {
    display: flex; 
    gap: 15px; 
    margin-bottom: 15px; 
    flex-wrap: wrap;
}

.design-flex-group {
    flex: 1; 
    margin-bottom: 0;
}

.design-group-font {
    min-width: 200px;
}

.design-group-size {
    min-width: 180px;
}

/* ==========================================================================
   11. CONTENITORE PALETTE E SELEZIONE COLORI
   ========================================================================== */
.color-palette-container {
    display: flex; 
    gap: 15px; 
    margin-bottom: 25px; 
    flex-wrap: wrap; 
    background: #fafafa; 
    padding: 12px; 
    border-radius: 6px; 
    border: 1px solid #edf2f7;
}

.color-picker-group {
    flex: 1; 
    min-width: 150px; 
    margin-bottom: 0;
}

.color-picker-group label {
    margin-bottom: 4px;
}

.color-picker-caption {
    font-size: 12px; 
    color: #718096; 
    line-height: 1.2;
}

/* =======================================================================================
   CONTENITORE PALETTE E SELEZIONE COLORI SOLO PER LA CARD IN ALTO SE PRESENTE NEL MODELLO
   ======================================================================================= */
/* Container principale */
.color-palette-container-card {
    display: flex !important;
    flex-direction: column !important; /* Titolo sopra, riga sotto */
    align-items: flex-start !important;  /* Spinge tutto il contenuto verso il bordo sinistro */
    width: 100% !important;
    box-sizing: border-box !important;
    padding: 15px !important;
    background: #fafafa; 
}

/* Stile del titolo allineato a destra */
.color-palette-container-card .palette-title {
    text-align: left !important;
    font-weight: 600 !important;
    margin-bottom: 15px !important;
    width: 100% !important;
}

/* La riga che contiene i 3 pulsanti */
.color-palette-container-card .color-pickers-row {
    display: flex !important;
    flex-direction: row !important;     /* Mantiene la disposizione orizzontale */
    justify-content: flex-start !important; /* Spinge la fila dei 3 pulsanti a sinistra */
    align-items: flex-start !important;
    flex-wrap: wrap !important;         /* Va a capo in sicurezza se lo schermo si restringe */
    gap: 20px !important;               /* Spazio tra un blocco e l'altro */
    width: 100% !important;
}

/* I singoli gruppi interni (Label + Quadratino + Caption) */
.color-palette-container-card .color-picker-group {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;   /* Allinea a sinistra i testi sopra e sotto il quadratino */
    text-align: right !important;       /* Forza la scrittura da destra */
    min-width: 90px !important;
}

/* Il box del quadratino del colore e della didascalia */
.color-palette-container-card .color-group {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;   /* Allinea il quadratino e la didascalia a sinistra */
}


/* ==========================================================================
   12. GRIGLIA E MODULO MANAGEMENT GALLERIA IMMAGINI
   ========================================================================== */
.gallery-module-container {
    background: #f8fafc; 
    border: 1px solid #e2e8f0; 
    padding: 20px; 
    border-radius: 8px;
}

.gallery-module-title {
    font-weight: bold; 
    margin-bottom: 10px; 
    color: #4a5568;
}

.gallery-preview-grid {
    display: flex; 
    flex-wrap: wrap; 
    gap: 15px; 
    margin-top: 10px;
}

.gallery-item-box {
    position: relative; 
    width: 120px; 
    height: 120px; 
    border: 1px solid #cbd5e0; 
    border-radius: 6px; 
    overflow: hidden; 
    background-color: #fff; 
    display: flex; 
    align-items: center; 
    justify-content: center;
}

/* Sfondo a scacchi ottimizzato per file con trasparenze (PNG, SVG, WEBP) */
.gallery-item-box.is-transparent {
    background-image: linear-gradient(45deg, #eee 25%, transparent 25%), 
                      linear-gradient(-45deg, #eee 25%, transparent 25%), 
                      linear-gradient(45deg, transparent 75%, #eee 75%), 
                      linear-gradient(-45deg, transparent 75%, #eee 75%); 
    background-size: 10px 10px; 
    background-position: 0 0, 0 5px, 5px 5px, 5px 0;
}

.gallery-item-img {
    max-width: 100%; 
    max-height: 100%; 
    object-fit: contain;
}

.gallery-preview-grid .btn-delete-thumb {
    position: absolute; 
    top: 0px; 
    right: 0px; 
    background: rgba(255, 94, 98, 0.9); 
    color: white; 
    border: none; 
    border-radius: 50%; 
    width: 22px; 
    height: 22px; 
    font-size: 12px; 
    font-weight: bold; 
    cursor: pointer; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    line-height: 1;
}

.gallery-empty-msg {
    font-size: 14px; 
    color: #a0aec0; 
    margin: 0; 
    padding: 10px 0;
}

.gallery-upload-actions {
    margin-top: 20px; 
    border-top: 1px solid #e2e8f0; 
    padding-top: 15px;
}

#foto-input {
    display: none;
}

.btn-gallery-add {
    background: #4a5568; 
    font-size: 14px; 
    padding: 8px 16px;
}

.gallery-limit-alert {
    background: #fff5f5; 
    border: 1px solid #feb2b2; 
    color: #c53030; 
    padding: 12px 15px; 
    border-radius: 6px; 
    font-size: 13px; 
    font-weight: bold; 
    display: flex; 
    align-items: center; 
    gap: 8px;
}

/* ==========================================================================
   13. SEZIONE MANAGEMENT LINK UTILI E COLLEGAMENTI PERSONALIZZATI
   ========================================================================== */
.custom-links-module {
    background: #f8fafc; 
    border: 1px solid #e2e8f0; 
    padding: 20px; 
    border-radius: 8px; 
    margin-bottom: 20px;
}

.custom-links-title {
    font-weight: bold; 
    color: #4a5568; 
    margin-bottom: 10px; 
    display: block;
}

.custom-link-row {
    display: flex; 
    gap: 10px; 
    margin-bottom: 10px; 
    align-items: center;
}

.link-input-title {
    flex: 1;
}

.link-input-url {
    flex: 2;
}

.link-input-title input, .link-input-url input {
    width: 100%;
}

.btn-del-row {
    background: #ff5e62; 
    color: white; 
    border: none; 
    border-radius: 6px; 
    width: 35px; 
    height: 35px; 
    cursor: pointer; 
    font-weight: bold; 
    font-size: 14px;
}

.btn-add-row-action {
    background: #4a5568; 
    font-size: 13px; 
    padding: 6px 12px; 
    margin-top: 5px;
}

/* ==========================================================================
   14. SEZIONE MANAGEMENT VIDEO YOUTUBE & SALVATAGGIO GLOBALE
   ========================================================================== */
.youtube-module-container {
    background: #f8fafc; 
    border: 1px solid #e2e8f0; 
    padding: 20px; 
    border-radius: 8px; 
    margin-bottom: 25px;
}

.youtube-module-title {
    font-weight: bold; 
    color: #4a5568; 
    margin-bottom: 10px; 
    display: block;
}

.youtube-link-row {
    display: flex; 
    gap: 10px; 
    margin-bottom: 10px; 
    align-items: center;
}

.youtube-input-wrapper {
    flex: 1;
}

.youtube-input-wrapper input {
    width: 100%;
}

.dashboard-submit-wrapper {
    margin-top: 30px; 
    text-align: right;
}

/* ==========================================================================
   15. COLONNA ANTEPRIMA SMARTPHONE E SALVATAGGIO RAPIDO
   ========================================================================== */
.quick-save-container {
    max-width: 320px;
}

.btn-quick-save {
    background: #0052cc; 
    color: white; 
    border: none; 
    padding: 12px 20px; 
    border-radius: 8px; 
    font-size: 15px; 
    font-weight: bold; 
    cursor: pointer; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    gap: 8px;
}

.quick-save-caption {
    display: block; 
    color: #718096; 
    font-size: 11px; 
    margin-top: 4px;
}





/* Stile base del tuo nuovo contenitore dell'avatar */
.profile-cover-preview-box {
    position: relative !important;
    width: 80px; 
    height: 80px; 
    border: 1px solid #cbd5e0; 
    border-radius: 6px; 
    overflow: hidden; 
    background: #fff; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    background-image: linear-gradient(45deg, #eee 25%, transparent 25%), 
                      linear-gradient(-45deg, #eee 25%, transparent 25%), 
                      linear-gradient(45deg, transparent 75%, #eee 75%), 
                      linear-gradient(-45deg, transparent 75%, #eee 75%); 
    background-size: 8px 8px; 
    flex-shrink: 0;
    box-sizing: border-box !important;    
    transition: border-radius 0.25s ease-in-out; /* Transizione fluida */
    overflow: visible !important; 
}

/* 🎯 SCUDO CSS PERMANENTE: Impedisce a qualsiasi script JS di far sgranare o perdere il formato dell'avatar */
.profile-cover-preview-box img,
#dashboard-profile-box img {
    object-fit: contain !important;
    object-position: center center !important;
    transform: none !important;
}


/* 🎯 STATO TONDO (Default se la foto è normale) */
.profile-cover-preview-box.is-round {
    border-radius: 50% !important;
}
.profile-cover-preview-box.is-round img {
    border-radius: 50% !important;
}

.profile-cover-preview-box .btn-delete-thumb {
    position: absolute !important;
    top: -8px !important;    /* Valore negativo: lo spinge verso l'alto fuori dal bordo */
    right: -8px !important;  /* Valore negativo: lo spinge verso destra fuori dal bordo */
    z-index: 99 !important;  /* Lo tiene sopra a tutto */
}

/* ==========================================================================
   18. OTTIMIZZAZIONE GRIGLIA FORM DOPPI (SITO WEB + EMAIL)
   ========================================================================== */
.email-address-double-row {
    margin-bottom: 15px;
}

/* Se usi una risoluzione mobile o tablet, forziamo la disposizione verticale */
@media (max-width: 576px) {
    .email-address-double-row{
        grid-template-columns: 1fr !important;
        gap: 15px;
    }
}

/* ==========================================================================
   19. NOTIFICA TOAST FLUTTUANTE (SUCCESS MESSAGE)
   ========================================================================== */
.toast-notification {
    position: fixed !important;
    top: -100px; /* Parte nascosto sopra lo schermo */
    left: 50%;
    transform: translateX(-50%); /* Lo centra perfettamente in orizzontale */
    z-index: 11000; /* Sopra a tutto, anche alla modale del cropper */
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 300px;
    max-width: 90%;
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    
    /* Attiva l'animazione di entrata */
    animation: slideDownToast 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.toast-icon {
    font-size: 20px;
}

.toast-content {
    font-weight: 600;
    line-height: 1.4;
}

/* Animazione di discesa con leggero effetto molla (bounce) */
@keyframes slideDownToast {
    0% {
        top: -100px;
        opacity: 0;
    }
    100% {
        top: 25px; /* Si ferma a 25px dal bordo superiore */
        opacity: 1;
    }
}

/* Classe di uscita che verrà applicata da JavaScript */
.toast-notification.is-hidden {
    opacity: 0;
    transform: translate(-50%, -20px); /* Svanisce salendo leggermente */
    pointer-events: none; /* Impedisce di cliccarlo mentre scompare */
}

/* ==========================================================================
   20. CENTRAGGIO DEL COMPONENTE QR CODE NELLA CORNICE
   ========================================================================== */
.qrcode-wrapper {
    background: white; 
    padding: 5px; 
    border-radius: 8px; 
    border: 1px solid #cbd5e0; 
    box-shadow: 0 4px 10px rgba(0,0,0,0.03); 
    width: 150px; 
    height: 150px; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    margin-bottom: 10px; 
    box-sizing: border-box;
    overflow: hidden; /* Evita qualsiasi sbavatura dei pixel fuori dai bordi */
}

/* Forza gli elementi generati dalla libreria (Canvas o Immagini) a centrarsi */
#qrcode {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

#qrcode canvas, 
#qrcode img {
    max-width: 100% !important;
    max-height: 100% !important;
    object-fit: contain;
}



/* ==========================================================================
   21. DESIGN PULSANTI RADIO AZZURRI (NO, PROFILE, MAIN)
   ========================================================================== */
.qrcode-options-container {
    text-align: center;
    margin-top: 15px;
    margin-bottom: 20px;
    width: 100%;
}

.qrcode-options-title {
    display: block;
    font-size: 13px;
    color: #4a5568;
    margin-bottom: 10px;
    font-weight: 600;
}

.btn-group-toggle-wrapper {
    display: flex;
    justify-content: center;
    gap: 8px;
}

.btn-radio-toggle {
    background-color: #8cc0de; 
    color: #212529 !important; /*color: white;*/
    border-radius: 4px; 
    padding: 6px 16px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.15s ease;
    user-select: none;
}

.btn-radio-toggle:hover {
    background-color: #72a9c9;
}

/* Evidenzia il pulsante selezionato con l'azzurro scuro originale */
.btn-radio-toggle.active {
    background-color: #326d8f;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.15);
    color: #ffffff !important;
}

/* Nasconde il pallino radio nativo di default, lasciando la label come unico bottone */
.btn-radio-toggle input[type="radio"] {
    position: absolute;
    clip: rect(0,0,0,0);
    pointer-events: none;
}



/* ==========================================================================
   22. BLOCCO DI CONTROLLO COMPLETO SVG IN DASHBOARD (DOPO IL REFRESH)
   ========================================================================== */
img.is-svg-file {
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    object-fit: contain !important;
    object-position: center center !important; /* Sovrascrive lo stile inline del PHP */
    margin: 0 !important;
    padding: 8px !important; /* Margine di sicurezza per non tagliare le estremità */
    box-sizing: border-box !important;
    transform: none !important;
    top: 0 !important;
}

/* ==========================================================================
   📱 5-COLUMNS GRID: MINI SMARTPHONE LIVE VIEWERS ONBOARDING
   ========================================================================== */

/* Allarga lo spazio massimo della modal su PC per contenere comodamente le 5 colonne slanciate */
.dashboard-modal-wrapper {
    max-width: 1100px !important;
    width: 95% !important;
}

/* Struttura della singola tessera modello */
.template-onboarding-card {
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 10px;
    background: #f8fafc;
    height: 100%;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.template-onboarding-card:hover {
    transform: translateY(-3px);
    border-color: #0d6efd;
    box-shadow: 0 12px 25px rgba(0,0,0,0.06);
}

/* ==========================================================================
   📱 FIX TOTALE MINI-SMARTPHONE: SCROLL NATURALE E SCALATURA VW (IFRAME)
   ========================================================================== */


/* Dettagli descrittivi inferiori */
.card-details-box {
    padding-top: 10px;
    margin-top: auto; /* Spinge i dettagli in fondo mantenendo tutto allineato */
    text-align: center;
}

.card-details-box .text-description {
    font-size: 0.72rem;
    line-height: 1.3;
    min-height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-apply-preset {
    border-radius: 8px !important;
    font-size: 0.78rem !important;
    font-weight: 600 !important;
    padding: 6px 0 !important;
}


/* ==========================================================================
   🔳 1. MODAL PRINCIPALE DEI 10 MODELLI (ONBOARDING CORE)
   ========================================================================== */
.dashboard-custom-modal-overlay {
    display: none; 
    position: fixed !important; 
    top: 0 !important; 
    left: 0 !important; 
    width: 100% !important; 
    height: 100% !important; 
    background: rgba(0, 0, 0, 0.6) !important; 
    z-index: 9999999 !important; 
    align-items: center !important; 
    justify-content: center !important; 
    backdrop-filter: blur(4px) !important; 
    -webkit-backdrop-filter: blur(4px) !important;
}

/* Attivazione via JavaScript */
.dashboard-custom-modal-overlay.is-open {
    display: flex !important;
}

/* Il pannello bianco centrale */
.dashboard-modal-wrapper {
    background: #ffffff !important; 
    padding: 30px 24px 24px 24px !important; /* Aumentato il padding superiore per la X */
    border-radius: 16px !important; 
    position: relative !important; 
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25) !important;
    box-sizing: border-box !important;
    width: 1150px !important; 
    height: 85vh !important; 
    max-width: 95vw !important; 
    min-width: 320px !important; 
    flex-shrink: 0 !important; 
    overflow-y: auto !important;
    overflow-x: hidden !important;
}

/* 🎯 RISOLTO: Riposizionamento assoluto stabile della "X" di chiusura */
.close-onboarding-modal-btn {
    position: absolute !important; 
    top: 12px !important; 
    right: 20px !important; 
    font-size: 30px !important; 
    cursor: pointer !important; 
    color: #64748b !important; 
    font-weight: 300 !important;
    z-index: 9999999 !important;
    line-height: 1 !important;
}
.close-onboarding-modal-btn:hover {
    color: #1e293b !important;
}

/* ==========================================================================
   📱 2. GRIGLIA RESPONSIVE A 5 COLONNE E SCUCCIA TELEFONO REAL-TIME
   ========================================================================== */
/* Forza la riga di Bootstrap a comportarsi a griglia affiancata elastica */
.onboarding-grid-five {
    display: flex !important;
    flex-wrap: wrap !important;
}

/* 🎯 RISOLTO: Costringe le tessere a disporsi su 5 colonne su PC (circa il 20% l'una) */
@media (min-width: 992px) {
    .onboarding-grid-five .col {
        flex: 0 0 20% !important;
        max-width: 200px !important;
        margin-right: auto !important;
        margin-left: auto !important;
    }
}

/* La tessera grigia di sfondo del modello */
.template-onboarding-card {
    border: 1px solid #e2e8f0 !important;
    border-radius: 16px !important;
    padding: 10px !important;
    background: #f8fafc !important;
    height: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    box-sizing: border-box !important;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease !important;
}
.template-onboarding-card:hover {
    transform: translateY(-3px) !important;
    border-color: #0d6efd !important;
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.06) !important;
}

/* 🎯 RISOLTO: Blocca la scocca esterna a 180px per contenere l'iframe in modo slanciato */
.mini-phone-wrapper {
    position: relative !important;
    width: 100% !important;
    height: 360px !important;    
    border: 6px solid #2d2d2d !important; 
    border-radius: 20px !important;
    overflow: hidden !important;
    background: #ffffff !important;
    box-shadow: 0 6px 15px rgba(0,0,0,0.06) !important;
    margin: 0 auto !important;
    box-sizing: border-box !important;
}


/* 🔒 COMPORTAMENTO BASE (Per tutti i modelli vecchio stampo: T2, T3, T4, ecc.) */
.mini-phone-iframe {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 360px !important;
    height: 640px !important;
    border: none !important;
    display: block !important;
    transform: scale(0.48) !important; /* Adattato per la scocca da 180px */
    transform-origin: top left !important;
    /* Forza la fluidità dello scorrimento touch */
    -webkit-overflow-scrolling: touch !important;
}

/* 🔥 SBLOCCO RESPONSIVE NATIVO EXCLUSIVE SOLO PER IL T1 CONVERTITO IN CQW */
/* 🎯 AGGIORNATO: Sblocca l'elasticità nativa sia per il T1 che per il T2! */
.mini-phone-wrapper:has(iframe[src*="force_template=t1"]) .mini-phone-iframe,
.mini-phone-wrapper:has(iframe[src*="force_template=t2"]) .mini-phone-iframe ,

.mini-phone-wrapper:has(iframe[src*="force_template=t3"]) .mini-phone-iframe, 
.mini-phone-wrapper:has(iframe[src*="force_template=t4"]) .mini-phone-iframe,
.mini-phone-wrapper:has(iframe[src*="force_template=t5"]) .mini-phone-iframe ,
.mini-phone-wrapper:has(iframe[src*="force_template=t6"]) .mini-phone-iframe, 
.mini-phone-wrapper:has(iframe[src*="force_template=t7"]) .mini-phone-iframe,
.mini-phone-wrapper:has(iframe[src*="force_template=t8"]) .mini-phone-iframe ,
.mini-phone-wrapper:has(iframe[src*="force_template=t9"]) .mini-phone-iframe, 
.mini-phone-wrapper:has(iframe[src*="force_template=t10"]) .mini-phone-iframe
 {
    width: 100% !important;
    height: 100% !important;
    transform: none !important;
    position: relative !important;
}



.mini-phone-click-shield {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    z-index: 20 !important;
    background: transparent !important;
    cursor: grab !important;
    /* 🔥 RISOLTO: Questo comando magico dice al browser di far passare lo scroll 
       del mouse/dito all'Iframe sotto, ma continua a bloccare i click e i link esterni! */
    pointer-events: none !important; 
}


/* ==========================================================================
   🔳 3. MICRO-MODAL BIVIO CROMATICO (CONFIRM STYLES)
   ========================================================================== */
.dashboard-custom-modal-overlay-bivio {
    display: none;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: rgba(0, 0, 0, 0.6) !important;
    z-index: 99999999 !important; 
    align-items: center !important;
    justify-content: center !important;
    backdrop-filter: blur(4px) !important;
    -webkit-backdrop-filter: blur(4px) !important;
}

.dashboard-custom-modal-overlay-bivio.is-open {
    display: flex !important;
}

.bivio-modal-content-box {
    background: #ffffff !important;
    padding: 24px !important;
    border-radius: 16px !important;
    width: 90% !important;
    max-width: 480px !important;
    text-align: center !important;
    box-shadow: 0 20px 60px rgba(0,0,0,0.25) !important;
    box-sizing: border-box !important;
}

.bivio-icon-header { font-size: 2.5rem !important; margin-bottom: 10px !important; }
.bivio-modal-content-box .btn-bivio-submit-full { border-radius: 8px !important; font-weight: 600 !important; font-size: 0.85rem !important; }
.bivio-modal-content-box .btn-bivio-submit-layout { border-radius: 8px !important; font-weight: 600 !important; font-size: 0.85rem !important; color: #475569 !important; border-color: #cbd5e1 !important; }
.bivio-modal-content-box .b-desc { font-size: 0.72rem !important; margin-top: -4px !important; }
.bivio-divider { margin: 20px 0 15px 0 !important; border-color: #f1f5f9 !important; }
.bivio-cancel-link { font-size: 0.8rem !important; color: #94a3b8 !important; text-decoration: none !important; font-weight: 500 !important; transition: color 0.15s ease !important; }
.bivio-cancel-link:hover { color: #64748b !important; }




   /* ========================================================
   🎨 CUSTOM THEME DROPDOWN SELECT STYLES (PHASE 4)
   ======================================================== */

/* Main Select block button styling layout entries */
.custom-social-select {
    padding-top: 0.65rem;
    padding-bottom: 0.65rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: #495057;
    background-color: #ffffff !important; 
    background-image: none !important;    
    border: 2px solid #e9ecef;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.25s ease-in-out;
    padding-left: 1.5rem; 
    padding-right: 2.5rem; 
    position: relative;
    z-index: 2;
    display: block; 
    text-align: center;
}

/* Hover event trigger behaviors over the select button wrapper */
.custom-social-select:hover {
    border-color: #6c757d;
    background-color: #f8f9fa !important;
    transform: translateY(-1px);
}

/* Focus input state mapping styles entries */
.custom-social-select:focus {
    border-color: #212529;
    color: #212529;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    outline: 0;
}

/* Custom CSS dynamic dropdown vector arrow mapping entry */
.custom-social-select::after {
    content: "";
    position: absolute;
    right: 1.5rem;
    top: 50%;
    transform: translateY(-50%); 
    width: 0; 
    height: 0; 
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 6px solid #495057; 
    transition: transform 0.25s ease-in-out;
    pointer-events: none;
}

/* Downward arrow rotation when active (menu-open class validation) */
.custom-social-select.menu-open::after {
    transform: translateY(-50%) rotate(180deg);
}

/* Upward arrow rotation when active (menu-open-up class validation) */
.custom-social-select.menu-open-up::after {
    transform: translateY(-50%) rotate(180deg);
}

/* Se nel pannello amministrativo la riga di Threads deve avere il logo nero di default */
.text-dark .custom-threads-icon, 
.social-row[data-platform="threads"] .custom-threads-icon {
    background-color: #212529; /* Sostituisci con il codice colore esatto del tuo tema dark se necessario */
}


/* Floating custom options list dropdown element container layout */
.custom-dropdown-options {
    position: absolute;
    left: 0;
    right: 0;
    background-color: #ffffff;
    border: 2px solid #212529;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    padding: 8px 0;
    margin: 0;
    list-style: none;
    z-index: 999999 !important; /* Fixed: Prevents overlay collision stacks */
    
    /* UX DESIGN PATTERN: Forced 235px max height to prompt intuitive scrolling actions */
    max-height: 235px; 
    overflow-y: scroll !important; 
    
    opacity: 0;
    visibility: hidden;
    transform: translateY(-5px);
    transition: opacity 0.2s ease-in-out, transform 0.2s ease-in-out, visibility 0.2s;
}

/* 🎨 WEBKIT CUSTOM SCROLLBAR DESIGN ENHANCEMENTS PLATFORMS */
.custom-dropdown-options::-webkit-scrollbar {
    width: 8px; 
}

.custom-dropdown-options::-webkit-scrollbar-track {
    background: #f1f1f1; 
    border-top-right-radius: 14px; 
    border-bottom-right-radius: 14px;
    margin-top: 7px;
    margin-bottom: 7px;
}

.custom-dropdown-options::-webkit-scrollbar-thumb {
    background: #c1c1c1; 
    border-radius: 10px;
}

.custom-dropdown-options::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8; 
}

/* Directional placement routers entries */
.custom-dropdown-options.open-down {
    top: 110%;
    bottom: auto;
}

.custom-dropdown-options.open-up {
    bottom: 110%;
    top: auto;
}

/* Active visibility deployment class injected dynamically via JavaScript engine code */
.custom-dropdown-options.show {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) !important;
}

/* Unclickable fixed dropdown title header line node entry styling */
.custom-dropdown-options .dropdown-title {
    padding: 0.6rem 1.5rem;
    font-size: 0.85rem;
    font-weight: 700;
    color: #6c757d;
    border-bottom: 1px solid #e9ecef;
    margin-bottom: 5px;
    pointer-events: none; 
    background-color: #fafafa;
}

/* Selectable social network row options item configurations */
.custom-dropdown-options li:not(.dropdown-title) {
    padding: 0.6rem 1.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: #495057;
    cursor: pointer;
    text-align: left;
    transition: background 0.15s ease;
}

/* Hover highlights over dynamic list items elements row */
.custom-dropdown-options li:not(.dropdown-title):hover {
    background-color: #f8f9fa;
    color: #212529;
}

/* Active focused highlight configuration styles logs mapping pointer */
.custom-dropdown-options li.active {
    background-color: #e9ecef;
    color: #212529;
    font-weight: 700;
}

.custom-dropdown-container {
    position: relative;
}

/* --- THEME CUSTOM CORES INJECTIONS LAYOUT OVERRIDES --- */
.custom-theme-select {
    padding-top: 0.65rem;
    padding-bottom: 0.65rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: #495057;
    background-color: #ffffff !important; 
    background-image: none !important;    
    border: 2px solid #e9ecef;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.25s ease-in-out;
    padding-left: 1.5rem; 
    padding-right: 2.5rem; 
    position: relative;
    z-index: 2;
    display: block; 
    text-align: center;
}

.custom-theme-select:hover {
    border-color: #6c757d;
    background-color: #f8f9fa !important;
    transform: translateY(-1px);
}

.custom-theme-select:focus {
    border-color: #212529;
    color: #212529;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    outline: 0;
}

.custom-theme-select::after {
    content: "";
    position: absolute;
    right: 1.5rem;
    top: 50%;
    transform: translateY(-50%); 
    width: 0; 
    height: 0; 
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 6px solid #495057; 
    transition: transform 0.25s ease-in-out;
    pointer-events: none;
}

.custom-theme-select.menu-open::after {
    transform: translateY(-50%) rotate(180deg);
}

/* Fixed duplicated syntax from old core layouts */
.custom-theme-select.menu-open-up::after {
    transform: translateY(-50%) rotate(180deg);
}



/* Stile Interattivo per il Pulsante Info Live View */
.btn-outline-secondary:hover {
    background-color: #f8f9fa !important;
    color: #212529 !important;
    border-color: #6c757d !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.05);
}


/* Stile personalizzato per il gruppo lingue */
.style-lang-group select:focus {
    border-color: #ced4da !important;
    box-shadow: none !important;
}
.style-lang-group .input-group-text {
    border-color: #ced4da !important;
}



/* ===================================
🎨 CUSTOM THEME DROPDOWN SELECT STYLES 
======================================*/

/* Main Select block button styling layout entries */
.custom-social-select {
    padding-top: 0.65rem;
    padding-bottom: 0.65rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: #495057;
    background-color: #ffffff !important; 
    background-image: none !important;    
    border: 2px solid #e9ecef;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.25s ease-in-out;
    padding-left: 1.5rem; 
    padding-right: 2.5rem; 
    position: relative;
    z-index: 2;
    display: block; 
    text-align: center;
}

/* Hover event trigger behaviors over the select button wrapper */
.custom-social-select:hover {
    border-color: #6c757d;
    background-color: #f8f9fa !important;
    transform: translateY(-1px);
}

/* Focus input state mapping styles entries */
.custom-social-select:focus {
    border-color: #212529;
    color: #212529;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    outline: 0;
}

/* Custom CSS dynamic dropdown vector arrow mapping entry */
.custom-social-select::after {
    content: "";
    position: absolute;
    right: 1.5rem;
    top: 50%;
    transform: translateY(-50%); 
    width: 0; 
    height: 0; 
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 6px solid #495057; 
    transition: transform 0.25s ease-in-out;
    pointer-events: none;
}

/* Downward arrow rotation when active (menu-open class validation) */
.custom-social-select.menu-open::after {
    transform: translateY(-50%) rotate(180deg);
}

/* Upward arrow rotation when active (menu-open-up class validation) */
.custom-social-select.menu-open-up::after {
    transform: translateY(-50%) rotate(180deg);
}

/* Floating custom options list dropdown element container layout */
.custom-dropdown-options {
    position: absolute;
    left: 0;
    right: 0;
    background-color: #ffffff;
    border: 2px solid #212529;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    padding: 8px 0;
    margin: 0;
    list-style: none;
    z-index: 999999 !important; /* Fixed: Prevents overlay collision stacks */
    
    /* UX DESIGN PATTERN: Forced 235px max height to prompt intuitive scrolling actions */
    max-height: 235px; 
    overflow-y: scroll !important; 
    
    opacity: 0;
    visibility: hidden;
    transform: translateY(-5px);
    transition: opacity 0.2s ease-in-out, transform 0.2s ease-in-out, visibility 0.2s;
}

/* 🎨 WEBKIT CUSTOM SCROLLBAR DESIGN ENHANCEMENTS PLATFORMS */
.custom-dropdown-options::-webkit-scrollbar {
    width: 8px; 
}

.custom-dropdown-options::-webkit-scrollbar-track {
    background: #f1f1f1; 
    border-top-right-radius: 14px; 
    border-bottom-right-radius: 14px;
    margin-top: 7px;
    margin-bottom: 7px;
}

.custom-dropdown-options::-webkit-scrollbar-thumb {
    background: #c1c1c1; 
    border-radius: 10px;
}

.custom-dropdown-options::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8; 
}

/* Directional placement routers entries */
.custom-dropdown-options.open-down {
    top: 110%;
    bottom: auto;
}

.custom-dropdown-options.open-up {
    bottom: 110%;
    top: auto;
}

/* Active visibility deployment class injected dynamically via JavaScript engine code */
.custom-dropdown-options.show {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) !important;
}

/* Unclickable fixed dropdown title header line node entry styling */
.custom-dropdown-options .dropdown-title {
    padding: 0.6rem 1.5rem;
    font-size: 0.85rem;
    font-weight: 700;
    color: #6c757d;
    border-bottom: 1px solid #e9ecef;
    margin-bottom: 5px;
    pointer-events: none; 
    background-color: #fafafa;
}

/* Selectable social network row options item configurations */
.custom-dropdown-options li:not(.dropdown-title) {
    padding: 0.6rem 1.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: #495057;
    cursor: pointer;
    text-align: left;
    transition: background 0.15s ease;
}

/* Hover highlights over dynamic list items elements row */
.custom-dropdown-options li:not(.dropdown-title):hover {
    background-color: #f8f9fa;
    color: #212529;
}

/* Active focused highlight configuration styles logs mapping pointer */
.custom-dropdown-options li.active {
    background-color: #e9ecef;
    color: #212529;
    font-weight: 700;
}

.custom-dropdown-container {
    position: relative;
}

/* --- THEME CUSTOM CORES INJECTIONS LAYOUT OVERRIDES --- */
.custom-theme-select {
    padding-top: 0.65rem;
    padding-bottom: 0.65rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: #495057;
    background-color: #ffffff !important; 
    background-image: none !important;    
    border: 2px solid #e9ecef;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.25s ease-in-out;
    padding-left: 1.5rem; 
    padding-right: 2.5rem; 
    position: relative;
    z-index: 2;
    display: block; 
    text-align: center;
}

.custom-theme-select:hover {
    border-color: #6c757d;
    background-color: #f8f9fa !important;
    transform: translateY(-1px);
}

.custom-theme-select:focus {
    border-color: #212529;
    color: #212529;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    outline: 0;
}

.custom-theme-select::after {
    content: "";
    position: absolute;
    right: 1.5rem;
    top: 50%;
    transform: translateY(-50%); 
    width: 0; 
    height: 0; 
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 6px solid #495057; 
    transition: transform 0.25s ease-in-out;
    pointer-events: none;
}

.custom-theme-select.menu-open::after {
    transform: translateY(-50%) rotate(180deg);
}

/* Fixed duplicated syntax from old core layouts */
.custom-theme-select.menu-open-up::after {
    transform: translateY(-50%) rotate(180deg);
}



/* Stile Interattivo per il Pulsante Info Live View */
.btn-outline-secondary:hover {
    background-color: #f8f9fa !important;
    color: #212529 !important;
    border-color: #6c757d !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.05);
}


/* Stile personalizzato per il gruppo lingue */
.style-lang-group select:focus {
    border-color: #ced4da !important;
    box-shadow: none !important;
}
.style-lang-group .input-group-text {
    border-color: #ced4da !important;
}



