/* Design System Specific Styles */

.design-sidebar {
    width: 260px;
    background: #f8f9fa;
    border-right: 1px solid #dee2e6;
    position: fixed;
    top: 64px;
    left: 0;
    bottom: 0;
    overflow-y: auto;
    z-index: 100;
}

.design-search {
    padding: 20px 20px 16px;
    border-bottom: 1px solid #dee2e6;
    position: relative;
}

.design-search i {
    position: absolute;
    left: 32px;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
    font-size: 16px;
}

.design-search-input {
    width: 100%;
    padding: 10px 12px 10px 36px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 14px;
    transition: all 0.15s ease;
}

.design-search-input:focus {
    outline: none;
    border-color: #0d6efd;
    box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.1);
}

.design-nav {
    padding: 16px 0;
}

.design-nav-section {
    margin-bottom: 24px;
}

.design-nav-section-title {
    font-size: 11px;
    font-weight: 600;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0 20px 8px;
    margin: 0;
}

.design-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 20px;
    margin: 2px 16px;
    border-radius: 6px;
    color: #495057;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.15s ease;
}

.design-nav-item i {
    font-size: 18px;
    color: #495057;
    width: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.design-nav-item:hover {
    background: #e9ecef;
    color: #212529;
}

.design-nav-item:hover i {
    color: #212529;
}

.design-nav-item.active {
    background: #e8e8e8;
    color: #212529;
}

.design-nav-item.active i {
    color: #212529;
}

/* Design Content Area */
.design-content {
    margin-left: 260px;
    margin-top: 64px;
    padding: 32px 40px 48px;
    min-height: calc(100vh - 64px);
    background: #f8f9fa;
}

/* Breadcrumbs */
.design-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 24px;
    font-size: 14px;
}

.design-breadcrumb a {
    color: #6c757d;
    text-decoration: none;
    transition: color 0.15s ease;
}

.design-breadcrumb a:hover {
    color: #0d6efd;
    text-decoration: underline;
}

.design-breadcrumb-separator {
    color: #adb5bd;
}

.design-breadcrumb-current {
    color: #212529;
    font-weight: 500;
}

.design-section {
    background: #fff;
    border-radius: 8px;
    padding: 48px;
    margin-bottom: 32px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.design-section-header {
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 2px solid #dee2e6;
}

.design-section-title {
    font-size: 36px;
    font-weight: 700;
    color: #212529;
    margin: 0 0 12px 0;
}

.design-section-subtitle {
    font-size: 16px;
    color: #6c757d;
    margin: 0;
    line-height: 1.6;
}

.design-subsection {
    margin-top: 48px;
}

.design-subsection-title {
    font-size: 24px;
    font-weight: 600;
    color: #212529;
    margin: 0 0 16px 0;
}

.design-subsection-description {
    font-size: 14px;
    color: #6c757d;
    margin: 0 0 24px 0;
    line-height: 1.6;
}

/* Color Swatches */
.color-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 24px;
}

.color-swatch {
    border: 1px solid #dee2e6;
    border-radius: 6px;
    overflow: hidden;
}

.color-swatch-preview {
    height: 100px;
    width: 100%;
}

.color-swatch-info {
    padding: 16px;
    background: #fff;
}

.color-swatch-name {
    font-size: 14px;
    font-weight: 600;
    color: #212529;
    margin: 0 0 4px 0;
}

.color-swatch-value {
    font-size: 13px;
    color: #6c757d;
    font-family: 'Courier New', monospace;
    margin: 0;
    transition: all 0.15s ease;
    user-select: none;
}

.color-swatch-value:hover {
    color: #0d6efd;
    transform: translateY(-1px);
}

/* Typography Examples */
.typography-example {
    margin: 24px 0;
    padding: 24px;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    background: #fff;
}

.typography-sample {
    margin-bottom: 8px;
}

.typography-details {
    display: flex;
    gap: 24px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #dee2e6;
    font-size: 13px;
    color: #6c757d;
    font-family: 'Courier New', monospace;
}

/* Component Examples */
.component-example {
    margin: 32px 0;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    overflow: hidden;
}

.component-preview {
    padding: 32px;
    background: #fff;
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: center;
    overflow: visible;
    position: relative;
    z-index: 1;
}

.component-example {
    overflow: visible;
    position: relative;
}

.component-code {
    background: #f8f9fa;
    padding: 20px;
    border-top: 1px solid #dee2e6;
}

.component-code-label {
    font-size: 12px;
    font-weight: 600;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.component-code pre {
    margin: 0;
    padding: 16px;
    background: #212529;
    color: #f8f9fa;
    border-radius: 4px;
    overflow-x: auto;
    font-size: 13px;
    line-height: 1.6;
}

/* Spacing Scale */
.spacing-grid {
    display: grid;
    gap: 16px;
    margin-top: 24px;
}

.spacing-item {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 16px;
    border: 1px solid #dee2e6;
    border-radius: 4px;
}

.spacing-visual {
    background: #0d6efd;
    border-radius: 2px;
}

.spacing-label {
    font-size: 14px;
    font-weight: 600;
    color: #212529;
    font-family: 'Courier New', monospace;
}

/* Icon Grid */
.icon-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 16px;
    margin-top: 24px;
}

.icon-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    transition: all 0.15s ease;
}

.icon-item:hover {
    border-color: #0d6efd;
    background: #f8f9fa;
}

.icon-item i {
    font-size: 32px;
    color: #212529;
    margin-bottom: 8px;
}

.icon-item-name {
    font-size: 11px;
    color: #6c757d;
    text-align: center;
}

/* Component Preview Overrides */
.component-preview .table-container {
    overflow-x: visible;
}

.component-preview .pagination-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    background: #fff;
    border-top: 1px solid #dee2e6;
    flex-wrap: wrap;
    gap: 16px;
}

.component-preview .pagination-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.component-preview .pagination-center {
    flex: 1;
    text-align: center;
}

.component-preview .pagination-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Responsive */
@media (max-width: 1024px) {
    .design-sidebar {
        width: 260px;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    
    .design-sidebar.open {
        transform: translateX(0);
    }
    
    .design-content {
        margin-left: 0;
        padding: 24px;
    }
}

@media (max-width: 768px) {
    .design-content {
        padding: 24px 16px;
    }
    
    .design-section {
        padding: 24px;
    }
    
    .color-grid {
        grid-template-columns: 1fr;
    }
    
    .icon-grid {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    }
}

/* Expandable Actions - Hover to reveal pattern */
.expandable-actions {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
}

.expandable-actions .ellipsis-btn {
    z-index: 2;
}

.expandable-actions .hidden-actions {
    display: flex;
    gap: 8px;
    max-width: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-width 0.3s ease, opacity 0.3s ease;
}

.expandable-actions:hover .hidden-actions {
    max-width: 200px;
    opacity: 1;
}

.expandable-actions:hover .ellipsis-btn {
    opacity: 0.5;
}
