/* Custom styles for Sharely API Documentation */

/* Loading styles */
.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-family: 'Inter', sans-serif;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

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

.loading-container p {
    font-size: 16px;
    margin: 0;
    opacity: 0.9;
}

/* Error styles */
.error-container {
    text-align: center;
    padding: 40px;
    max-width: 600px;
    margin: 0 auto;
}

.error-container h2 {
    color: #ef4444;
    margin-bottom: 16px;
}

.error-details {
    font-family: monospace;
    background: #f3f4f6;
    padding: 12px;
    border-radius: 6px;
    color: #6b7280;
    font-size: 14px;
    margin-top: 16px;
}

/* Copy button styles */
.copy-button {
    position: absolute;
    top: 8px;
    right: 8px;
    background: #374151;
    color: white;
    border: none;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s ease;
    z-index: 10;
}

pre:hover .copy-button {
    opacity: 1;
}

.copy-button:hover {
    background: #4b5563;
}

/* Scroll to top button */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: #2563eb;
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    display: none;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
    transition: all 0.3s ease;
}

.scroll-to-top:hover {
    background: #1d4ed8;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.4);
}

/* Responsive design for custom elements */
@media (max-width: 768px) {
    .scroll-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
        font-size: 18px;
    }
    
    .copy-button {
        opacity: 1;
    }
}

@media (max-width: 480px) {
    .loading-container {
        padding: 20px;
    }
}

/* Print styles */
@media print {
    .scroll-to-top,
    .copy-button {
        display: none !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .copy-button {
        border: 2px solid #000;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .loading-spinner {
        animation: none;
    }
    
    .scroll-to-top {
        transition: none;
    }
    
    .copy-button {
        transition: none;
    }
}
