﻿/* ========================================
   Albatta API Docs - Shared Styles
   Pure Bootstrap 5 Compatible
   ======================================== */

:root {
    --api-primary: #667eea;
    --api-primary-dark: #5568d3;
    --api-secondary: #764ba2;
    --api-success: #198754;
    --api-warning: #ffc107;
    --api-danger: #dc3545;
    --api-dark: #1e1e2d;
    --api-light: #f8f9fa;
    --api-border: #e4e6ef;
}

/* RTL Support */
html[dir="rtl"] {
    text-align: right;
}

    html[dir="rtl"] .me-2 {
        margin-left: 0.5rem !important;
        margin-right: 0 !important;
    }

    html[dir="rtl"] .ms-2 {
        margin-right: 0.5rem !important;
        margin-left: 0 !important;
    }

    html[dir="rtl"] .float-end {
        float: left !important;
    }

    html[dir="rtl"] .float-start {
        float: right !important;
    }

/* Hero Sections */
.api-hero {
    background: linear-gradient(135deg, var(--api-primary) 0%, var(--api-secondary) 100%);
    color: white;
    padding: 4rem 0;
    margin-bottom: 2.5rem;
    position: relative;
    overflow: hidden;
}

    .api-hero::before {
        content: '';
        position: absolute;
        top: -50%;
        right: -50%;
        width: 100%;
        height: 100%;
        background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
        pointer-events: none;
    }

    .api-hero.auth-hero {
        background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    }

/* Feature Cards */
.feature-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: none;
    border-radius: 12px;
    height: 100%;
}

    .feature-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 10px 30px rgba(0,0,0,0.1) !important;
    }

.feature-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--api-primary) 0%, var(--api-secondary) 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

    .feature-icon i {
        font-size: 1.8rem;
        color: white;
    }

/* Code Blocks */
.code-block {
    background: var(--api-dark);
    color: #d4d4d4;
    border-radius: 8px;
    padding: 1.5rem;
    overflow-x: auto;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 0.875rem;
    line-height: 1.5;
    position: relative;
}

    .code-block pre {
        margin: 0;
        white-space: pre-wrap;
    }

    .code-block .method-get {
        color: #61affe;
    }

    .code-block .method-post {
        color: #49cc90;
    }

    .code-block .method-put {
        color: #fca130;
    }

    .code-block .method-delete {
        color: #f93e3e;
    }

    .code-block .text-keyword {
        color: #569cd6;
    }

    .code-block .text-string {
        color: #ce9178;
    }

    .code-block .text-number {
        color: #b5cea8;
    }

    .code-block .text-comment {
        color: #6a9955;
    }

    .code-block .text-function {
        color: #dcdcaa;
    }

    .code-block .text-class {
        color: #4ec9b0;
    }

    .code-block .copy-btn {
        position: absolute;
        top: 0.75rem;
        right: 0.75rem;
        padding: 0.25rem 0.75rem;
        font-size: 0.75rem;
    }

html[dir="rtl"] .code-block .copy-btn {
    right: auto;
    left: 0.75rem;
}

/* Step Cards */
.step-card {
    border-left: 4px solid var(--api-primary);
    transition: all 0.3s ease;
}

html[dir="rtl"] .step-card {
    border-left: none;
    border-right: 4px solid var(--api-primary);
}

.step-card:hover {
    transform: translateX(5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.1) !important;
}

html[dir="rtl"] .step-card:hover {
    transform: translateX(-5px);
}

.step-number {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--api-primary) 0%, var(--api-secondary) 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1.1rem;
    flex-shrink: 0;
}

/* Info & Warning Boxes */
.info-box, .warning-box {
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.info-box {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    border-left: 4px solid var(--api-primary);
}

html[dir="rtl"] .info-box {
    border-left: none;
    border-right: 4px solid var(--api-primary);
}

.warning-box {
    background: #fff3cd;
    border-left: 4px solid var(--api-warning);
}

html[dir="rtl"] .warning-box {
    border-left: none;
    border-right: 4px solid var(--api-warning);
}

/* Screenshot Placeholders */
.screenshot-placeholder {
    background: var(--api-light);
    border: 2px dashed var(--api-border);
    border-radius: 8px;
    padding: 2.5rem 1.5rem;
    text-align: center;
    color: #7e8299;
}

    .screenshot-placeholder i {
        font-size: 2.5rem;
        margin-bottom: 0.75rem;
        opacity: 0.6;
    }

/* Base URL Cards */
.base-url-card {
    border: 1px solid var(--api-border);
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

    .base-url-card:hover {
        border-color: var(--api-primary);
        box-shadow: 0 5px 15px rgba(102, 126, 234, 0.15);
    }

    .base-url-card.sandbox {
        border-top: 3px solid var(--api-warning);
    }

    .base-url-card.production {
        border-top: 3px solid var(--api-success);
    }

    .base-url-card code {
        font-size: 0.95rem;
        color: var(--api-primary);
        font-weight: 500;
    }

/* Postman Setup Grid */
.postman-setup-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.postman-setup-item {
    background: white;
    border: 1px solid var(--api-border);
    border-radius: 12px;
    padding: 1.5rem;
}

    .postman-setup-item .step-badge {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 28px;
        height: 28px;
        background: var(--api-primary);
        color: white;
        border-radius: 50%;
        font-size: 0.85rem;
        font-weight: 600;
        margin-right: 0.5rem;
    }

html[dir="rtl"] .postman-setup-item .step-badge {
    margin-right: 0;
    margin-left: 0.5rem;
}

/* Code Examples Tabs */
.code-examples .nav-tabs {
    border-bottom: 2px solid var(--api-border);
    margin-bottom: 1.5rem;
}

.code-examples .nav-link {
    font-weight: 500;
    color: #7e8299;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px 8px 0 0;
}

    .code-examples .nav-link.active {
        color: var(--api-primary);
        background: white;
        border-bottom: 2px solid var(--api-primary);
        margin-bottom: -2px;
    }

.code-examples .tab-content {
    background: white;
    border-radius: 0 0 12px 12px;
    border: 1px solid var(--api-border);
    border-top: none;
    padding: 1.5rem;
}

/* Download CTA */
.download-cta {
    background: linear-gradient(135deg, var(--api-primary) 0%, var(--api-secondary) 100%);
    border-radius: 16px;
    padding: 3rem;
    margin-bottom: 60px;
}

    .download-cta .btn-light {
        min-width: 200px;
        font-weight: 500;
    }

/* Feature List */
.feature-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

    .feature-list li {
        padding: 0.5rem 0;
        display: flex;
        align-items: flex-start;
    }

        .feature-list li i {
            color: var(--api-success);
            margin-top: 0.25rem;
            width: 20px;
        }

/* Security Notes */
.security-notes {
    background: linear-gradient(135deg, rgba(255, 168, 0, 0.1) 0%, rgba(246, 78, 96, 0.1) 100%);
    border: 1px solid rgba(255, 168, 0, 0.3);
}

    .security-notes ul {
        padding-left: 1.25rem;
        margin: 0;
    }

html[dir="rtl"] .security-notes ul {
    padding-left: 0;
    padding-right: 1.25rem;
}

.security-notes li {
    margin-bottom: 0.5rem;
}

/* Support Box */
.support-box {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    border: 1px solid rgba(102, 126, 234, 0.3);
    border-radius: 12px;
    padding: 1.5rem;
}

    .support-box a {
        color: var(--api-primary);
        text-decoration: none;
        font-weight: 500;
    }

        .support-box a:hover {
            text-decoration: underline;
        }

/* Responsive */
@media (max-width: 991px) {
    .api-hero {
        padding: 3rem 0;
        text-align: center;
    }

        .api-hero .d-flex {
            justify-content: center;
        }

    .step-card {
        border-left-width: 3px;
    }
}

@media (max-width: 767px) {
    .download-cta {
        padding: 2rem 1.5rem;
        text-align: center;
    }

    .postman-setup-grid {
        grid-template-columns: 1fr;
    }

    .code-examples .nav-link {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
}

/* Print Styles */
@media print {
    .api-hero, .copy-btn {
        display: none !important;
    }

    .code-block {
        background: #f8f9fa !important;
        color: #212529 !important;
        border: 1px solid #dee2e6;
    }
}
