/* Modern Table Tabs CSS */
.ecs-table-tabs-container {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin: 20px 0;
    overflow: hidden;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

/* Tab Navigation */
.ecs-tab-navigation {
    display: flex;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    margin: 0;
    padding: 0;
    flex-wrap: wrap;
}

.ecs-tab-btn {
    background: #f8f9fa;
    border: none;
    padding: 8px 16px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #6c757d;
    transition: all 0.3s ease;
    position: relative;
    flex: 1;
    min-width: 120px;
    border-radius: 6px 6px 0 0;
    margin-right: 2px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Hover effect - turn orange */
.ecs-tab-btn:hover:not(.active) {
    background: #ff6b35;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(255, 107, 53, 0.3);
}

.ecs-tab-btn.active {
    color: #fff;
    background: #ff6b35;
    font-weight: 600;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(255, 107, 53, 0.3);
}

.ecs-tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 3px;
    background: #ff6b35;
}

/* Remove the last tab margin */
.ecs-tab-btn:last-child {
    margin-right: 0;
}

/* Special Batteries Tab (purple) */
.ecs-tab-btn.special-batteries.active {
    background: #6f42c1;
    box-shadow: 0 4px 8px rgba(111, 66, 193, 0.3);
}

.ecs-tab-btn.special-batteries.active::after {
    background: #6f42c1;
}

.ecs-tab-btn.special-batteries:hover:not(.active) {
    background: #6f42c1;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(111, 66, 193, 0.3);
}

/* Helicopter Batteries Tab (gray-blue) */
.ecs-tab-btn.helicopter-batteries.active {
    background: #6c757d;
    box-shadow: 0 4px 8px rgba(108, 117, 125, 0.3);
}

.ecs-tab-btn.helicopter-batteries.active::after {
    background: #6c757d;
}

.ecs-tab-btn.helicopter-batteries:hover:not(.active) {
    background: #6c757d;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(108, 117, 125, 0.3);
}

/* Tab Content */
.ecs-tab-content {
    padding: 0;
    background: #fff;
}

.ecs-tab-pane {
    display: none;
    padding: 0;
    margin-top: 30px;
    animation: fadeIn 0.3s ease-in-out;
}

.ecs-tab-pane.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Hide the filter description text in table tabs context */
.ecs-table-tabs-container .ecs-filtered-header {
    display: none !important;
}

.ecs-table-tabs-container .ecs-filter-description {
    display: none !important;
}

/* Modern Table Styling */
.ecs-table-tabs-container .ecs-filtered-table {
    width: 100% !important;
    max-width: 100% !important;
    border-collapse: collapse;
    background: #fff;
    margin: 0;
    margin-top: 0 !important;
    table-layout: auto !important;
    box-sizing: border-box !important;
}

.ecs-table-tabs-container .ecs-filtered-table thead {
    background: #f8f9fa;
}

.ecs-table-tabs-container .ecs-filtered-table th {
    padding: 16px 12px;
    font-weight: 600;
    color: #495057;
    border-bottom: 2px solid #e9ecef;
    text-align: left;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.ecs-table-tabs-container .ecs-filtered-table td {
    padding: 16px 12px;
    border-bottom: 1px solid #f1f3f4;
    color: #495057;
    font-size: 14px;
    vertical-align: middle;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.ecs-table-tabs-container .ecs-filtered-table tbody tr {
    transition: background-color 0.2s ease;
}

.ecs-table-tabs-container .ecs-filtered-table tbody tr:hover {
    background-color: #f8f9fa;
}

.ecs-table-tabs-container .ecs-filtered-table tbody tr:last-child td {
    border-bottom: none;
}

/* RFQ Column Styling - Flexible width */
.ecs-table-tabs-container .ecs-rfq-cell {
    width: auto !important;
    min-width: 120px !important;
    text-align: center;
    padding: 12px 8px !important;
    white-space: nowrap;
}

.ecs-table-tabs-container .ecs-rfq-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #ff6b35;
}

.ecs-table-tabs-container .ecs-quantity-controls {
    display: none;
    margin-top: 8px;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.ecs-table-tabs-container .ecs-quantity-controls.show {
    display: flex;
}

.ecs-table-tabs-container .ecs-quantity-btn {
    width: 24px;
    height: 24px;
    border: 1px solid #ddd;
    background: #fff;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.ecs-table-tabs-container .ecs-quantity-btn:hover {
    background: #f8f9fa;
    border-color: #ff6b35;
}

.ecs-table-tabs-container .ecs-quantity-input {
    width: 45px;
    height: 24px;
    text-align: center;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 12px;
    padding: 0 4px;
}

/* Loading State */
.ecs-tab-loading {
    padding: 40px;
    text-align: center;
    color: #6c757d;
}

.ecs-tab-loading::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #ff6b35;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .ecs-tab-navigation {
        flex-direction: column;
    }
    
    .ecs-tab-btn {
        flex: none;
        min-width: auto;
        padding: 12px 20px;
    }
    
    .ecs-table-tabs-container .ecs-filtered-table {
        font-size: 12px;
    }
    
    .ecs-table-tabs-container .ecs-filtered-table th,
    .ecs-table-tabs-container .ecs-filtered-table td {
        padding: 10px 8px;
    }
    
    .ecs-table-tabs-container .ecs-rfq-cell {
        width: 100px;
        padding: 8px 4px !important;
    }
    
    .ecs-table-tabs-container .ecs-quantity-input {
        width: 35px;
        height: 20px;
        font-size: 11px;
    }
    
    .ecs-table-tabs-container .ecs-quantity-btn {
        width: 20px;
        height: 20px;
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .ecs-table-tabs-container {
        margin: 10px -15px;
        border-radius: 0;
    }
    
    .ecs-tab-btn {
        padding: 10px 15px;
        font-size: 14px;
    }
    
    .ecs-table-tabs-container .ecs-filtered-table {
        font-size: 11px;
    }
    
    .ecs-table-tabs-container .ecs-filtered-table th,
    .ecs-table-tabs-container .ecs-filtered-table td {
        padding: 8px 6px;
    }
}

/* Pagination for tabbed tables */
.ecs-table-tabs-container .ecs-pagination {
    padding: 20px;
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
}

.ecs-table-tabs-container .ecs-pagination-links {
    display: flex;
    justify-content: center;
    gap: 5px;
    flex-wrap: wrap;
}

.ecs-table-tabs-container .ecs-page-link {
    padding: 8px 12px;
    background: #fff;
    border: 1px solid #ddd;
    color: #495057;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.ecs-table-tabs-container .ecs-page-link:hover {
    background: #ff6b35;
    color: #fff;
    border-color: #ff6b35;
}

.ecs-table-tabs-container .ecs-current-page {
    padding: 8px 12px;
    background: #ff6b35;
    color: #fff;
    border: 1px solid #ff6b35;
    border-radius: 4px;
    font-weight: 600;
}

.ecs-table-tabs-container .ecs-pagination-info {
    text-align: center;
    margin-bottom: 15px;
    color: #6c757d;
    font-size: 14px;
} 