/* Advanced API Documentation Styles */
:root {
    --primary-color: #4f46e5;
    --primary-dark: #3730a3;
    --primary-light: #818cf8;
    --secondary-color: #10b981;
    --dark-color: #1e293b;
    --light-color: #f8fafc;
    --gray-color: #94a3b8;
    --border-color: #e2e8f0;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --error-color: #ef4444;
    --info-color: #3b82f6;
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 16px;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
    --transition: all 0.3s ease;
}

.api-docs-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

.api-docs-header {
    text-align: center;
    margin-bottom: 60px;
}

.api-docs-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 16px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.api-docs-subtitle {
    font-size: 1.1rem;
    color: var(--gray-color);
    max-width: 600px;
    margin: 0 auto;
}

.api-section {
    margin-bottom: 80px;
    border-radius: var(--radius-lg);
    background-color: white;
    box-shadow: var(--shadow-md);
    overflow: hidden;
}

.api-section-header {
    padding: 24px 30px;
    background: linear-gradient(to right, #f8f9fa, #ffffff);
    border-bottom: 1px solid var(--border-color);
}

.api-section-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
}

.api-section-title .method {
    font-size: 0.9rem;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: var(--radius-sm);
    margin-right: 12px;
    color: white;
    background-color: var(--primary-color);
}

.api-section-title .method.get {
    background-color: var(--info-color);
}

.api-section-title .method.post {
    background-color: var(--success-color);
}

.api-section-title .method.put {
    background-color: var(--warning-color);
}

.api-section-title .method.delete {
    background-color: var(--error-color);
}

.api-section-description {
    color: var(--gray-color);
    margin-bottom: 16px;
}

.api-endpoint {
    font-family: 'Courier New', monospace;
    background-color: #f1f5f9;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    color: var(--dark-color);
    overflow-x: auto;
    white-space: nowrap;
    margin-bottom: 16px;
}

.api-endpoint .domain {
    color: var(--gray-color);
}

.api-endpoint .path {
    color: var(--dark-color);
    font-weight: 600;
}

.api-endpoint .param {
    color: var(--primary-color);
}

.api-endpoint .required {
    color: var(--error-color);
    font-weight: bold;
}

.api-content {
    padding: 30px;
}

.api-params-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 30px;
    font-size: 0.95rem;
}

.api-params-table th {
    text-align: left;
    padding: 12px 16px;
    background-color: #f8fafc;
    border-bottom: 2px solid var(--border-color);
    color: var(--dark-color);
    font-weight: 600;
}

.api-params-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
    color: var(--dark-color);
}

.api-params-table tr:last-child td {
    border-bottom: none;
}

.param-name {
    font-weight: 600;
    font-family: 'Courier New', monospace;
}

.param-required {
    display: inline-block;
    font-size: 0.75rem;
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    background-color: var(--error-color);
    color: white;
    margin-left: 8px;
    vertical-align: middle;
}

.param-optional {
    display: inline-block;
    font-size: 0.75rem;
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    background-color: var(--gray-color);
    color: white;
    margin-left: 8px;
    vertical-align: middle;
}

.param-type {
    color: var(--gray-color);
    font-size: 0.85rem;
    font-family: 'Courier New', monospace;
}

/* Code tabs */
.code-tabs {
    margin-top: 30px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.code-tabs-header {
    display: flex;
    overflow-x: auto;
    background-color: #f8fafc;
    border-bottom: 1px solid var(--border-color);
    position: relative;
}

.code-tab-btn {
    padding: 12px 20px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--gray-color);
    background: transparent;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
    position: relative;
}

.code-tab-btn:hover {
    color: var(--primary-color);
}

.code-tab-btn.active {
    color: var(--primary-color);
    font-weight: 600;
}

.code-tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: var(--primary-color);
}

.code-tab-content {
    display: none;
    padding: 0;
    background-color: #272822;
    border-radius: 0 0 var(--radius-md) var(--radius-md);
}

.code-tab-content.active {
    display: block;
}

.code-tab-content pre {
    margin: 0;
    padding: 20px;
    overflow-x: auto;
    font-family: 'Fira Code', 'Courier New', monospace;
    font-size: 0.9rem;
    line-height: 1.5;
}

.code-tab-content code {
    font-family: inherit;
}

/* Response section */
.response-section {
    margin-top: 30px;
}

.response-title {
    font-size: 1.2rem;
    margin-bottom: 15px;
    color: #333;
}

.response-example {
    background-color: #f8f9fa;
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 20px;
}

.response-example h4 {
    font-size: 1.1rem;
    margin-bottom: 15px;
    color: #333;
}

.response-example pre {
    margin: 0;
    padding: 20px;
    overflow-x: auto;
    font-family: 'Fira Code', 'Courier New', monospace;
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Status codes */
.status-code {
    display: inline-block;
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 600;
    margin-right: 8px;
}

.status-200 {
    background-color: rgba(16, 185, 129, 0.1);
    color: var(--success-color);
}

.status-400 {
    background-color: rgba(245, 158, 11, 0.1);
    color: var(--warning-color);
}

/* Transaction Status Badges */
.status-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
}

.status-badge.success {
    background-color: #d4edda;
    color: #155724;
}

.status-badge.pending {
    background-color: #fff3cd;
    color: #856404;
}

.status-badge.failed {
    background-color: #f8d7da;
    color: #721c24;
}

.status-badge.rejected {
    background-color: #f1ddf1;
    color: #5a1c5a;
}

.status-badge.hold {
    background-color: #d6d8db;
    color: #383d41;
}

.status-500 {
    background-color: rgba(239, 68, 68, 0.1);
    color: var(--error-color);
}

/* Responsive */
@media (max-width: 768px) {
    .api-docs-title {
        font-size: 2rem;
    }
    
    .api-section-header {
        padding: 20px;
    }
    
    .api-content {
        padding: 20px;
    }
    
    .api-params-table th,
    .api-params-table td {
        padding: 10px;
    }
    
    .code-tab-btn {
        padding: 10px 15px;
        font-size: 0.85rem;
    }
}

/* Copy button */
.copy-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: var(--radius-sm);
    color: #ffffff;
    padding: 5px 10px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: var(--transition);
    opacity: 0.7;
}

.copy-btn:hover {
    opacity: 1;
    background-color: rgba(255, 255, 255, 0.2);
}

.code-container {
    position: relative;
}

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

.api-section {
    animation: fadeIn 0.5s ease forwards;
}

.api-section:nth-child(2) {
    animation-delay: 0.1s;
}

.api-section:nth-child(3) {
    animation-delay: 0.2s;
}

.api-section:nth-child(4) {
    animation-delay: 0.3s;
}

.api-section:nth-child(5) {
    animation-delay: 0.4s;
}
