/**
 * Common Tabs CSS for AI Auto Tool Plugin
 * Used across all features with tabbed interface
 * All classes prefixed with 'aiautotool-' for consistency
 */

/* =================================================================
   HORIZONTAL TABS NAVIGATION
   ================================================================= */

/* Tabs navigation container */
.aiautotool-tabs-nav {
    display: flex;
    gap: 5px;
    border-bottom: 2px solid #ddd;
    margin-bottom: 20px;
    background: #f5f5f5;
    padding: 10px 10px 0;
    border-radius: 8px 8px 0 0;
    overflow-x: auto;
    overflow-y: hidden;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}

/* Tab button */
.aiautotool-tab-btn {
    padding: 12px 24px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: #666;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
    border-radius: 8px 8px 0 0;
    flex-shrink: 0;
    white-space: nowrap;
}

.aiautotool-tab-btn:hover {
    background: rgba(34, 113, 177, 0.1);
    color: #2271b1;
}

.aiautotool-tab-btn.active {
    background: #fff;
    color: #2271b1;
    border-bottom-color: #2271b1;
}

.aiautotool-tab-btn i {
    font-size: 16px;
}

/* Tab badge (for counts) */
.aiautotool-tab-badge {
    background: #2271b1;
    color: white;
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 10px;
    margin-left: 5px;
    min-width: 18px;
    text-align: center;
}

.aiautotool-tab-btn.active .aiautotool-tab-badge {
    background: #00875c;
}

/* =================================================================
   TAB CONTENT
   ================================================================= */

/* Tab content container */
.aiautotool-tab-content {
    display: none;
    animation: aiautotool-fadeIn 0.3s ease-in;
}

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

/* Fade in animation */
@keyframes aiautotool-fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =================================================================
   RESPONSIVE DESIGN
   ================================================================= */

@media (max-width: 768px) {
    /* Stack tabs vertically on mobile */
    .aiautotool-tabs-nav {
        flex-direction: column;
        gap: 0;
    }
    
    .aiautotool-tab-btn {
        border-bottom: 1px solid #ddd;
        border-radius: 0;
        justify-content: space-between;
        width: 100%;
    }
    
    .aiautotool-tab-btn.active {
        border-left: 3px solid #2271b1;
        border-bottom-color: #ddd;
    }
}

/* =================================================================
   PRINT STYLES
   ================================================================= */

@media print {
    .aiautotool-tabs-nav {
        display: none !important;
    }
    
    .aiautotool-tab-content {
        display: block !important;
        page-break-inside: avoid;
    }
}

/* =================================================================
   TAB LOADING STATE
   ================================================================= */

.aiautotool-tab-loading {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

.aiautotool-tab-loading i {
    font-size: 32px;
    color: #2271b1;
    animation: aiautotool-spin 1s linear infinite;
}

@keyframes aiautotool-spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* =================================================================
   TAB EMPTY STATE
   ================================================================= */

.aiautotool-tab-empty {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

.aiautotool-tab-empty i {
    font-size: 48px;
    color: #ddd;
    margin-bottom: 15px;
    display: block;
}

.aiautotool-tab-empty p {
    margin: 0;
    font-size: 14px;
}

/* =================================================================
   ACCESSIBILITY
   ================================================================= */

.aiautotool-tab-btn:focus {
    outline: 2px solid #2271b1;
    outline-offset: 2px;
}

/* Screen reader only */
.aiautotool-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* =================================================================
   THEME VARIATIONS
   ================================================================= */

/* Dark theme support (if needed in future) */
@media (prefers-color-scheme: dark) {
    .aiautotool-tabs-nav {
        background: #1e1e1e;
        border-bottom-color: #444;
    }
    
    .aiautotool-tab-btn {
        color: #999;
    }
    
    .aiautotool-tab-btn.active {
        background: #2a2a2a;
        color: #4a9eff;
        border-bottom-color: #4a9eff;
    }
}

/* =================================================================
   COMPACT MODE (for narrow screens or sidebars)
   ================================================================= */

.aiautotool-tabs-compact .aiautotool-tab-btn {
    padding: 8px 16px;
    font-size: 13px;
}

.aiautotool-tabs-compact .aiautotool-tab-btn i {
    font-size: 14px;
}

/* =================================================================
   UTILITY CLASSES
   ================================================================= */

.aiautotool-tabs-fullwidth {
    width: 100%;
}

.aiautotool-tabs-centered .aiautotool-tabs-nav {
    justify-content: center;
}

.aiautotool-tabs-right .aiautotool-tabs-nav {
    justify-content: flex-end;
}

/* Hide tabs but keep content accessible */
.aiautotool-tabs-hidden .aiautotool-tabs-nav {
    display: none;
}

/* Smooth height transition for tab content */
.aiautotool-tabs-smooth .aiautotool-tab-content {
    transition: max-height 0.3s ease-in-out;
}

