/* =====================================================
   SAFESPLIT DOCS CSS
   Estilos para Documentação da API
   ===================================================== */

/* ===========================================
   Docs Navbar
   =========================================== */
.docs-navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 64px;
    background: var(--wo-bg-white);
    border-bottom: 1px solid var(--wo-border);
    z-index: 1000;
}

.docs-navbar-container {
    max-width: 100%;
    height: 100%;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.docs-navbar-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.docs-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.docs-logo svg {
    width: 36px;
    height: 36px;
}

.docs-logo span {
    font-size: 20px;
    font-weight: 700;
    color: var(--wo-text-h1);
}

.docs-navbar-divider {
    width: 1px;
    height: 24px;
    background: var(--wo-border);
}

.docs-navbar-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--wo-text-body);
}

.docs-navbar-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.docs-navbar-link {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: var(--wo-text-body);
    text-decoration: none;
    transition: var(--wo-transition);
}

.docs-navbar-link:hover {
    color: var(--wo-primary);
}

.docs-navbar-link i {
    width: 16px;
    height: 16px;
}

.docs-sidebar-toggle {
    display: none;
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    color: var(--wo-text-body);
}

/* ===========================================
   Docs Layout
   =========================================== */
.docs-layout {
    display: flex;
    padding-top: 64px;
    min-height: 100vh;
}

/* ===========================================
   Docs Sidebar
   =========================================== */
.docs-sidebar {
    position: fixed;
    top: 64px;
    left: 0;
    width: 280px;
    height: calc(100vh - 64px);
    background: var(--wo-bg-white);
    border-right: 1px solid var(--wo-border);
    overflow-y: auto;
    z-index: 100;
}

.docs-sidebar-content {
    padding: 24px;
}

/* Docs Search */
.docs-search {
    position: relative;
    margin-bottom: 24px;
}

.docs-search i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: var(--wo-text-muted);
}

.docs-search input {
    width: 100%;
    padding: 10px 12px 10px 40px;
    font-size: 14px;
    font-family: var(--wo-font-family);
    border: 1px solid var(--wo-border);
    border-radius: var(--wo-radius-md);
    background: var(--wo-bg-light);
    transition: var(--wo-transition);
}

.docs-search input:focus {
    outline: none;
    border-color: var(--wo-primary);
    background: var(--wo-bg-white);
    box-shadow: 0 0 0 3px rgba(var(--wo-primary-rgb), 0.1);
}

/* Docs Nav */
.docs-nav-section {
    margin-bottom: 24px;
}

.docs-nav-title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--wo-text-muted);
    margin-bottom: 12px;
    padding-left: 12px;
}

.docs-nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.docs-nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    font-size: 14px;
    color: var(--wo-text-body);
    text-decoration: none;
    border-radius: var(--wo-radius-md);
    transition: var(--wo-transition);
}

.docs-nav-link i {
    width: 18px;
    height: 18px;
    color: var(--wo-text-muted);
    transition: var(--wo-transition);
}

.docs-nav-link:hover {
    background: var(--wo-bg-light);
    color: var(--wo-text-headings);
}

.docs-nav-link:hover i {
    color: var(--wo-primary);
}

.docs-nav-link.active {
    background: var(--wo-primary-light);
    color: var(--wo-primary);
    font-weight: 500;
}

.docs-nav-link.active i {
    color: var(--wo-primary);
}

/* Docs Support Card */
.docs-support-card {
    background: var(--wo-bg-light);
    border-radius: var(--wo-radius-lg);
    padding: 20px;
    text-align: center;
    margin-top: 24px;
}

.docs-support-card i {
    width: 40px;
    height: 40px;
    color: var(--wo-primary);
    margin-bottom: 12px;
}

.docs-support-card h5 {
    font-size: 15px;
    font-weight: 600;
    color: var(--wo-text-headings);
    margin-bottom: 6px;
}

.docs-support-card p {
    font-size: 13px;
    color: var(--wo-text-body);
    margin-bottom: 16px;
}

/* ===========================================
   Docs Main Content
   =========================================== */
.docs-main {
    flex: 1;
    margin-left: 280px;
    background: var(--wo-bg-white);
}

.docs-content {
    max-width: 900px;
    margin: 0 auto;
    padding: 48px 40px;
}

/* ===========================================
   Docs Sections
   =========================================== */
.docs-section {
    margin-bottom: 80px;
    padding-top: 24px;
}

.docs-section-header {
    margin-bottom: 32px;
}

.docs-section-header h1 {
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--wo-text-h1);
    margin-bottom: 16px;
    line-height: 1.3;
}

.docs-lead {
    font-size: 1.125rem;
    color: var(--wo-text-body);
    line-height: 1.7;
}

.docs-section h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--wo-text-headings);
    margin-top: 48px;
    margin-bottom: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--wo-border);
}

.docs-section h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--wo-text-headings);
    margin-top: 32px;
    margin-bottom: 12px;
}

.docs-section p {
    color: var(--wo-text-body);
    line-height: 1.8;
    margin-bottom: 16px;
}

/* ===========================================
   Badges
   =========================================== */
.docs-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: var(--wo-radius-full);
    background: var(--wo-primary-light);
    color: var(--wo-primary);
}

.docs-badge-success {
    background: var(--wo-accent-green-light);
    color: var(--wo-accent-green);
}

.docs-badge-warning {
    background: var(--wo-accent-orange-light);
    color: #B45309;
}

.docs-badge-danger {
    background: var(--wo-accent-red-light);
    color: var(--wo-accent-red);
}

.docs-badge-info {
    background: var(--wo-accent-cyan-light);
    color: #0891B2;
}

/* ===========================================
   Alerts
   =========================================== */
.docs-alert {
    display: flex;
    gap: 14px;
    padding: 16px 20px;
    border-radius: var(--wo-radius-md);
    margin: 24px 0;
}

.docs-alert i {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    margin-top: 2px;
}

.docs-alert strong {
    display: block;
    font-weight: 600;
    margin-bottom: 4px;
}

.docs-alert p {
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
}

.docs-alert-info {
    background: var(--wo-primary-light);
    border: 1px solid rgba(var(--wo-primary-rgb), 0.2);
}

.docs-alert-info i,
.docs-alert-info strong {
    color: var(--wo-primary);
}

.docs-alert-warning {
    background: var(--wo-accent-orange-light);
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.docs-alert-warning i,
.docs-alert-warning strong {
    color: #B45309;
}

.docs-alert-danger {
    background: var(--wo-accent-red-light);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.docs-alert-danger i,
.docs-alert-danger strong {
    color: var(--wo-accent-red);
}

/* ===========================================
   Endpoint
   =========================================== */
.docs-endpoint {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: var(--wo-bg-light);
    border-radius: var(--wo-radius-md);
    margin: 24px 0;
    font-family: 'JetBrains Mono', monospace;
}

.docs-method {
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 700;
    border-radius: var(--wo-radius-sm);
    text-transform: uppercase;
}

.docs-method-get {
    background: var(--wo-accent-cyan-light);
    color: #0891B2;
}

.docs-method-post {
    background: var(--wo-accent-green-light);
    color: var(--wo-accent-green);
}

.docs-method-put {
    background: var(--wo-accent-orange-light);
    color: #B45309;
}

.docs-method-delete {
    background: var(--wo-accent-red-light);
    color: var(--wo-accent-red);
}

.docs-endpoint code {
    font-size: 15px;
    color: var(--wo-text-headings);
}

/* ===========================================
   Tables
   =========================================== */
.docs-table-wrapper {
    overflow-x: auto;
    margin: 24px 0;
    border: 1px solid var(--wo-border);
    border-radius: var(--wo-radius-md);
}

.docs-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.docs-table th {
    text-align: left;
    padding: 14px 16px;
    background: var(--wo-bg-light);
    font-weight: 600;
    color: var(--wo-text-headings);
    border-bottom: 1px solid var(--wo-border);
}

.docs-table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--wo-border);
    color: var(--wo-text-body);
}

.docs-table tr:last-child td {
    border-bottom: none;
}

.docs-table code {
    background: var(--wo-bg-light);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 13px;
    font-family: 'JetBrains Mono', monospace;
}

/* Status colors in tables */
.status-pending { color: #B45309; }
.status-paid { color: var(--wo-accent-green); }
.status-processing { color: var(--wo-primary); }
.status-expired { color: var(--wo-text-muted); }
.status-cancelled { color: var(--wo-accent-red); }

/* ===========================================
   Code Blocks
   =========================================== */
.code-block {
    background: #1a1a2e;
    border-radius: var(--wo-radius-md);
    overflow: hidden;
    margin: 16px 0;
}

.code-block-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    background: rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.code-block-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
}

.code-block-title i {
    width: 16px;
    height: 16px;
}

.code-copy-btn {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    padding: 6px;
    border-radius: 4px;
    transition: var(--wo-transition);
}

.code-copy-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.code-copy-btn i {
    width: 16px;
    height: 16px;
}

.code-block pre {
    margin: 0;
    padding: 16px;
    overflow-x: auto;
}

.code-block pre code {
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    line-height: 1.6;
}

/* ===========================================
   Tabs
   =========================================== */
.docs-tabs {
    margin: 24px 0;
}

.docs-tabs-header {
    display: flex;
    gap: 4px;
    border-bottom: 1px solid var(--wo-border);
    margin-bottom: -1px;
}

.docs-tab {
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 500;
    font-family: var(--wo-font-family);
    color: var(--wo-text-body);
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    transition: var(--wo-transition);
}

.docs-tab:hover {
    color: var(--wo-primary);
}

.docs-tab.active {
    color: var(--wo-primary);
    border-bottom-color: var(--wo-primary);
}

.docs-tab-panel {
    display: none;
}

.docs-tab-panel.active {
    display: block;
}

/* ===========================================
   Features Grid
   =========================================== */
.docs-features-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin: 32px 0;
}

.docs-feature-card {
    padding: 20px;
    background: var(--wo-bg-light);
    border-radius: var(--wo-radius-md);
    border: 1px solid var(--wo-border);
}

.docs-feature-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--wo-radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
}

.docs-feature-icon i {
    width: 22px;
    height: 22px;
}

.docs-feature-card h4 {
    font-size: 15px;
    font-weight: 600;
    color: var(--wo-text-headings);
    margin-bottom: 4px;
}

.docs-feature-card p {
    font-size: 13px;
    color: var(--wo-text-body);
    margin: 0;
}

/* ===========================================
   Steps
   =========================================== */
.docs-steps {
    margin: 32px 0;
}

.docs-step {
    display: flex;
    gap: 20px;
    padding: 20px 0;
    border-bottom: 1px solid var(--wo-border);
}

.docs-step:last-child {
    border-bottom: none;
}

.docs-step-number {
    width: 36px;
    height: 36px;
    background: var(--wo-primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    flex-shrink: 0;
}

.docs-step-content h4 {
    font-size: 16px;
    font-weight: 600;
    color: var(--wo-text-headings);
    margin-bottom: 6px;
}

.docs-step-content p {
    font-size: 14px;
    color: var(--wo-text-body);
    margin: 0;
}

/* ===========================================
   Lists
   =========================================== */
.docs-list {
    padding-left: 24px;
    margin: 16px 0;
}

.docs-list li {
    color: var(--wo-text-body);
    margin-bottom: 8px;
    line-height: 1.6;
}

/* ===========================================
   SDK Cards
   =========================================== */
.docs-sdk-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin: 32px 0;
}

.docs-sdk-card {
    padding: 24px;
    background: var(--wo-bg-white);
    border: 1px solid var(--wo-border);
    border-radius: var(--wo-radius-lg);
    transition: var(--wo-transition);
}

.docs-sdk-card:hover {
    border-color: var(--wo-primary);
    box-shadow: var(--wo-shadow-md);
}

.docs-sdk-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 12px;
}

.docs-sdk-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--wo-radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.docs-sdk-header h3 {
    font-size: 17px;
    font-weight: 600;
    color: var(--wo-text-headings);
    margin: 0;
}

.docs-sdk-version {
    font-size: 12px;
    color: var(--wo-text-muted);
}

.docs-sdk-card > p {
    font-size: 14px;
    color: var(--wo-text-body);
    margin-bottom: 16px;
}

.docs-sdk-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: var(--wo-primary);
    text-decoration: none;
    font-weight: 500;
    margin-top: 12px;
}

.docs-sdk-link:hover {
    text-decoration: underline;
}

.docs-sdk-link i {
    width: 16px;
    height: 16px;
}

/* ===========================================
   CTA Box
   =========================================== */
.docs-cta-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 32px;
    background: linear-gradient(135deg, var(--wo-primary) 0%, var(--wo-primary-hover) 100%);
    border-radius: var(--wo-radius-lg);
    margin-top: 48px;
}

.docs-cta-content h3 {
    font-size: 20px;
    font-weight: 700;
    color: white;
    margin-bottom: 6px;
}

.docs-cta-content p {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.8);
    margin: 0;
}

.docs-cta-box .btn-primary {
    background: white;
    color: var(--wo-primary);
    flex-shrink: 0;
}

.docs-cta-box .btn-primary:hover {
    background: var(--wo-bg-light);
}

/* ===========================================
   Responsive
   =========================================== */
@media (max-width: 1200px) {
    .docs-sdk-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 992px) {
    .docs-sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    
    .docs-sidebar.open {
        transform: translateX(0);
        box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    }
    
    .docs-main {
        margin-left: 0;
    }
    
    .docs-sidebar-toggle {
        display: block;
    }
    
    .docs-navbar-right {
        display: none;
    }
}

@media (max-width: 768px) {
    .docs-content {
        padding: 32px 20px;
    }
    
    .docs-section-header h1 {
        font-size: 1.75rem;
    }
    
    .docs-features-grid {
        grid-template-columns: 1fr;
    }
    
    .docs-cta-box {
        flex-direction: column;
        text-align: center;
    }
}

/* ===========================================
   Tabs JavaScript Initialization
   =========================================== */
