/* ========================================
   DOCUMENTATION MODAL STYLES
   ======================================== */

/* Documentation Modal Overlay */
#docsModal.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: hsl(var(--background) / 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s cubic-bezier(0.4, 0, 0.2, 1), 
                visibility 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 1rem;
}

#docsModal.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

#docsModal .modal-card {
    background: linear-gradient(135deg, hsl(240 8% 14%) 0%, hsl(240 8% 12%) 100%);
    border: 1px solid hsl(var(--border));
    border-radius: 0.75rem;
    width: 100%;
    max-width: 800px;
    max-height: calc(100vh - 2rem);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 8px 24px hsl(var(--background) / 0.6);
    backdrop-filter: blur(10px);
    transform: scale(0.9) translateY(20px);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

#docsModal.modal-overlay.active .modal-card {
    transform: scale(1) translateY(0);
}

/* Modal Card Header */
#docsModal .modal-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    border-bottom: 1px solid hsl(var(--border));
    flex-shrink: 0;
}

#docsModal .modal-card-title {
    font-size: 1rem;
    font-weight: 600;
    color: hsl(var(--foreground));
    margin: 0;
    line-height: 1.2;
}

#docsModal .modal-card-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: transparent;
    border: none;
    border-radius: 0.375rem;
    color: hsl(var(--muted-foreground));
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 0;
    flex-shrink: 0;
}

#docsModal .modal-card-close:hover {
    background: hsl(var(--muted) / 0.5);
    color: hsl(var(--foreground));
    transform: scale(1.1) rotate(90deg);
}

#docsModal .modal-card-close i,
#docsModal .modal-card-close svg {
    width: 16px;
    height: 16px;
}

/* Modal Card Body */
#docsModal .modal-card-body {
    display: flex;
    flex: 1;
    overflow: hidden;
    min-height: 0;
}

/* Modal Card Tabs */
#docsModal .modal-card-tabs {
    display: flex;
    flex-direction: column;
    width: 150px;
    min-width: 150px;
    border-right: 1px solid hsl(var(--border));
    padding: 0.5rem;
    gap: 0.125rem;
    overflow-y: auto;
    overflow-x: hidden;
    flex-shrink: 0;
}

#docsModal .modal-card-tab {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.625rem 0.75rem;
    background: transparent;
    border: none;
    border-left: 3px solid transparent;
    border-radius: 0.375rem;
    color: hsl(var(--muted-foreground));
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: left;
    font-family: inherit;
    width: 100%;
    position: relative;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#docsModal .modal-card-tab:hover {
    color: hsl(var(--foreground));
    background: hsl(var(--muted) / 0.3);
    transform: translateX(3px);
}

#docsModal .modal-card-tab.active {
    color: hsl(var(--primary));
    background: hsl(var(--primary) / 0.08);
    border-left-color: hsl(var(--primary));
    font-weight: 600;
}

#docsModal .tab-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    stroke-width: 2;
}

/* Modal Card Content */
#docsModal .modal-card-content {
    flex: 1;
    padding: 1rem;
    overflow-y: auto;
    overflow-x: hidden;
    min-width: 0;
}

/* Tab Panels */
#docsModal .tab-panel {
    display: none;
}

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

#docsModal .tab-panel h3 {
    font-size: 1rem;
    font-weight: 600;
    color: hsl(var(--primary));
    margin: 0 0 1rem 0;
    line-height: 1.3;
}

#docsModal .tab-panel h3:not(:first-child) {
    margin-top: 1.5rem;
}

#docsModal .tab-panel p {
    color: hsl(var(--muted-foreground));
    line-height: 1.6;
    margin: 0;
    font-size: 0.8125rem;
}

/* Documentation Content Styles */
#docsModal .docs-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

#docsModal .docs-content h4 {
    font-size: 0.9375rem;
    font-weight: 600;
    color: hsl(var(--foreground));
    margin: 0 0 0.5rem 0;
}

#docsModal .docs-content h4:not(:first-child) {
    margin-top: 1.5rem;
}

#docsModal .docs-content p {
    color: hsl(var(--muted-foreground));
    line-height: 1.6;
    margin: 0 0 0.75rem 0;
    font-size: 0.8125rem;
}

#docsModal .docs-content ul {
    color: hsl(var(--muted-foreground));
    line-height: 1.6;
    margin: 0 0 0.75rem 0;
    padding-left: 1.25rem;
    font-size: 0.8125rem;
}

#docsModal .docs-content li {
    margin-bottom: 0.5rem;
}

#docsModal .docs-content strong {
    color: hsl(var(--foreground));
    font-weight: 600;
}

/* Responsive */
@media (max-width: 768px) {
    #docsModal.modal-overlay {
        padding: 0.5rem;
    }

    #docsModal .modal-card {
        max-width: 100%;
        max-height: calc(100vh - 1rem);
    }

    #docsModal .modal-card-header {
        padding: 0.875rem;
    }

    #docsModal .modal-card-title {
        font-size: 0.9375rem;
    }

    #docsModal .modal-card-body {
        flex-direction: column;
    }

    #docsModal .modal-card-tabs {
        width: 100%;
        min-width: 100%;
        border-right: none;
        border-bottom: 1px solid hsl(var(--border));
        flex-direction: row;
        overflow-x: auto;
        overflow-y: hidden;
        padding: 0.5rem;
        gap: 0.25rem;
        -webkit-overflow-scrolling: touch;
    }

    #docsModal .modal-card-tab {
        border-left: none;
        border-bottom: 2px solid transparent;
        white-space: nowrap;
        flex-shrink: 0;
    }

    #docsModal .modal-card-tab.active {
        border-left-color: transparent;
        border-bottom-color: hsl(var(--primary));
    }

    #docsModal .modal-card-content {
        padding: 0.875rem;
    }
}
