/**
 * Tabs Component Styles
 *
 * Modern horizontal tab navigation for the document generator.
 * Features smooth animations, gradient accents, and polished interactions.
 * Uses the centralized color management system for consistency.
 *
 * @author Austin Steil
 * @version 1.0.0
 * @license MIT <https://raw.githubusercontent.com/AustinSteil/generate-files-model/refs/heads/main/LICENSE>
 * @copyright 2025 Austin Steil
 * @created October 18, 2025
 * @updated October 18, 2025
 */

/* ============================================
   TABS CONTAINER
   ============================================ */
.tabs-container {
    width: 100%;
    background: var(--color-bg-primary);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--color-border-light);
    margin-bottom: var(--spacing-2xl);
    /* Allow content to flow naturally */
    position: relative;
}

/* ============================================
   TAB NAVIGATION
   ============================================ */
.tabs-nav {
    display: flex;
    gap: 0;
    background: linear-gradient(135deg,
        var(--color-gray-100) 0%,
        var(--color-bg-tertiary) 50%,
        var(--color-gray-100) 100%);
    border-bottom: 2px solid var(--color-border-medium);
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    /* Enhanced inner shadow for depth */
    box-shadow: inset 0 -3px 6px rgba(0, 0, 0, 0.08),
                inset 0 1px 2px rgba(255, 255, 255, 0.5);
    /* Sticky positioning - floats at top when scrolling */
    position: sticky;
    top: 0;
    z-index: 100;
    /* Rounded corners only at top when stuck */
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

/* Hide scrollbar but keep functionality */
.tabs-nav::-webkit-scrollbar {
    height: 4px;
}

.tabs-nav::-webkit-scrollbar-track {
    background: transparent;
}

.tabs-nav::-webkit-scrollbar-thumb {
    background: var(--color-border-medium);
    border-radius: var(--radius-full);
}

.tabs-nav::-webkit-scrollbar-thumb:hover {
    background: var(--color-border-dark);
}

/* ============================================
   TAB BUTTONS
   ============================================ */
.tab-button {
    flex: 1;
    min-width: 120px;
    padding: var(--spacing-lg) var(--spacing-xl);
    background: transparent;
    color: var(--color-text-secondary);
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    transition: all var(--transition-cubic);
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}

/* Subtle gradient overlay on hover */
.tab-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom,
        rgba(255, 255, 255, 0.4) 0%,
        rgba(255, 255, 255, 0.1) 50%,
        transparent 100%);
    opacity: 0;
    transition: opacity var(--transition-base);
    pointer-events: none;
}

.tab-button:hover::before {
    opacity: 1;
}

.tab-button:hover {
    color: var(--color-text-primary);
    background: linear-gradient(to bottom,
        rgba(255, 255, 255, 0.6) 0%,
        rgba(255, 255, 255, 0.3) 100%);
}

/* Active tab styling with enhanced depth */
.tab-button.active {
    background: linear-gradient(to bottom,
        var(--color-bg-primary) 0%,
        rgba(255, 255, 255, 0.95) 100%);
    color: var(--color-primary);
    border-bottom-color: transparent;
    /* Enhanced inset shadow for pressed effect */
    box-shadow: inset 0 3px 8px rgba(0, 0, 0, 0.08),
                inset 0 1px 3px rgba(0, 0, 0, 0.12),
                0 -2px 12px rgba(0, 123, 255, 0.15);
    /* Extend down to cover the border gap */
    margin-bottom: -2px;
    position: relative;
    z-index: 2;
}

/* Remove accessibility outline - cleaner look */
.tab-button:focus {
    outline: none;
}

.tab-button:focus-visible {
    outline: none;
}

/* ============================================
   TAB CONTENT AREA
   ============================================ */
.tabs-content {
    background: linear-gradient(to bottom,
        var(--color-bg-primary) 0%,
        var(--color-gray-50) 100%);
    padding: var(--spacing-3xl);
    min-height: 500px;
    position: relative;
}

/* Enhanced top border gradient with glow */
.tabs-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg,
        transparent 0%,
        var(--color-info) 20%,
        var(--color-primary) 50%,
        var(--color-info) 80%,
        transparent 100%);
    opacity: 0.5;
    box-shadow: 0 1px 4px rgba(0, 123, 255, 0.3);
}

/* ============================================
   TAB PANELS
   ============================================ */
.tab-panel {
    display: none;
    animation: fadeInUp var(--transition-cubic) forwards;
}

.tab-panel.active {
    display: block;
}

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

/* ============================================
   DARK MODE ADJUSTMENTS
   ============================================ */
.dark-mode .tabs-nav {
    background: linear-gradient(135deg,
        var(--color-gray-800) 0%,
        var(--color-bg-tertiary) 50%,
        var(--color-gray-800) 100%);
    box-shadow: inset 0 -3px 6px rgba(0, 0, 0, 0.3),
                inset 0 1px 2px rgba(255, 255, 255, 0.05);
}

.dark-mode .tab-button::before {
    background: linear-gradient(to bottom,
        rgba(255, 255, 255, 0.08) 0%,
        rgba(255, 255, 255, 0.02) 50%,
        transparent 100%);
}

.dark-mode .tab-button:hover {
    background: linear-gradient(to bottom,
        rgba(255, 255, 255, 0.1) 0%,
        rgba(255, 255, 255, 0.05) 100%);
}

.dark-mode .tab-button.active {
    background: linear-gradient(to bottom,
        var(--color-bg-primary) 0%,
        var(--color-gray-800) 100%);
    box-shadow: inset 0 3px 8px rgba(0, 0, 0, 0.4),
                inset 0 1px 3px rgba(0, 0, 0, 0.5),
                0 -2px 12px rgba(59, 130, 246, 0.2);
}

.dark-mode .tabs-content {
    background: linear-gradient(to bottom,
        var(--color-bg-primary) 0%,
        var(--color-gray-800) 100%);
}

.dark-mode .tabs-content::before {
    box-shadow: 0 1px 4px rgba(59, 130, 246, 0.4);
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 768px) {
    .tabs-container {
        border-radius: var(--radius-lg);
    }

    .tabs-nav {
        gap: 0;
        border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    }

    .tab-button {
        min-width: 100px;
        padding: var(--spacing-md) var(--spacing-lg);
        font-size: 13px;
        letter-spacing: 0.2px;
    }

    .tabs-content {
        padding: var(--spacing-xl);
        min-height: 400px;
    }
}

@media (max-width: 480px) {
    .tab-button {
        min-width: 80px;
        padding: var(--spacing-sm) var(--spacing-md);
        font-size: 12px;
        font-weight: 500;
    }

    .tabs-content {
        padding: var(--spacing-lg);
        min-height: 350px;
    }
}

