/* ====================================
   MAIN.CSS - Main import file
   LLM API Control Dashboard Styles
   ==================================== */

/* Import all CSS modules in correct order */

/* 1. Base styles and resets */
@import url('base.css');

/* 2. Reusable components */
@import url('components.css');

/* 3. Layout-specific styles */
@import url('layout.css');

/* 4. Page section styles */
@import url('sections.css');

/* 5. Animations and transitions */
@import url('animations.css');

/* 6. Responsive design */
@import url('responsive.css');

/* 7. Utility classes */
@import url('utilities.css');

/* ====================================
   Custom overrides and fixes
   ==================================== */

/* Any project-specific overrides can go here */

/* ====================================
   Authentication Methods Styling
   ==================================== */
.auth-methods {
    display: flex;
    width: 100%;
    flex-direction: column;
    gap: 12px;
}

.telegram-auth-widget {
    display: flex;
    min-height: 44px;
    align-items: center;
    justify-content: center;
}

.telegram-auth-widget iframe {
    width: 100% !important;
    max-width: 280px !important;
    border-radius: 8px !important;
}

/* Ensure both auth buttons have consistent styling */
.ya-btn, .telegram-auth-widget {
    width: 100%;
    max-width: 280px;
    margin: 0 auto;
}

/* Ensure proper box-sizing inheritance */
*,
*::before,
*::after {
    box-sizing: inherit;
}

html {
    box-sizing: border-box;
}

/* Custom scrollbar for webkit browsers */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--scrollbar-track);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: var(--scrollbar-thumb);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--scrollbar-thumb-hover);
}

/* Firefox scrollbar */
* {
    scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
    scrollbar-width: thin;
}

/* Focus styles for accessibility */
*:focus-visible {
    outline: 2px solid var(--accent-primary);
    outline-offset: 2px;
}

/* Remove focus outline for mouse users */
*:focus:not(:focus-visible) {
    outline: none;
}

/* Ensure text remains readable during webfont load */
@font-face {
    font-display: swap;
}

/* Print optimizations */
@page {
    margin: 1in;
}

/* Dark mode optimizations */
@media (prefers-color-scheme: dark) {
    /* Additional dark mode specific styles if needed */
}

/* Light mode fallback */
@media (prefers-color-scheme: light) {
    /* Light mode styles if implementing theme switching */
}

/* ====================================
   Footer Styles
   ==================================== */
.site-footer {
    margin-top: auto;
    padding: 60px 0 20px;
    color: var(--text-primary);
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
    border-top: 1px solid rgba(139, 92, 246, 0.2);
}

.footer-content {
    display: grid;
    margin-bottom: 40px;
    grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
    gap: 40px;
}

.footer-section {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.footer-brand {
    max-width: 300px;
}

.footer-logo {
    display: flex;
    margin-bottom: 16px;
    align-items: center;
    gap: 12px;
}

.footer-logo-img {
    width: 32px;
    height: 32px;
}

.footer-logo-text {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

.footer-description {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-secondary);
}

.footer-section-title {
    margin-bottom: 8px;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.footer-links {
    display: flex;
    margin: 0;
    padding: 0;
    flex-direction: column;
    gap: 8px;
    list-style: none;
}

.footer-links a {
    font-size: 14px;
    text-decoration: none;
    color: var(--text-secondary);
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: var(--accent-primary);
}

.footer-bottom {
    display: flex;
    padding-top: 20px;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid var(--border-secondary);
}

.footer-copyright p {
    margin: 0;
    font-size: 13px;
    color: var(--text-tertiary);
}

.footer-social {
    display: flex;
    gap: 16px;
}

/* Ensure pages using base.html have proper layout for sticky footer */
html {
    min-height: 100vh;
}

/* For pages that extend base.html, ensure proper flex layout */
body:not(.landing-page) {
    display: flex;
    min-height: 100vh;
    flex-direction: column;
}

/* Make content area flexible for dashboard pages while maintaining max-width consistency */
body:not(.landing-page) .container {
    max-width: 1200px;
    margin: 0 auto;
    flex: 1;
}

/* Responsive footer */
@media (max-width: 1024px) {
    .footer-content {
        grid-template-columns: 2fr 1fr 1fr;
        gap: 30px;
    }

    .footer-section:nth-child(4),
    .footer-section:nth-child(5) {
        display: grid;
        grid-template-columns: 1fr 1fr;
        grid-column: 2 / 4;
        gap: 30px;
    }
}

@media (max-width: 768px) {
    .site-footer {
        padding: 40px 0 20px;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .footer-section:nth-child(4),
    .footer-section:nth-child(5) {
        display: flex;
        flex-direction: column;
        gap: 16px;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .site-footer {
        padding: 30px 0 15px;
    }

    .footer-content {
        gap: 24px;
    }

    .footer-logo {
        justify-content: center;
    }

    .footer-brand {
        max-width: none;
        text-align: center;
    }
}