/*
==============================================
 File:        api_docs.css
 Author:      Irfan Gedik
 Created:     27.09.2025
 Last Update: 27.09.2025
 Version:     1.0

 Description:
   USDTgVerse API Documentation Styles
   Responsive design for API documentation

 License:
   MIT License
==============================================
*/

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #2c3e50;
    background: #f8f9fa;
    min-height: 100vh;
}

/* Header Styles */
.api-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand-section {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.brand-logo {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.brand-info h1 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.brand-subtitle {
    font-size: 0.9rem;
    opacity: 0.9;
}

.api-version {
    text-align: right;
}

.version-label {
    display: block;
    font-size: 0.8rem;
    opacity: 0.8;
}

.version-number {
    font-size: 1.1rem;
    font-weight: 700;
    color: #ffd700;
}

/* Navigation Styles */
.api-nav {
    background: white;
    border-bottom: 1px solid #e9ecef;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-item {
    position: relative;
}

.nav-link {
    display: block;
    padding: 1rem 0;
    color: #6c757d;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    border-bottom: 3px solid transparent;
}

.nav-link:hover,
.nav-item.active .nav-link {
    color: #667eea;
    border-bottom-color: #667eea;
}

/* Main Content */
.api-main {
    padding: 2rem 0;
}

.api-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

.api-section {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    border: 1px solid #e9ecef;
}

.section-title {
    font-size: 1.75rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid #667eea;
    padding-bottom: 0.5rem;
}

.section-content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.api-description {
    font-size: 1.1rem;
    color: #6c757d;
    line-height: 1.8;
}

/* API Features */
.api-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.feature-card {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1.5rem;
    border: 1px solid #e9ecef;
    text-align: center;
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.feature-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.feature-description {
    color: #6c757d;
    font-size: 0.9rem;
}

/* API Endpoints */
.api-endpoints {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1.5rem;
    border: 1px solid #e9ecef;
}

.endpoints-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 1rem;
}

.endpoint-url {
    background: #2c3e50;
    color: white;
    padding: 1rem;
    border-radius: 6px;
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

.rate-limits {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.rate-limit {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: white;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

.limit-tier {
    font-weight: 600;
    color: #2c3e50;
}

.limit-requests {
    color: #6c757d;
    font-size: 0.9rem;
}

/* API Endpoint Cards */
.api-endpoint {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1.5rem;
    border: 1px solid #e9ecef;
    margin-bottom: 1.5rem;
}

.endpoint-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.http-method {
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
}

.http-method.get {
    background: #d4edda;
    color: #155724;
}

.http-method.post {
    background: #d1ecf1;
    color: #0c5460;
}

.http-method.put {
    background: #fff3cd;
    color: #856404;
}

.http-method.delete {
    background: #f8d7da;
    color: #721c24;
}

.endpoint-path {
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 1rem;
    color: #2c3e50;
    font-weight: 600;
}

.endpoint-description {
    color: #6c757d;
    margin-bottom: 1rem;
}

.endpoint-example {
    margin-top: 1rem;
}

.endpoint-example h4 {
    font-size: 1rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

/* Code Blocks */
.code-block {
    background: #2c3e50;
    color: #f8f9fa;
    border-radius: 6px;
    padding: 1rem;
    overflow-x: auto;
    margin: 1rem 0;
}

.code-block pre {
    margin: 0;
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 0.9rem;
    line-height: 1.5;
}

.code-block code {
    color: #f8f9fa;
}

/* Authentication Methods */
.auth-methods {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 1.5rem;
}

.auth-method {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1.5rem;
    border: 1px solid #e9ecef;
}

.method-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 1rem;
}

/* Webhook Events */
.webhook-events {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.webhook-event {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1rem;
    border: 1px solid #e9ecef;
}

.event-title {
    font-size: 1rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.5rem;
    font-family: 'Monaco', 'Menlo', monospace;
}

.event-description {
    color: #6c757d;
    font-size: 0.9rem;
}

/* Example Tabs */
.example-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.tab-btn {
    padding: 0.75rem 1.5rem;
    border: 1px solid #ced4da;
    background: white;
    color: #6c757d;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    font-weight: 500;
}

.tab-btn:hover,
.tab-btn.active {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.example-content {
    position: relative;
}

.tab-content {
    display: none;
}

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

/* Footer */
.api-footer {
    background: #2c3e50;
    color: white;
    padding: 2rem 0;
    margin-top: 2rem;
}

.footer-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h4 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #ffd700;
}

.footer-section p {
    color: #bdc3c7;
    margin-bottom: 1rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: #bdc3c7;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section ul li a:hover {
    color: #667eea;
}

.footer-bottom {
    border-top: 1px solid #34495e;
    padding-top: 1rem;
    text-align: center;
    color: #bdc3c7;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        gap: 1rem;
        padding: 0 1rem;
        text-align: center;
    }
    
    .nav-container {
        padding: 0 1rem;
    }
    
    .nav-menu {
        flex-direction: column;
        gap: 0;
    }
    
    .nav-link {
        padding: 0.75rem 0;
        border-bottom: 1px solid #e9ecef;
    }
    
    .api-container {
        padding: 0 1rem;
    }
    
    .api-section {
        padding: 1.5rem;
    }
    
    .api-features {
        grid-template-columns: 1fr;
    }
    
    .rate-limits {
        grid-template-columns: 1fr;
    }
    
    .auth-methods {
        grid-template-columns: 1fr;
    }
    
    .webhook-events {
        grid-template-columns: 1fr;
    }
    
    .example-tabs {
        flex-direction: column;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .header-container {
        padding: 0 0.5rem;
    }
    
    .brand-section {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }
    
    .brand-logo {
        width: 40px;
        height: 40px;
    }
    
    .brand-info h1 {
        font-size: 1.25rem;
    }
    
    .nav-container {
        padding: 0 0.5rem;
    }
    
    .api-container {
        padding: 0 0.5rem;
    }
    
    .api-section {
        padding: 1rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .endpoint-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .code-block {
        padding: 0.75rem;
        font-size: 0.8rem;
    }
    
    .footer-container {
        padding: 0 0.5rem;
    }
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
}

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: block;
    }
    
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
        padding: 1rem;
    }
    
    .nav-menu.active {
        display: flex;
        flex-direction: column;
    }
}

/* Loading States */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Success/Error States */
.alert {
    padding: 1rem;
    border-radius: 6px;
    margin-bottom: 1rem;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Tooltips */
.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip .tooltiptext {
    visibility: hidden;
    width: 120px;
    background-color: #555;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 5px 0;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    margin-left: -60px;
    opacity: 0;
    transition: opacity 0.3s;
}

.tooltip:hover .tooltiptext {
    visibility: visible;
    opacity: 1;
}
