/* Layout System for Go Links Application */

/* Main content centering with 5% margins on each side */
.main-content {
    max-width: 90%;
    /* 100% - 5% left - 5% right */
    margin: 0 auto;
    padding: 0 1rem;
    /* Additional padding for mobile */
    padding-bottom: 2em !important;
    /* Added 2em padding between content and footer */
}

/* Responsive adjustments for main content */
@media (min-width: 640px) {
    .main-content {
        padding: 0 1.5rem;
    }
}

@media (min-width: 768px) {
    .main-content {
        padding: 0 1.5rem;
    }
}

@media (min-width: 1024px) {
    .main-content {
        padding: 0 2rem;
    }
}

@media (min-width: 1280px) {
    .main-content {
        padding: 0;
    }
}

/* Navigation content follows same pattern */
.nav-content {
    max-width: 90%;
    margin: 0 auto;
    padding: 0 1rem;
}

@media (min-width: 640px) {
    .nav-content {
        padding: 0 1.5rem;
    }
}

@media (min-width: 768px) {
    .nav-content {
        padding: 0 1.5rem;
    }
}

@media (min-width: 1024px) {
    .nav-content {
        padding: 0 2rem;
    }
}

@media (min-width: 1280px) {
    .nav-content {
        padding: 0;
    }
}

/* Page layout with sticky footer */
.page-layout {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.page-content {
    flex: 1;
}

/* Footer styles */
.footer {
    margin-top: auto;
    background-color: white;
    border-top: 1px solid #e5e7eb;
}

.dark .footer {
    background-color: #1f2937;
    border-top-color: #374151;
}

/* Footer component specific styles */
.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 768px) {
    .footer-grid {
        grid-template-columns: 2fr 1fr 1fr;
        gap: 3rem;
    }
}

/* Footer links hover effects */
.footer-link {
    transition: color 0.2s ease-in-out;
}

.footer-link:hover {
    color: #2563eb;
}

.dark .footer-link:hover {
    color: #60a5fa;
}

/* Status indicator animation */
.status-indicator {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: .7;
    }
}

/* Main content sections with proper spacing */
.content-section {
    margin-bottom: 1.5rem;
}

.content-section-tight {
    margin-top: 0;
    margin-bottom: 0;
}

.content-section:last-child {
    margin-bottom: 0;
}

/* Dark mode transitions */
.dark-mode-transition {
    transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out, border-color 0.2s ease-in-out;
}

/* Ensure cards and components respect the layout */
.card-container {
    width: 100%;
    max-width: none;
}

/* Override specific Tailwind max-width classes when needed */
.main-content .max-w-screen-xl {
    max-width: 100%;
}

/* Responsive table containers */
.table-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Form responsive adjustments */
.form-container {
    width: 100%;
    max-width: none;
}

/* Mobile-first responsive design helpers */
.mobile-hidden {
    display: none;
}

@media (min-width: 768px) {
    .mobile-hidden {
        display: block;
    }

    .desktop-hidden {
        display: none;
    }
}

/* Utility classes for consistent spacing */
.section-spacing {
    margin-bottom: 2rem;
}

.section-spacing:last-child {
    margin-bottom: 0;
}

/* Better responsive handling for complex layouts */
.responsive-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .responsive-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
}

@media (min-width: 1024px) {
    .responsive-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 2rem;
    }
}

/* Consistent padding for page sections */
.page-section {
    padding: 1rem;
}

@media (min-width: 768px) {
    .page-section {
        padding: 1.5rem;
    }
}

@media (min-width: 1024px) {
    .page-section {
        padding: 2rem;
    }
}

/* Fix for tables that might overflow */
.overflow-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
}

/* Ensure proper spacing between navigation and content */
.nav-spacer {
    height: 1rem;
}

@media (min-width: 768px) {
    .nav-spacer {
        height: 1.5rem;
    }
}
