/**
 * Custom Tabs Widget Styles
 * File: assets/css/custom-tabs.css
 */

.ect-custom-tabs {
    width: 100%;
    max-width: 100%;
}

/* Tabs Navigation */
.ect-tabs-wrapper {
    display: flex;
    gap: 0;
    background-color: #f5f5f5;
    border-bottom: 2px solid #e0e0e0;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}

.ect-tabs-wrapper::-webkit-scrollbar {
    height: 4px;
}

.ect-tabs-wrapper::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.ect-tabs-wrapper::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.ect-tab-title {
    padding: 20px 30px;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #666;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
    white-space: nowrap;
    flex-shrink: 0;
    position: relative;
}

.ect-tab-title:hover {
    color: #0066cc;
}

.ect-tab-title.active {
    color: #0066cc;
    border-bottom-color: #0066cc;
    background-color: rgba(0, 102, 204, 0.05);
}

/* Tabs Content */
.ect-tabs-content-wrapper {
    position: relative;
    background-color: #ffffff;
}

.ect-tab-content {
    display: none;
    animation: fadeIn 0.3s ease-in-out;
}

.ect-tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.ect-content-inner {
    padding: 40px 20px;
    min-height: 200px;
}

/* View All Button */
.ect-view-all-wrapper {
    text-align: center;
    padding: 30px 20px 40px;
}

.ect-view-all-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 30px;
    background-color: #0066cc;
    color: #ffffff;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    border-radius: 5px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 102, 204, 0.2);
}

.ect-view-all-btn:hover {
    background-color: #0052a3;
    box-shadow: 0 4px 12px rgba(0, 102, 204, 0.3);
    transform: translateY(-2px);
    color: #ffffff;
    text-decoration: none;
}

.ect-view-all-btn:active {
    transform: translateY(0);
}

.ect-view-all-btn svg {
    transition: transform 0.3s ease;
}

.ect-view-all-btn:hover svg {
    transform: translateX(4px);
}

/* Tablet Styles */
@media (max-width: 1024px) {
    .ect-tab-title {
        padding: 18px 25px;
        font-size: 13px;
    }

    .ect-content-inner {
        padding: 30px 15px;
    }

    .ect-view-all-wrapper {
        padding: 25px 15px 35px;
    }
}

/* Mobile Styles */
@media (max-width: 768px) {
    .ect-tabs-wrapper {
        flex-wrap: nowrap;
        justify-content: flex-start;
        border-bottom: 1px solid #e0e0e0;
    }

    .ect-tab-title {
        padding: 15px 20px;
        font-size: 12px;
        letter-spacing: 0.3px;
        min-width: fit-content;
    }

    .ect-tab-title.active {
        border-bottom-width: 2px;
    }

    .ect-content-inner {
        padding: 25px 15px;
        min-height: 150px;
    }

    .ect-view-all-wrapper {
        padding: 20px 15px 30px;
    }

    .ect-view-all-btn {
        padding: 12px 24px;
        font-size: 14px;
        width: auto;
        max-width: 200px;
    }
}

@media (max-width: 480px) {
    .ect-tab-title {
        padding: 12px 16px;
        font-size: 11px;
    }

    .ect-content-inner {
        padding: 20px 12px;
    }

    .ect-view-all-wrapper {
        padding: 15px 12px 25px;
    }

    .ect-view-all-btn {
        padding: 10px 20px;
        font-size: 13px;
    }
}

/* RTL Support */
[dir="rtl"] .ect-view-all-btn svg {
    transform: scaleX(-1);
}

[dir="rtl"] .ect-view-all-btn:hover svg {
    transform: scaleX(-1) translateX(4px);
}

/* Accessibility */
.ect-tab-title:focus {
    outline: 2px solid #0066cc;
    outline-offset: -2px;
}

.ect-view-all-btn:focus {
    outline: 2px solid #0066cc;
    outline-offset: 2px;
}

/* Loading State */
.ect-tab-content.loading {
    opacity: 0.5;
    pointer-events: none;
}

/* Empty State */
.ect-content-inner:empty::before {
    content: "No content available";
    display: block;
    text-align: center;
    color: #999;
    padding: 40px 20px;
    font-style: italic;
}