/* ================================================================
   SITE FOOTER STYLES - LottoMuse
   Responsive semantic footer with organized link sections
   ================================================================ */

/* ===== FOOTER BASE ===== */
.site-footer {
    background: var(--gradient-primary);
    color: var(--text-white);
    padding: var(--spacing-xl) 0 var(--spacing-lg);
    margin-top: auto;
    position: relative;
    /* Ensure footer appears above floating-chat-input (z-index: 1051) */
    z-index: 1052;
}

.site-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-accent);
}

/* ===== FOOTER CONTAINER ===== */
.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
}

/* ===== FOOTER GRID LAYOUT ===== */
.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--spacing-xl);
}

/* ===== FOOTER SECTIONS ===== */
.footer-section {
    display: flex;
    flex-direction: column;
}

.footer-section-title {
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-semibold);
    margin-bottom: var(--spacing-md);
    color: var(--text-white);
    position: relative;
    padding-bottom: var(--spacing-sm);
}

.footer-section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background: var(--accent-teal);
    border-radius: 1px;
}

/* ===== FOOTER NAVIGATION LISTS ===== */
.footer-nav {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-nav li {
    margin-bottom: var(--spacing-sm);
}

.footer-nav a {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    font-size: var(--font-size-sm);
    transition: var(--transition-fast);
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.footer-nav a:hover {
    color: var(--accent-teal);
    transform: translateX(4px);
}

.footer-nav a i {
    font-size: 0.875em;
    width: 16px;
    text-align: center;
}

/* Footer navigation button (for modal triggers) */
.footer-nav-button {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    font-size: var(--font-size-sm);
    transition: var(--transition-fast);
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-sm);
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    font-family: inherit;
}

.footer-nav-button:hover {
    color: var(--accent-teal);
    transform: translateX(4px);
}

.footer-nav-button i {
    font-size: 0.875em;
    width: 16px;
    text-align: center;
}

/* ===== FOOTER BRAND SECTION ===== */
.footer-brand {
    display: flex;
    flex-direction: column;
}

.footer-brand-logo {
    /* Bootstrap d-flex align-items-end classes are applied in HTML for responsiveness */
    gap: 12px; /* Slightly tighter gap for better visual cohesion */
    margin-bottom: var(--spacing-md);
}

.footer-brand-logo .lottery-ball {
    /* Red footer ball: 25% smaller than the yellow header ball (56px * 0.75 = 42px) */
    width: 42px;
    height: 42px;
    margin-right: 0; /* Remove default margin since we use gap */
    flex-shrink: 0;
    
    /* Match yellow ball border and shadow effects */
    border: 3px solid rgba(255, 255, 255, 0.9);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2),
               inset 0 -3px 8px rgba(0, 0, 0, 0.3),
               inset 0 3px 12px rgba(255, 255, 255, 0.4);
}

.footer-brand-logo .lottery-ball .ball-number {
    /* Scale the number to match the smaller ball (22px * 0.75 = 16.5px) */
    font-size: 16.5px;
    font-weight: 900;
}

.footer-brand-name {
    font-size: 1.5rem;
    font-weight: var(--font-weight-bold);
    color: var(--text-white);
    margin: 0;
}

.footer-brand-tagline {
    color: rgba(255, 255, 255, 0.75);
    font-size: var(--font-size-sm);
    margin-bottom: var(--spacing-md);
    line-height: var(--line-height-base);
}

/* ===== SOCIAL LINKS ===== */
.footer-social {
    display: none; /* Hidden until social media accounts are set up */
    gap: var(--spacing-sm);
    margin-top: var(--spacing-sm);
}

.footer-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-round);
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-white);
    text-decoration: none;
    transition: var(--transition-smooth);
}

.footer-social a:hover {
    background: var(--accent-teal);
    color: var(--primary-blue);
    transform: translateY(-3px);
}

/* ===== FOOTER BOTTOM BAR ===== */
.footer-bottom {
    margin-top: var(--spacing-xl);
    padding-top: var(--spacing-lg);
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--spacing-md);
}

.footer-copyright {
    color: rgba(255, 255, 255, 0.7);
    font-size: var(--font-size-sm);
    margin: 0;
}

.footer-legal-links {
    display: flex;
    gap: var(--spacing-lg);
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-legal-links a {
    color: rgba(255, 255, 255, 0.7);
    font-size: var(--font-size-sm);
    text-decoration: none;
    transition: var(--transition-fast);
}

.footer-legal-links a:hover {
    color: var(--accent-teal);
}

/* ===== RESPONSIVE DESIGN ===== */

/* Tablet */
@media (max-width: 991px) {
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-lg);
    }
    
    .footer-brand {
        grid-column: span 2;
    }
}

/* Mobile - keep red ball 25% smaller than header at common breakpoints */
@media (max-width: 768px) {
    /* Header uses 48px at this breakpoint -> footer should be 36px (48 * 0.75) */
    .footer-brand-logo .lottery-ball {
        width: 36px;
        height: 36px;
    }
    
    .footer-brand-logo .lottery-ball .ball-number {
        font-size: 13.5px; /* 18px * 0.75 = 13.5px */
    }
}

@media (max-width: 480px) {
    /* Header uses 40px -> footer should be 30px */
    .footer-brand-logo .lottery-ball {
        width: 30px;
        height: 30px;
    }

    .footer-brand-logo .lottery-ball .ball-number {
        font-size: 12px; /* 16px * 0.75 = 12px */
    }
}

/* Mobile */
@media (max-width: 576px) {
    .site-footer {
        padding: var(--spacing-lg) 0 var(--spacing-md);
    }
    
    .footer-container {
        padding: 0 var(--spacing-md);
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }
    
    .footer-brand {
        grid-column: span 1;
        text-align: center;
        align-items: center;
    }
    
    .footer-section {
        text-align: center;
        align-items: center;
    }
    
    .footer-section-title::after {
        left: 50%;
        transform: translateX(-50%);
    }
    
    .footer-nav a {
        justify-content: center;
    }
    
    .footer-nav a:hover {
        transform: translateY(-2px);
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-legal-links {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .footer-social {
        justify-content: center;
    }
}

/* ===== STICKY FOOTER SUPPORT ===== */
/* Already handled by Bootstrap d-flex flex-column min-vh-100 on body */
/* and mt-auto on footer, but adding explicit support */

html, body {
    height: 100%;
}

body {
    display: flex;
    flex-direction: column;
}

.site-footer {
    flex-shrink: 0;
}

/* ===== MOBILE SCROLL-TO-CHAT INDICATOR ===== */
/* Purple upward arrows - decorative background element in chat container */
.scroll-to-chat-indicator {
    display: none; /* Hidden by default - only shown on mobile */
}

@media (max-width: 576px) {
    .scroll-to-chat-indicator {
        display: flex;
        justify-content: center;
        align-items: center;
        position: absolute;
        bottom: 0;
        left: 50%;
        transform: translate(-50%, 0.5rem);
        background: transparent;
        z-index: -1; /* Negative z-index to ensure it's behind floating chat input */
        pointer-events: none;
        user-select: none;
    }
    
    .scroll-arrows-icon {
        width: 192px;
        height: 192px;
        color: var(--primary-purple, #5B3E90);
        filter: drop-shadow(0 4px 8px rgba(91, 62, 144, 0.4));
    }
}
