/* Override Natix per supportare 6 colonne piani + 1 caratteristiche */

/* Larghezze colonne ottimizzate per 6 piani */
#Comprison_pricingplan table thead th:nth-child(1) { 
    width: 220px; /* Colonna caratteristiche */
}

#Comprison_pricingplan table thead th:nth-child(n+2) { 
    width: 180px; /* Colonne piani */
    padding: 15px 5px;
}

/* Bordi tabella base */
#Comprison_pricingplan table {
    table-layout: fixed;
    width: 100%;
    border-collapse: separate; /* IMPORTANTE per border-radius */
    border-spacing: 0;
}

/* Bordi celle tbody */
#Comprison_pricingplan table tbody tr td {
    border-bottom: 1px solid #e8eaf1;
    border-right: 1px solid #e8eaf1;
}

#Comprison_pricingplan table tbody tr td:first-child {
    border-left: 1px solid #e8eaf1;
    border-right: 0; /* Rimuovi bordo destro dalla colonna opzioni per evitare bordo doppio con colonna DOMINIO */
}

/* IMPORTANTE: Fix per bordo mancante tra BUSINESS (4a colonna) e ADVANCED (5a colonna)
   La colonna BUSINESS ha class="default" solo nella prima cella, ma tutte le celle
   della 4a colonna devono mantenere il bordo destro */
#Comprison_pricingplan table tbody tr td:nth-child(4) {
    border-right: 1px solid #e8eaf1 !important;
}

/* Assicura che la classe .default mantenga anche il bordo destro */
#Comprison_pricingplan table tbody tr td.default {
    border-right: 1px solid #e8eaf1 !important;
}

/* Assicura anche per thead (colonna BUSINESS nel header) */
#Comprison_pricingplan table thead th:nth-child(4) {
    border-right: 1px solid #e8eaf1 !important;
}

/* Bordi celle thead */
#Comprison_pricingplan table thead th {
    border-bottom: 1px solid #e8eaf1;
    border-right: 1px solid #e8eaf1;
    border-top: 1px solid #e8eaf1;
}

#Comprison_pricingplan table thead th:first-child {
    border-left: 1px solid #e8eaf1;
    border-right: 0; /* Rimuovi bordo destro dalla colonna opzioni thead per evitare bordo doppio */
}

/* IMPORTANTE: Bordi arrotondati per tabella con colonna caratteristiche + 6 piani
   
   STRUTTURA CORRETTA:
   - Colonna 1 (caratteristiche/opzioni): SOLO top-left arrotondato sulla PRIMA cella tbody
   - Colonna 2 (DOMINIO): angoli SQUADRATI su tutti i lati
   - Colonne 3-6 (piani intermedi): angoli SQUADRATI
   - Colonna 7 (AGENCY - ultimo piano): angoli DESTRA arrotondati (top-right, bottom-right)
*/

/* Colonna 1 (opzioni/caratteristiche): SOLO angolo top-left sulla SECONDA riga tbody (prima dopo il pricing) */
#Comprison_pricingplan table tbody tr:nth-child(2) td:nth-child(1) {
    border-top-left-radius: 15px;
}

/* Colonna 2 (DOMINIO): TUTTI gli angoli SQUADRATI - rimuovi qualsiasi border-radius */
#Comprison_pricingplan table thead th:nth-child(2),
#Comprison_pricingplan table tbody tr td:nth-child(2) {
    border-radius: 0 !important;
}

/* Colonna 7 (AGENCY): angoli DESTRA arrotondati */
#Comprison_pricingplan table thead th:nth-child(7) {
    border-top-right-radius: 15px;
}

#Comprison_pricingplan table tbody tr:last-child td:nth-child(7) {
    border-bottom-right-radius: 15px;
}

/* Assicura che tutte le colonne intermedie (3-6) siano squadrate */
#Comprison_pricingplan table thead th:nth-child(3),
#Comprison_pricingplan table thead th:nth-child(4),
#Comprison_pricingplan table thead th:nth-child(5),
#Comprison_pricingplan table thead th:nth-child(6),
#Comprison_pricingplan table tbody tr td:nth-child(3),
#Comprison_pricingplan table tbody tr td:nth-child(4),
#Comprison_pricingplan table tbody tr td:nth-child(5),
#Comprison_pricingplan table tbody tr td:nth-child(6) {
    border-radius: 0 !important;
}

/* Responsive: Scroll orizzontale su tutti gli schermi se necessario */
@media (max-width: 1400px) {
    .reseller-table-plan-box {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    #Comprison_pricingplan table {
        min-width: 1200px; /* Forza larghezza minima per scroll */
    }
}

/* OVERRIDE responsive.css mobile rules for 7-column table */
@media (max-width: 991px) {
    /* Disable 50% width float that breaks 7-column tables */
    #Comprison_pricingplan table tbody tr td {
        width: auto !important;
        float: none !important;
    }
    
    /* Keep thead visible on mobile */
    #Comprison_pricingplan table thead tr th {
        border-bottom: 1px solid #e8eaf1 !important;
    }
    
    /* Ensure all columns display properly */
    #Comprison_pricingplan td,
    #Comprison_pricingplan th {
        display: table-cell !important;
    }
}

/* Mobile: Mantieni scroll orizzontale */
@media (max-width: 767px) {
    #Comprison_pricingplan table {
        min-width: 1000px; /* Ridotto ma ancora scrollabile */
    }
    
    /* Font sizes ridotti per leggibilità */
    #Comprison_pricingplan table thead th {
        font-size: 14px;
        padding: 12px 5px;
    }
    
    #Comprison_pricingplan table tbody tr td {
        font-size: 13px;
        padding: 12px 5px;
    }
    
    #Comprison_pricingplan table tbody tr td:first-child {
        font-size: 12px;
        padding-left: 15px;
    }
    
    .reseller-table-plan-box h2 {
        font-size: 22px;
    }
    
    .reseller-table-plan-box-btn {
        padding: 10px 20px;
        font-size: 12px;
    }
}

/* Variazioni colore per colonne multiple */
#Comprison_pricingplan td:nth-child(2) .variation-2 h2,
#Comprison_pricingplan td:nth-child(5) .variation-2 h2 {
    color: var(--global--color-lightpink);
}

#Comprison_pricingplan td:nth-child(2) .variation-2 .reseller-table-plan-box-btn,
#Comprison_pricingplan td:nth-child(5) .variation-2 .reseller-table-plan-box-btn {
    background: var(--global--color-lightpink);
}

#Comprison_pricingplan td:nth-child(3) .variation-3 h2,
#Comprison_pricingplan td:nth-child(6) .variation-3 h2 {
    color: var(--global--color-purple);
}

#Comprison_pricingplan td:nth-child(3) .variation-3 .reseller-table-plan-box-btn,
#Comprison_pricingplan td:nth-child(6) .variation-3 .reseller-table-plan-box-btn {
    background: var(--global--color-purple);
}