body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    text-align: center;
    margin: 0;
    padding: 0;
    color: #260f26;
    background: #eeeeee;
    min-height: 100vh;
    line-height: 1.6;
}

/* Astra page title/header cleanup for BTP Finder shortcode pages */
.entry-header.ast-no-thumbnail {
    display: none !important;
    margin: 0 !important;
    padding: 0 !important;
    min-height: 0 !important;
}

.entry-content > .container:first-child {
    margin-top: 0 !important;
}

.entry-content {
    margin-top: 0 !important;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 30px;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(38, 15, 38, 0.08);
    margin-top: 30px;
    margin-bottom: 30px;
}

.title {
    font-size: 28px;
    font-weight: 800;
    color: #260f26;
    letter-spacing: -0.5px;
}

.subtitle {
    font-size: 18px;
    color: #260f26;
    font-weight: 500;
}

h1, h2, h3, h4, h5, h6 {
    color: #260f26;
    font-weight: 700;
    margin-bottom: 1rem;
}

h1 {
    font-size: 2.8rem;
    color: #ffffff;
    margin-bottom: 0.5rem;
    font-weight: 800;
    letter-spacing: -1px;
    position: relative;
    z-index: 1;
}

h2 {
    font-size: 2rem;
    color: #260f26;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.hero-section {
    text-align: center;
    padding: 48px 32px;
    margin-bottom: 40px;
    background: #ffffff;
    border: 1px solid #eeeeee;
    border-radius: 16px;
    color: #260f26;
    box-shadow: 0 4px 16px rgba(38, 15, 38, 0.06);
    position: relative;
    overflow: visible;
}

.hero-section h1 {
    color: #260f26;
}

.hero-subtitle {
    font-size: 1.3rem;
    opacity: 1;
    font-weight: 600;
    margin-bottom: 0.5rem;
    position: relative;
    z-index: 1;
    color: #260f26;
}

.hero-description {
    font-size: 1.05rem;
    opacity: 1;
    font-weight: 400;
    max-width: 700px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
    line-height: 1.6;
    color: #564b56;
}

a {
    color: #fa2b9d;
    text-decoration: none;
    font-weight: 600;
    position: relative;
}

a:hover {
    color: #260f26;
}

a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: #fa2b9d;
    transition: width 0.3s ease;
}

a:hover::after {
    width: 100%;
}


.chart-section {
    background: #ffffff;
    border-radius: 12px;
    padding: 32px;
    margin: 24px 0;
    box-shadow: 0 4px 16px rgba(38, 15, 38, 0.06);
    border: 1px solid #eeeeee;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.chart-section:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(38, 15, 38, 0.1);
}

.section-title {
    font-size: 1.6rem;
    color: #260f26;
    margin-bottom: 0.5rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.section-description {
    color: #D6CBCB;
    font-size: 1rem;
    margin-bottom: 24px;
    font-weight: 500;
}

canvas {
    max-width: 100%;
    width: 100%;
    height: 400px;
    margin: 24px auto;
    padding: 16px;
    background: rgba(238, 238, 238, 0.3);
    box-sizing: border-box;
    border-radius: 8px;
    border: 1px solid #eeeeee;
}

.filters-section {
    background: #ffffff;
    border-radius: 12px;
    padding: 32px;
    margin: 24px 0;
    box-shadow: 0 4px 16px rgba(38, 15, 38, 0.06);
    border: 1px solid #eeeeee;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.filters-section:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(38, 15, 38, 0.1);
}

.filters {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

/* Compact filters section */
.section-header-compact {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
}

.section-header-accent {
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, #fa2b9d 0%, #260f26 100%);
    border-radius: 2px;
}

.filters-container-compact {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.filter-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    align-items: end;
}

.filter-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}
.filter-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filter-item-compact {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.compact-label {
    font-weight: 600;
    color: #260f26;
    font-size: 0.85rem;
    margin: 0;
}

.filter-item label {
    font-weight: 600;
    color: #260f26;
    font-size: 0.9rem;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.label-text {
    font-weight: 700;
    color: #260f26;
    font-size: 0.95rem;
}

.label-description {
    font-weight: 400;
    color: #D6CBCB;
    font-size: 0.8rem;
    margin-top: 2px;
}

.filter-item select,
.filter-item input {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid #eeeeee;
    border-radius: 8px;
    font-size: 0.95rem;
    background: #ffffff;
    color: #260f26;
    box-sizing: border-box;
    font-weight: 500;
}

.filter-item select:hover,
.filter-item input:hover {
    border-color: #D6CBCB;
}

.input-wrapper-compact {
    position: relative;
}

.input-wrapper-compact select,
.input-wrapper-compact input {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #eeeeee;
    border-radius: 6px;
    font-size: 0.9rem;
    background: #ffffff;
    color: #260f26;
    font-weight: 500;
    box-sizing: border-box;
}

.input-wrapper-compact select:focus,
.input-wrapper-compact input:focus {
    outline: none;
    border-color: #fa2b9d;
    box-shadow: 0 0 0 3px rgba(250, 43, 157, 0.1);
}

.input-wrapper-compact:hover select,
.input-wrapper-compact:hover input {
    border-color: #D6CBCB;
    box-shadow: 0 2px 8px rgba(38, 15, 38, 0.05);
}

.filter-item select:focus,
.filter-item input:focus {
    outline: none;
    border-color: #fa2b9d;
    box-shadow: 0 0 0 4px rgba(250, 43, 157, 0.15);
    background: #ffffff;
}

.filter-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 25px;
    flex-wrap: wrap;
}

.filter-actions-compact {
    display: flex;
    gap: 8px;
    align-items: end;
}

.button.compact {
    padding: 10px 16px;
    font-size: 0.9rem;
    border-radius: 6px;
    font-weight: 600;
    position: relative;
    overflow: hidden;
}

.button-ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: scale(0);
    animation: ripple 0.6s linear;
    pointer-events: none;
}

@keyframes ripple {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

.filter-summary-compact {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: rgba(238, 238, 238, 0.7);
    border-radius: 16px;
    border: 1px solid #D6CBCB;
    font-size: 0.8rem;
    color: #260f26;
    font-weight: 500;
    white-space: nowrap;
}

.summary-text {
    flex: 1;
}

.active-filters-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    background: #fa2b9d;
    color: #ffffff;
    border-radius: 50%;
    font-size: 0.75rem;
    font-weight: 700;
}

.active-filters-count:empty {
    display: none;
}

.results-section {
    background: #ffffff;
    border-radius: 12px;
    padding: 32px;
    margin: 24px 0;
    box-shadow: 0 4px 16px rgba(38, 15, 38, 0.06);
    border: 1px solid #eeeeee;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.results-section:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(38, 15, 38, 0.1);
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.results-stats {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.stats-item {
    padding: 10px 20px;
    background: #eeeeee;
    border-radius: 8px;
    font-size: 0.9rem;
    color: #260f26;
    border: 1px solid #D6CBCB;
    font-weight: 500;
}

.stats-item:hover {
    background: #D6CBCB;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(38, 15, 38, 0.1);
}

.professional-table {
    width: 100%;
    margin-top: 24px;
    border-collapse: separate;
    border-spacing: 0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(38, 15, 38, 0.06);
    border: 1px solid #eeeeee;
}

.professional-table th {
    background: #260f26;
    color: #ffffff;
    text-align: center;
    padding: 12px 8px;
    font-weight: 600;
    font-size: 0.9rem;
    border: none;
    position: relative;
}

.professional-table th::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: #fa2b9d;
}

.professional-table th:first-child {
    border-radius: 12px 0 0 0;
}

.professional-table th:last-child {
    border-radius: 0 12px 0 0;
}

.professional-table td {
    text-align: center;
    padding: 10px 6px;
    border-bottom: 1px solid #eeeeee;
    font-size: 0.9rem;
    color: #260f26;
    font-weight: 500;
    transition: all 0.2s ease;
}

.professional-table tbody tr:hover {
    background-color: rgba(250, 43, 157, 0.05);
    cursor: pointer;
}

.professional-table tbody tr:nth-child(odd) {
    background-color: rgba(238, 238, 238, 0.3);
}

.professional-table tbody tr:nth-child(even) {
    background-color: #ffffff;
}

.th-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.th-label {
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
}

.th-description {
    font-size: 0.75rem;
    opacity: 0.9;
    font-weight: 400;
    margin-top: 2px;
}

.table-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 20px 0;
    flex-wrap: wrap;
    gap: 15px;
}

.export-options {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

table {
    width: 100%;
    margin-top: 20px;
}

th {
    background-color: #f8f9fa;
    text-align: center;
}

td {
    text-align: center;
}

/* Style header and alternating rows similar to the index page */
.display thead th:first-child {
    background-color: #260f26;
    color: #ffffff;
}

.display tbody tr:nth-child(odd) {
    background-color: rgba(238, 238, 238, 0.3);
}
.display tbody tr:nth-child(even) {
    background-color: #ffffff;
}

.button {
    font-family: inherit;
    font-weight: 600;
    font-size: 16px;
    padding: 14px 28px;
    border-radius: 8px;
    border: 2px solid transparent;
    background-color: #ffffff;
    color: #260f26;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    position: relative;
    overflow: hidden;
    box-sizing: border-box;
}

.button.primary {
    background-color: #fa2b9d;
    color: #ffffff;
    border-color: #fa2b9d;
    box-shadow: 0 4px 12px rgba(250, 43, 157, 0.3);
}

.button.primary:hover {
    background-color: #260f26;
    border-color: #260f26;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(38, 15, 38, 0.3);
}

.button.secondary {
    background-color: #ffffff;
    color: #260f26;
    border: 2px solid #D6CBCB;
}

.button.secondary:hover {
    background-color: #eeeeee;
    border-color: #260f26;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(38, 15, 38, 0.1);
}

.button.outline {
    background-color: transparent;
    color: #fa2b9d;
    border: 2px solid #fa2b9d;
}

.button.outline:hover {
    background-color: #fa2b9d;
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(250, 43, 157, 0.3);
}

.button.large {
    padding: 16px 32px;
    font-size: 1.1rem;
}

.button.small {
    padding: 8px 16px;
    font-size: 0.85rem;
}

.selection-section {
    background: #ffffff;
    border-radius: 12px;
    padding: 32px;
    margin: 24px 0;
    box-shadow: 0 4px 16px rgba(38, 15, 38, 0.06);
    border: 1px solid #eeeeee;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
    box-sizing: border-box;
}

.selection-section:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(38, 15, 38, 0.1);
}

.selection-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 20px;
}

.selection-count {
    background: rgba(255, 255, 255, 0.3);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    margin-left: 8px;
    letter-spacing: 0.5px;
}

.selected-row {
    background-color: rgba(250, 43, 157, 0.08) !important;
    border-left: 4px solid #fa2b9d;
    box-shadow: inset 0 0 0 1px rgba(250, 43, 157, 0.2);
}

.no-results {
    text-align: center;
    padding: 80px 20px;
    color: #260f26;
}

.no-results h3 {
    color: #260f26;
    margin-bottom: 20px;
    font-size: 1.8rem;
    font-weight: 700;
}

.no-results-icon {
    font-size: 3rem;
    margin-bottom: 20px;
    opacity: 0.6;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .button.primary {
        border: 2px solid #ffffff;
    }
    
    .professional-table th {
        border: 1px solid #ffffff;
    }
    
    .stats-item {
        border-width: 2px;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

.selection-info {
    background: #eeeeee;
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 24px;
    border: 1px solid #D6CBCB;
    position: relative;
}

.selection-info::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #fa2b9d 0%, #260f26 100%);
    border-radius: 8px 8px 0 0;
}

.selected-list {
    list-style: none;
    padding: 0;
    margin: 15px 0;
}

.selected-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 18px;
    margin-bottom: 10px;
    background: #ffffff;
    border-radius: 8px;
    border: 1px solid #D6CBCB;
    font-weight: 500;
    color: #260f26;
}

.selected-list li:hover {
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(38, 15, 38, 0.1);
    border-color: #fa2b9d;
}

.remove-item {
    border: none;
    background: #fa2b9d;
    color: white;
    cursor: pointer;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
}

.remove-item:hover {
    background: #260f26;
    transform: scale(1.05);
}

.compare-page .container {
    background: rgba(255, 255, 255, 0.98);
}

.compare-page .hero-section {
    background: #ffffff;
}

/* Focus indicators for accessibility */
*:focus {
    outline: 3px solid #fa2b9d;
    outline-offset: 2px;
}

*:focus:not(:focus-visible) {
    outline: none;
}

*:focus-visible {
    outline: 3px solid #fa2b9d;
    outline-offset: 2px;
}

/* Ensure sufficient color contrast */
.button:disabled,
.filter-item select:disabled,
.filter-item input:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background-color: #eeeeee;
    color: #D6CBCB;
}

/* Mobile optimizations - ottimizzate per child theme */
@media (max-width: 768px) {
    body {
        margin: 0;
        padding: 1px;
        background: #eeeeee;
    }
    
    .container {
        margin: 1px 0;
        padding: 6px 2px;
        border-radius: 15px;
    }
    
    .hero-section {
        padding: 15px 5px;
        margin-bottom: 15px;
    }
    
    h1 {
        font-size: 2.2rem;
        letter-spacing: -0.5px;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .hero-description {
        font-size: 0.9rem;
    }
    
    .filters-section,
    .chart-section,
    .results-section,
    .selection-section {
        padding: 8px 1px;
        margin: 8px 0;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    .filters {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    /* Compact mobile styles */
    .filters-container-compact {
        gap: 12px;
    }
    
    .filter-row {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .filter-actions-compact {
        grid-column: 1 / -1;
        justify-content: center;
        margin-top: 8px;
    }
    
    .filter-summary-compact {
        grid-column: 1 / -1;
        justify-content: center;
        text-align: center;
        margin-top: 8px;
    }
    
    .filter-group {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .filter-actions {
        flex-direction: column;
        gap: 10px;
    }
    
    .filter-actions .button {
        width: 100%;
        justify-content: center;
    }
    
    canvas {
        max-width: 100%;
        margin: 8px auto;
        padding: 0;
        display: block;
    }
    
    .chart-section {
        padding: 16px 8px;
        margin: 16px 0;
        min-height: 400px;
        display: flex;
        flex-direction: column;
    }
    
    .results-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .results-stats {
        flex-direction: column;
        gap: 8px;
        width: 100%;
    }
    
    .stats-item {
        text-align: center;
        padding: 10px;
    }
    
    .professional-table {
        font-size: 0.85rem;
        border-radius: 8px;
        margin: 5px -4px;
        width: calc(100% + 8px);
    }
    
    .professional-table th,
    .professional-table td {
        padding: 4px 1px;
        font-size: 0.7rem;
    }
    
    .results-section {
        padding: 6px 0 !important;
        margin: 5px 0;
    }
    
    /* Ottimizzazioni mobile per tabella confronto */
    .table-responsive-wrapper {
        margin: 3px 0;
        border-radius: 6px;
        border: 1px solid #ddd;
    }
    
    .compare-page .professional-table {
        margin: 0;
        width: auto;
        min-width: 100%;
        border: none;
        border-radius: 0;
    }
    
    .compare-page .professional-table th,
    .compare-page .professional-table td {
        padding: 4px 3px;
        font-size: 0.65rem;
        white-space: nowrap;
        min-width: 70px;
        max-width: 120px;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    /* Container per evitare overflow nella pagina Compare */
    .compare-page .results-section {
        padding: 6px 0 !important;
        margin: 5px 0;
        overflow: visible;
    }
    
    .th-content {
        gap: 1px;
    }
    
    .th-label {
        font-size: 0.8rem;
    }
    
    .th-description {
        font-size: 0.7rem;
    }
    
    .table-controls {
        flex-direction: column;
        gap: 10px;
    }
    
    .export-options {
        justify-content: center;
        width: 100%;
    }
    
    .export-options .button {
        flex: 1;
        min-width: 120px;
    }
    
    .selection-actions {
        flex-direction: column;
        gap: 10px;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        padding: 0;
    }
    
    .selection-actions .button {
        width: 100%;
        max-width: 100%;
        justify-content: center;
        box-sizing: border-box;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    
    .selected-list li {
        padding: 12px;
        font-size: 0.9rem;
    }
    
    .remove-item {
        padding: 6px 10px;
        font-size: 0.75rem;
    }
    
    /* Mobile table scrolling - horizontal only, no responsive collapse */
    .dataTables_wrapper {
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        width: 100%;
        margin: 0 -2px; /* Slight negative margin to utilize full width */
    }
    
    .dataTables_wrapper .dataTables_scroll {
        overflow-x: auto;
        overflow-y: hidden;
        border: 1px solid #eeeeee;
        border-radius: 8px;
    }
    
    .dataTables_wrapper table.dataTable {
        width: auto !important; /* Allow natural width on mobile */
        min-width: 100%;
        table-layout: auto; /* Allow columns to size naturally on mobile */
    }
    
    .dataTables_wrapper table.dataTable th,
    .dataTables_wrapper table.dataTable td {
        min-width: 80px; /* Ensure minimum readable width */
        padding: 4px 6px;
        font-size: 0.75rem;
    }
    
    /* Enhanced mobile scrollbar */
    .dataTables_wrapper::-webkit-scrollbar {
        height: 10px;
    }
    
    .dataTables_wrapper::-webkit-scrollbar-track {
        background: #eeeeee;
        border-radius: 5px;
    }
    
    .dataTables_wrapper::-webkit-scrollbar-thumb {
        background: #fa2b9d;
        border-radius: 5px;
        border: 1px solid #eeeeee;
    }
    
    .dataTables_wrapper::-webkit-scrollbar-thumb:hover {
        background: #260f26;
    }
}

/* Tablet optimizations */
@media (min-width: 769px) and (max-width: 1024px) {
    .container {
        max-width: 95%;
        padding: 25px;
    }
    
    .filters {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .filter-group {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .filter-row {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .filter-actions-compact {
        flex-direction: row;
    }
}


/* Animation and interaction improvements */
/* Keyframes di caricamento rimossi per migliorare performance */

/* Disabilita TUTTE le animazioni/transizioni di DataTables per evitare doppia animazione */
.dataTables_wrapper *,
.dataTables_wrapper *:before,
.dataTables_wrapper *:after {
    transition: none !important;
    animation: none !important;
}

.dataTable {
    transition: none !important;
}

.filters-section,
.chart-section,
.results-section,
.selection-section {
    /* animation: fadeInUp 0.5s ease-out; */ /* Rimossa per evitare ricaricamenti */
}

/* .professional-table tbody tr {
    /* animation: slideIn 0.3s ease-out; */ /* Rimossa per evitare ricaricamenti */
    animation-fill-mode: both;
}

.professional-table tbody tr:nth-child(1) { animation-delay: 0.05s; }
.professional-table tbody tr:nth-child(2) { animation-delay: 0.1s; }
.professional-table tbody tr:nth-child(3) { animation-delay: 0.15s; }
.professional-table tbody tr:nth-child(4) { animation-delay: 0.2s; }
.professional-table tbody tr:nth-child(5) { animation-delay: 0.25s; } */ /* Animazioni tabelle rimosse per evitare ricaricamenti */

/* Container padre - Forzare contenimento */
.results-section {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    box-sizing: border-box;
}

/* Wrapper responsive per tabella Compare - CONTENIMENTO FORZATO */
.table-responsive-wrapper {
    width: 100% !important;
    max-width: calc(100vw - 60px) !important; /* Forzato con !important */
    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch;
    border: 1px solid #eeeeee;
    border-radius: 8px;
    box-sizing: border-box !important;
    position: relative;
    display: block !important;
    
    /* Scrollbar styling */
    scrollbar-width: thin;
    scrollbar-color: #fa2b9d #f0f0f0;
}

.table-responsive-wrapper::-webkit-scrollbar {
    height: 8px;
}

.table-responsive-wrapper::-webkit-scrollbar-track {
    background: #f0f0f0;
    border-radius: 4px;
}

.table-responsive-wrapper::-webkit-scrollbar-thumb {
    background: #fa2b9d;
    border-radius: 4px;
}

.table-responsive-wrapper::-webkit-scrollbar-thumb:hover {
    background: #e02590;
}

/* Ottimizzazioni tabella Compare - TABELLA INTERNA LIBERA */
.compare-page .professional-table {
    width: auto !important; /* Larghezza naturale - può superare container */
    min-width: 600px !important; /* Forza larghezza minima per trigger scroll */
    margin: 0;
    border-radius: 0;
    table-layout: fixed !important; /* Fixed per controllo colonne */
    border-collapse: separate;
    border-spacing: 0;
}

.compare-page .professional-table thead,
.compare-page .professional-table tbody {
    display: table;
    width: 100%;
}

.compare-page .professional-table tr {
    display: table-row;
}

/* Colonne dati - FISSE PER SCROLL */
.compare-page .professional-table th,
.compare-page .professional-table td {
    display: table-cell;
    white-space: nowrap !important;
    width: 150px !important; /* Larghezza FISSA per ogni colonna */
    min-width: 150px !important;
    max-width: 150px !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    padding: 8px 12px;
    border-right: 1px solid #e0e0e0;
    background: #ffffff;
    box-sizing: border-box !important;
}

/* Prima colonna - dimensioni normali */
.compare-page .professional-table td:first-child,
.compare-page .professional-table th:first-child {
    width: 200px !important; /* Prima colonna più larga */
    min-width: 200px !important;
    max-width: 200px !important;
    text-align: left !important;
    padding: 8px 12px !important;
    white-space: normal !important;
    word-wrap: break-word;
    font-weight: 600;
}

/* Header prima colonna */
.compare-page .professional-table th:first-child {
    background: #260f26 !important;
    color: #ffffff !important;
}

/* Colori tabella pagina Confronto - stessi della pagina Index */
.compare-page .professional-table th {
    background: #260f26;
    color: #ffffff;
}

.compare-page .professional-table th::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: #fa2b9d;
}

.compare-page .professional-table tbody tr:hover {
    background-color: rgba(250, 43, 157, 0.05);
    cursor: pointer;
}

.compare-page .professional-table tbody tr:nth-child(odd) {
    background-color: rgba(238, 238, 238, 0.3);
}

.compare-page .professional-table tbody tr:nth-child(even) {
    background-color: #ffffff;
}

/* Indicatore scroll laterale */
.table-responsive-wrapper::after {
    content: "← Scorri per vedere tutte le colonne →";
    position: absolute;
    bottom: -25px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.7rem;
    color: #666;
    text-align: center;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0.7;
}

/* Nasconde indicatore su desktop largo */
@media (min-width: 1200px) {
    .table-responsive-wrapper::after {
        display: none;
    }
}

/* Mobile - Contenimento viewport assoluto */
@media (max-width: 768px) {
    .table-responsive-wrapper {
        max-width: calc(100vw - 20px); /* Contenimento assoluto mobile */
        margin: 0;
    }
    
    .compare-page .professional-table th,
    .compare-page .professional-table td {
        min-width: 100px; /* Leggibile ma compatto */
        max-width: 140px;
        padding: 6px 8px;
        font-size: 0.8rem;
    }
    
    /* Prima colonna mobile */
    .compare-page .professional-table td:first-child,
    .compare-page .professional-table th:first-child {
        min-width: 120px;
        max-width: 160px;
        font-size: 0.85rem;
        padding: 6px 10px;
    }
}

/* Extra small screens - Priorità leggibilità */
@media (max-width: 480px) {
    .table-responsive-wrapper {
        max-width: calc(100vw - 10px);
        margin: 0 -5px; /* Sfrutta spazio bordi */
    }
    
    .compare-page .professional-table th,
    .compare-page .professional-table td {
        min-width: 80px;
        max-width: 110px;
        padding: 5px 6px;
        font-size: 0.75rem;
    }
    
    .compare-page .professional-table td:first-child,
    .compare-page .professional-table th:first-child {
        min-width: 100px;
        max-width: 130px;
        font-size: 0.8rem;
        padding: 5px 8px;
    }
}

/* Loading states */
.loading {
    opacity: 0.6;
    pointer-events: none;
    position: relative;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 24px;
    height: 24px;
    margin: -12px 0 0 -12px;
    border: 3px solid #eeeeee;
    border-radius: 50%;
    border-top-color: #fa2b9d;
    /* animation: spin 0.8s linear infinite; */ /* Spinner rimosso */
}

/* @keyframes spin {
    to {
        transform: rotate(360deg);
    }
} */ /* Spinner rimosso */

/* Custom scrollbar */
*::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

*::-webkit-scrollbar-track {
    background: #eeeeee;
    border-radius: 8px;
}

*::-webkit-scrollbar-thumb {
    background: #D6CBCB;
    border-radius: 8px;
    border: 2px solid #eeeeee;
}

*::-webkit-scrollbar-thumb:hover {
    background: #fa2b9d;
}

/* Wrapper responsive per tabella Index - scorrimento orizzontale senza responsive */
.dataTables_wrapper {
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    width: 100%;
    margin: 0;
}

.dataTables_wrapper .dataTables_scroll {
    overflow-x: auto;
    overflow-y: hidden;
}

.dataTables_wrapper .dataTables_scrollBody {
    overflow-x: auto;
    overflow-y: hidden;
}

/* Ensure table doesn't break layout */
.dataTables_wrapper table.dataTable {
    width: 100% !important;
    table-layout: fixed;
    border-collapse: separate;
    border-spacing: 0;
}

/* Make sure columns maintain their width */
.dataTables_wrapper table.dataTable th,
.dataTables_wrapper table.dataTable td {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    box-sizing: border-box;
}

/* DataTables custom styling */
.dataTables_wrapper .dataTables_paginate .paginate_button {
    padding: 8px 14px;
    margin: 0 4px;
    border-radius: 6px;
    border: 2px solid #eeeeee;
    background: #ffffff;
    color: #260f26;
    font-weight: 600;
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    background: #fa2b9d;
    color: #ffffff;
    border-color: #fa2b9d;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(250, 43, 157, 0.3);
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background: #260f26;
    color: #ffffff;
    border-color: #260f26;
    box-shadow: 0 2px 8px rgba(38, 15, 38, 0.2);
}
