/* ====================================
   DOCUMENTATION PAGE STYLES
   ==================================== */

/* Search Section */
.docs-search-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--white);
    border: 1px solid var(--grey-lighter);
    border-radius: var(--radius-lg);
}

.search-wrapper {
    position: relative;
    flex: 1;
    max-width: 600px;
}

.search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--grey-medium);
    pointer-events: none;
}

.docs-search-input {
    width: 100%;
    padding: 0.875rem 1rem 0.875rem 3rem;
    border: 2px solid var(--grey-lighter);
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    color: var(--grey-dark);
    transition: all 0.3s ease;
}

.docs-search-input:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 4px rgba(13, 133, 216, 0.1);
}

.view-toggle {
    display: flex;
    gap: 0.5rem;
}

.view-btn {
    background: transparent;
    border: 2px solid var(--grey-lighter);
    color: var(--grey-medium);
    padding: 0.75rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.view-btn:hover {
    border-color: var(--primary-blue);
    color: var(--primary-blue);
    background: var(--primary-blue-light);
}

.view-btn.active {
    background: var(--primary-blue);
    border-color: var(--primary-blue);
    color: var(--white);
}

/* Documentation Layout */
.docs-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 2rem;
    margin-bottom: 3rem;
}

/* Sidebar */
.docs-sidebar {
    background: var(--white);
    border: 1px solid var(--grey-lighter);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    height: fit-content;
    position: sticky;
    top: 150px;
}

.sidebar-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--grey-dark);
    margin: 0 0 1rem;
}

.docs-categories {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.category-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    background: transparent;
    border: none;
    border-radius: var(--radius-md);
    color: var(--grey-medium);
    font-size: 0.95rem;
    font-weight: 500;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
}

.category-btn:hover {
    background: var(--grey-lightest);
    color: var(--grey-dark);
}

.category-btn.active {
    background: var(--primary-blue-light);
    color: var(--primary-blue);
}

.category-btn svg {
    flex-shrink: 0;
    opacity: 0.7;
}

.category-btn span:nth-child(2) {
    flex: 1;
}

.category-btn .count {
    background: var(--grey-lighter);
    color: var(--grey-medium);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 700;
    min-width: 28px;
    text-align: center;
}

.category-btn.active .count {
    background: var(--primary-blue);
    color: var(--white);
}

/* Storage Info */
.storage-info {
    padding: 1.25rem;
    background: var(--grey-lightest);
    border-radius: var(--radius-md);
}

.storage-info h4 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--grey-dark);
    margin: 0 0 0.75rem;
}

.storage-bar {
    background: var(--grey-lighter);
    border-radius: 10px;
    height: 8px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.storage-fill {
    background: linear-gradient(90deg, var(--primary-blue) 0%, var(--primary-blue-dark) 100%);
    height: 100%;
    border-radius: 10px;
    transition: width 1s ease;
    width: 0;
}

.storage-text {
    font-size: 0.85rem;
    color: var(--grey-medium);
    margin: 0;
}

/* Documents Grid */
.docs-main-content {
    min-width: 0;
}

.docs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

/* List View */
.docs-grid.list-view {
    grid-template-columns: 1fr;
}

.docs-grid.list-view .doc-card {
    flex-direction: row;
    align-items: center;
    padding: 1.25rem;
}

.docs-grid.list-view .doc-icon {
    width: 56px;
    height: 56px;
}

.docs-grid.list-view .doc-icon svg {
    width: 32px;
    height: 32px;
}

.docs-grid.list-view .doc-info {
    flex: 1;
}

.docs-grid.list-view .doc-actions {
    flex-direction: row;
}

/* Document Card */
.doc-card {
    background: var(--white);
    border: 2px solid var(--grey-lighter);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    transition: all 0.3s ease;
    cursor: pointer;
    animation: fadeInUp 0.4s ease-out;
    position: relative;
    overflow: hidden;
}

.doc-card:hover {
    border-color: var(--primary-blue);
    box-shadow: 0 8px 24px rgba(13, 133, 216, 0.12);
    transform: translateY(-2px);
}

.doc-icon {
    width: 72px;
    height: 72px;
    background: var(--primary-blue-light);
    color: var(--primary-blue);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.doc-icon.api {
    background: #EDE9FE;
    color: #4C1D95;
}

.doc-icon.design {
    background: #D1FAE5;
    color: #064E3B;
}

.doc-icon.video {
    background: #FEF3C7;
    color: #78350F;
}

.doc-icon.reports {
    background: #FEE2E2;
    color: #7F1D1D;
}

.doc-info {
    flex: 1;
}

.doc-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--grey-dark);
    margin: 0 0 0.5rem;
    line-height: 1.3;
}

.doc-meta {
    font-size: 0.85rem;
    color: var(--grey-medium);
    margin: 0;
}

.doc-actions {
    display: flex;
    gap: 0.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--grey-lighter);
}

.doc-action-btn {
    flex: 1;
    background: var(--grey-lightest);
    border: 1px solid var(--grey-lighter);
    color: var(--grey-medium);
    padding: 0.625rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.doc-action-btn:hover {
    background: var(--primary-blue);
    border-color: var(--primary-blue);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(13, 133, 216, 0.2);
}

/* Empty State */
.docs-empty {
    text-align: center;
    padding: 4rem 2rem;
    background: var(--white);
    border: 2px dashed var(--grey-lighter);
    border-radius: var(--radius-xl);
    grid-column: 1 / -1;
}

.docs-empty svg {
    color: var(--grey-light);
    margin-bottom: 1rem;
}

.docs-empty h3 {
    font-size: 1.25rem;
    color: var(--grey-dark);
    margin: 0 0 0.5rem;
}

.docs-empty p {
    font-size: 1rem;
    color: var(--grey-medium);
    margin: 0 0 1.5rem;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .docs-layout {
        grid-template-columns: 260px 1fr;
        gap: 1.5rem;
    }
    
    .docs-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
}

@media (max-width: 968px) {
    .docs-layout {
        grid-template-columns: 1fr;
    }
    
    .docs-sidebar {
        position: static;
    }
    
    .docs-categories {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }
    
    .category-btn {
        padding: 0.75rem;
        font-size: 0.9rem;
    }
    
    .docs-grid {
        grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
        gap: 1.25rem;
    }
}

@media (max-width: 768px) {
    .docs-search-section {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-wrapper {
        max-width: 100%;
    }
    
    .view-toggle {
        justify-content: center;
    }
    
    .docs-sidebar {
        padding: 1.25rem;
    }
    
    .docs-categories {
        grid-template-columns: 1fr;
    }
    
    .category-btn {
        padding: 0.875rem 1rem;
    }
    
    .docs-grid {
        grid-template-columns: 1fr;
    }
    
    .doc-card {
        padding: 1.25rem;
    }
    
    .storage-info {
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    .page-actions {
        flex-direction: column;
    }
    
    .page-actions .btn-secondary,
    .page-actions .btn-primary {
        width: 100%;
    }
    
    .docs-search-input {
        font-size: 0.95rem;
        padding: 0.75rem 1rem 0.75rem 2.75rem;
    }
    
    .search-icon {
        left: 0.75rem;
    }
    
    .doc-icon {
        width: 64px;
        height: 64px;
    }
    
    .doc-icon svg {
        width: 40px;
        height: 40px;
    }
    
    .doc-title {
        font-size: 1rem;
    }
    
    .doc-meta {
        font-size: 0.8rem;
    }
}

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

.doc-card:nth-child(1) { animation-delay: 0.05s; }
.doc-card:nth-child(2) { animation-delay: 0.1s; }
.doc-card:nth-child(3) { animation-delay: 0.15s; }
.doc-card:nth-child(4) { animation-delay: 0.2s; }
.doc-card:nth-child(5) { animation-delay: 0.25s; }
.doc-card:nth-child(6) { animation-delay: 0.3s; }
.doc-card:nth-child(7) { animation-delay: 0.35s; }
.doc-card:nth-child(8) { animation-delay: 0.4s; }

/* Hover Effects */
.doc-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(13, 133, 216, 0.05) 0%, rgba(13, 133, 216, 0) 50%);
    border-radius: var(--radius-lg);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.doc-card:hover::before {
    opacity: 1;
}

