/**
 * Global Footer Styles
 *
 * Styles for the global footer component used across all pages
 */

/* Footer base styles */
.footer {
    background: var(--wsu-brand-footer, #392f2c) !important;
    color: white;
}

/* Footer logo styling */
.footer-logo {
    height: 6rem; /* h-24 equivalent — bumped so max-height in bigger-logos.css is the effective cap */
    width: auto;
    margin: 0 auto;
    transition: opacity 0.3s ease;
}

.footer-logo:hover {
    opacity: 0.8;
}

/* Footer social icon styles - Simple monochrome */
footer a[href*="instagram.com"],
footer a[href*="facebook.com"] {
    background: none !important;
    border: none !important;
    color: #9ca3af !important;
    padding: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    transition: color 0.2s ease;
}

footer a[href*="instagram.com"]:hover,
footer a[href*="facebook.com"]:hover {
    background: none !important;
    border: none !important;
    color: white !important;
    transform: none !important;
    box-shadow: none !important;
}

/* Email link styling */
footer a[href^="mailto:"] {
    color: #9ca3af;
    transition: color 0.2s ease;
}

footer a[href^="mailto:"]:hover {
    color: white;
}

/* Focus ring for accessibility */
.focus-ring:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
    border-radius: 4px;
}

/* Footer brand colors */
.brand-footer {
    background-color: var(--wsu-brand-footer, #392f2c);
}

.brand-footer-50 { background-color: #f7f6f6; }
.brand-footer-100 { background-color: #efeded; }
.brand-footer-200 { background-color: #dedada; }
.brand-footer-300 { background-color: #cec8c7; }
.brand-footer-400 { background-color: #bdb5b4; }
.brand-footer-500 { background-color: var(--wsu-brand-footer, #392f2c); }
.brand-footer-600 { background-color: #2a1f1c; }
.brand-footer-700 { background-color: #221816; }
.brand-footer-800 { background-color: #1a1210; }
.brand-footer-900 { background-color: #120c0a; }

/* Responsive adjustments */
@media (max-width: 768px) {
    .footer {
        padding-top: 2rem;
        padding-bottom: 2rem;
    }

    .footer-logo {
        height: 5rem; /* Bumped from 4rem — mobile max-height in bigger-logos.css caps it */
    }

    footer .flex.justify-center.space-x-6 {
        gap: 1rem; /* Reduce spacing on mobile */
    }

    footer .grid.grid-cols-1.gap-8 {
        gap: 1.5rem; /* Reduce gap on mobile */
    }
}

@media (max-width: 480px) {
    footer .text-gray-300.mb-6 {
        font-size: 0.875rem; /* Smaller text on very small screens */
        line-height: 1.5;
    }

    footer .w-8.h-8 {
        width: 1.75rem;
        height: 1.75rem;
    }
}

/* Dark theme adjustments (if needed) */
@media (prefers-color-scheme: dark) {
    .footer {
        background: var(--wsu-brand-footer, #392f2c) !important;
    }
}

/* Loading state styles */
.footer-loading {
    background: var(--wsu-brand-footer, #392f2c);
    color: white;
    padding: 2rem 1rem;
    text-align: center;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.footer-loading::after {
    content: "Loading footer...";
    opacity: 0.6;
    font-size: 0.875rem;
}

/* Fallback footer styles */
.footer-fallback {
    background: var(--wsu-brand-footer, #392f2c);
    color: white;
    padding: 2rem 1rem;
    text-align: center;
    border-top: 1px solid #4a4a4a;
}

/* Animation for footer injection */
.footer {
    animation: fadeInFooter 0.5s ease-in;
}

@keyframes fadeInFooter {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Ensure footer stays at bottom */
#footer-container,
#global-footer,
.footer-placeholder {
    position: relative;
    z-index: 10;
    width: 100%;
}

/* Social media hover effects */
footer a[href*="instagram.com"] svg,
footer a[href*="facebook.com"] svg,
footer a[href^="mailto:"] svg {
    transition: transform 0.2s ease;
}

footer a[href*="instagram.com"]:hover svg,
footer a[href*="facebook.com"]:hover svg,
footer a[href^="mailto:"]:hover svg {
    transform: scale(1.1);
}

/* Print styles */
@media print {
    .footer {
        background: white !important;
        color: black !important;
        border-top: 2px solid #000;
    }

    footer a[href*="instagram.com"],
    footer a[href*="facebook.com"],
    footer a[href^="mailto:"] {
        color: black !important;
    }

    footer svg {
        display: none;
    }

    footer a[href*="instagram.com"]::after {
        content: " (Instagram)";
    }

    footer a[href*="facebook.com"]::after {
        content: " (Facebook)";
    }

    footer a[href^="mailto:"]::after {
        content: " (Email)";
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .footer {
        background: #000 !important;
        color: #fff !important;
        border-top: 3px solid #fff;
    }

    footer a[href*="instagram.com"],
    footer a[href*="facebook.com"],
    footer a[href^="mailto:"] {
        color: #fff !important;
        border: 1px solid #fff;
        padding: 0.25rem;
    }

    footer a[href*="instagram.com"]:hover,
    footer a[href*="facebook.com"]:hover,
    footer a[href^="mailto:"]:hover {
        background: #fff !important;
        color: #000 !important;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .footer {
        animation: none;
    }

    footer a[href*="instagram.com"] svg,
    footer a[href*="facebook.com"] svg,
    footer a[href^="mailto:"] svg {
        transition: none;
    }

    footer a[href*="instagram.com"]:hover svg,
    footer a[href*="facebook.com"]:hover svg,
    footer a[href^="mailto:"]:hover svg {
        transform: none;
    }

    .footer-logo {
        transition: none;
    }
}