/* FocalX Compare Table Styles */

.focalx-compare {
    width: 100%;
    margin: 2rem 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.focalx-compare__table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.9375rem;
    line-height: 1.6;
    background-color: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.focalx-compare__table thead {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
}

.focalx-compare__table thead th {
    padding: 1.25rem 1.5rem;
    text-align: center;
    font-weight: 600;
    color: #ffffff;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: sticky;
    top: 0;
    z-index: 10;
    white-space: nowrap;
}

.focalx-compare__table thead th:first-child {
    text-align: left;
}

.focalx-compare__table thead th:first-child {
    border-top-left-radius: 12px;
}

.focalx-compare__table thead th:last-child {
    border-top-right-radius: 12px;
}

.focalx-compare__table tbody tr {
    border-bottom: 1px solid #f0f0f0;
    background-color: #ffffff;
}

.focalx-compare__table tbody tr:nth-child(even) {
    background-color: #fafbfc;
}

.focalx-compare__table tbody td {
    padding: 1.125rem 1.5rem;
    color: #4a5568;
    vertical-align: middle;
    font-size: 0.9375rem;
}

.focalx-compare__table tbody td:first-child {
    font-weight: 500;
    color: #2d3748;
    min-width: 200px;
}

.focalx-compare__table tbody td:nth-child(2),
.focalx-compare__table tbody td:nth-child(3) {
    text-align: center;
    font-weight: 600;
    position: relative;
    font-size: 0.875rem;
    letter-spacing: 0.3px;
}

/* Badge styling for Yes/No values - using data attributes from PHP */
.focalx-compare__table tbody td[data-value="Yes"] {
    color: #10b981;
}

.focalx-compare__table tbody td[data-value="No"] {
    color: #ef4444;
}

/* Style for cells with class indicators (added via PHP) */
.focalx-compare__table tbody td.value-ja,
.focalx-compare__table tbody td.value-yes {
    color: #10b981;
}

.focalx-compare__table tbody td.value-nej,
.focalx-compare__table tbody td.value-no {
    color: #ef4444;
}

/* Checkmark icon styling */
.focalx-checkmark-icon {
    width: 24px;
    height: 24px;
    display: inline-block;
    vertical-align: middle;
    margin: 0 auto;
}

.focalx-compare__table tbody td:nth-child(2),
.focalx-compare__table tbody td:nth-child(3) {
    text-align: center;
}

.focalx-compare__group-row {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.focalx-compare__group-row td {
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    font-weight: 700;
    font-size: 0.875rem;
    color: #1a202c;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-top: 2px solid #e2e8f0;
    border-bottom: 1px solid #e2e8f0;
    position: relative;
}

.focalx-compare__group-row td::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, #667eea 0%, #764ba2 100%);
}

/* Add subtle animation for better UX */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.focalx-compare__table tbody tr {
    animation: fadeIn 0.3s ease-out;
}

.focalx-compare__table tbody tr:nth-child(1) { animation-delay: 0.01s; }
.focalx-compare__table tbody tr:nth-child(2) { animation-delay: 0.02s; }
.focalx-compare__table tbody tr:nth-child(3) { animation-delay: 0.03s; }
.focalx-compare__table tbody tr:nth-child(4) { animation-delay: 0.04s; }
.focalx-compare__table tbody tr:nth-child(5) { animation-delay: 0.05s; }

/* Mobile Styles - Stacked Cards */
@media screen and (max-width: 767px) {
    .focalx-compare {
        overflow-x: visible;
        margin: 1rem 0;
    }
    
    .focalx-compare__table {
        display: block;
        width: 100%;
        border-radius: 12px;
        box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
    }
    
    .focalx-compare__table thead {
        display: none;
    }
    
    .focalx-compare__table tbody {
        display: block;
        width: 100%;
    }
    
    .focalx-compare__table tbody tr {
        display: block;
        width: 100%;
        margin-bottom: 1rem;
        border: 1px solid #e2e8f0;
        border-radius: 12px;
        background-color: #ffffff;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
        padding: 0;
        overflow: hidden;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }
    
    .focalx-compare__table tbody tr:nth-child(even),
    .focalx-compare__table tbody tr:nth-child(odd) {
        background-color: #ffffff;
    }
    
    .focalx-compare__table tbody td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
        padding: 1rem;
        border: none;
        border-bottom: 1px solid #f0f0f0;
    }
    
    .focalx-compare__table tbody td:last-child {
        border-bottom: none;
    }
    
    .focalx-compare__table tbody td::before {
        content: attr(data-label);
        display: block;
        font-weight: 600;
        color: #2d3748;
        font-size: 0.8125rem;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        margin-right: 1rem;
        flex-shrink: 0;
        min-width: 100px;
    }
    
    .focalx-compare__table tbody td:first-child {
        background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
        font-weight: 600;
        padding: 1rem;
        border-bottom: 2px solid #e2e8f0;
        flex-direction: column;
        align-items: flex-start;
    }
    
    .focalx-compare__table tbody td:first-child::before {
        display: none;
    }
    
    .focalx-compare__table tbody td:nth-child(2),
    .focalx-compare__table tbody td:nth-child(3) {
        text-align: right;
        font-weight: 600;
    }
    
    /* Mobile icon styling */
    .focalx-checkmark-icon {
        width: 20px;
        height: 20px;
    }
    
    /* Group header rows on mobile */
    .focalx-compare__group-row {
        margin-top: 1.5rem;
        border: none;
        box-shadow: none;
        background: transparent;
    }
    
    .focalx-compare__group-row:first-child {
        margin-top: 0;
    }
    
    .focalx-compare__group-row td {
        padding: 0.875rem 1rem;
        border: none;
        background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
        border-radius: 8px;
        margin-bottom: 0.5rem;
    }
    
    .focalx-compare__group-row td::before {
        content: none;
    }
}

/* Tablet adjustments */
@media screen and (min-width: 768px) and (max-width: 1024px) {
    .focalx-compare__table {
        font-size: 0.875rem;
    }
    
    .focalx-compare__table thead th,
    .focalx-compare__table tbody td {
        padding: 1rem 1.25rem;
    }
}

/* Print styles */
@media print {
    .focalx-compare__table {
        box-shadow: none;
        border: 1px solid #e2e8f0;
    }
    
    .focalx-compare__table thead {
        background: #f8f9fa !important;
    }
    
    .focalx-compare__table thead th {
        color: #1a202c !important;
    }
}