/* Comparison Table CSS for freefta brand upgrade */
/* IE9 compatible table styles with responsive mobile view */

/* Comparison Table Styles */
.comparison-table {
    width: 100%;
    border-collapse: collapse;
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.comparison-table th,
.comparison-table td {
    padding: 15px 20px;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
    vertical-align: middle;
}

/* Table Header */
.comparison-table thead th {
    background-color: #f8f9fa;
    font-weight: bold;
    font-size: 1.1em;
    color: #495057;
    border-bottom: 2px solid #dee2e6;
}

.comparison-table .feature-column {
    width: 25%;
    background-color: #e9ecef;
}

.comparison-table .legacy-column {
    width: 37.5%;
    background-color: #f8f9fa;
}

.comparison-table .cloud-column {
    width: 37.5%;
    background-color: #e8f5e8;
}

/* Table Body */
.comparison-table tbody tr:nth-child(even) {
    background-color: #f8f9fa;
}

.comparison-table tbody tr:hover {
    background-color: #e9ecef;
}

.comparison-table .feature-name {
    font-weight: bold;
    color: #495057;
    background-color: #f1f3f4;
}

.comparison-table .legacy-feature {
    color: #6c757d;
    font-style: italic;
}

.comparison-table .cloud-feature {
    color: #28a745;
    font-weight: bold;
}

/* Highlight class for cloud version advantages */
.highlight {
    background-color: #d4edda !important;
    border-left: 4px solid #28a745;
    position: relative;
}

.highlight:before {
    content: "✓";
    position: absolute;
    left: 8px;
    top: 50%;
    transform: translateY(-50%);
    color: #28a745;
    font-weight: bold;
    font-size: 1.2em;
}

.comparison-table .cloud-column.highlight:before {
    left: 15px;
}

.comparison-table .cloud-feature.highlight {
    padding-left: 35px;
}

/* Mobile view list - hidden by default */
.comparison-mobile-list {
    display: none;
}

.comparison-item {
    background-color: #fff;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    margin-bottom: 15px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.comparison-item h4 {
    font-size: 1.2em;
    color: #495057;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e9ecef;
}

.feature-comparison {
    display: block;
}

.legacy-item,
.cloud-item {
    display: block;
    padding: 10px 15px;
    margin-bottom: 8px;
    border-radius: 6px;
    background-color: #f8f9fa;
}

.legacy-item {
    border-left: 3px solid #6c757d;
}

.cloud-item {
    border-left: 3px solid #28a745;
    background-color: #d4edda;
}

.cloud-item.highlight {
    background-color: #d4edda;
    position: relative;
    padding-left: 35px;
}

.cloud-item.highlight:before {
    content: "✓";
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #28a745;
    font-weight: bold;
    font-size: 1.1em;
}

.version-label {
    font-weight: bold;
    display: inline-block;
    min-width: 60px;
    margin-right: 10px;
}

.legacy-item .version-label {
    color: #6c757d;
}

.cloud-item .version-label {
    color: #28a745;
}

.feature-desc {
    color: #495057;
}

.cloud-item .feature-desc {
    font-weight: bold;
    color: #155724;
}

/* Responsive design - Mobile view */
@media (max-width: 768px) {
    /* Hide table on mobile */
    .comparison-table {
        display: none;
    }
    
    /* Show mobile list on mobile */
    .comparison-mobile-list {
        display: block;
    }
    
    .comparison-item {
        padding: 15px;
    }
    
    .comparison-item h4 {
        font-size: 1.1em;
        margin-bottom: 12px;
    }
    
    .legacy-item,
    .cloud-item {
        padding: 8px 12px;
        margin-bottom: 6px;
    }
    
    .version-label {
        min-width: 50px;
        font-size: 0.9em;
    }
    
    .feature-desc {
        font-size: 0.9em;
    }
}

@media (max-width: 480px) {
    .comparison-item {
        padding: 12px;
        margin-bottom: 12px;
    }
    
    .comparison-item h4 {
        font-size: 1em;
        margin-bottom: 10px;
    }
    
    .legacy-item,
    .cloud-item {
        padding: 6px 10px;
        margin-bottom: 5px;
    }
    
    .cloud-item.highlight {
        padding-left: 30px;
    }
    
    .cloud-item.highlight:before {
        left: 10px;
        font-size: 1em;
    }
    
    .version-label {
        display: block;
        margin-bottom: 3px;
        margin-right: 0;
        min-width: auto;
    }
    
    .feature-desc {
        display: block;
    }
}

/* IE9 specific fixes */
.ie9 .comparison-table {
    border-collapse: separate;
    border-spacing: 0;
}

.ie9 .comparison-table th:first-child,
.ie9 .comparison-table td:first-child {
    border-left: 1px solid #dee2e6;
}

.ie9 .comparison-table th,
.ie9 .comparison-table td {
    border-right: 1px solid #dee2e6;
    border-top: 1px solid #dee2e6;
}

.ie9 .comparison-table tbody tr:first-child th,
.ie9 .comparison-table tbody tr:first-child td {
    border-top: none;
}

/* IE9 doesn't support :before pseudo-elements well, so we'll use a different approach */
.ie9 .highlight {
    background-color: #d4edda;
    border-left: 4px solid #28a745;
}

.ie9 .cloud-feature.highlight {
    padding-left: 20px;
}

.ie9 .cloud-item.highlight {
    padding-left: 20px;
}

/* Additional styling for better visual hierarchy */
.comparison-section {
    background-color: #f8f9fa;
    padding: 50px 20px;
    border-radius: 8px;
}

.comparison-container {
    max-width: 1000px;
    margin: 0 auto;
}

.comparison-table-wrapper {
    background-color: transparent;
    border: none;
    padding: 0;
    text-align: left;
}

/* Ensure proper spacing and alignment */
.comparison-table th {
    text-align: center;
}

.comparison-table .feature-column {
    text-align: left;
}

.comparison-table .legacy-column,
.comparison-table .cloud-column {
    text-align: center;
}

.comparison-table .legacy-feature,
.comparison-table .cloud-feature {
    text-align: center;
}

.comparison-table .feature-name {
    text-align: left;
}