/**
 * Apex eCampus Minimal Footer Styles
 * A clean, small, and modern footer design
 */

/* ============================================
   MAIN FOOTER CONTAINER
   ============================================ */
.apex-footer {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0;
    margin-top: auto;
    position: relative;
}

/* Subtle top accent line */
.apex-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6, #ec4899, #3b82f6);
    background-size: 200% 100%;
    animation: gradientShift 8s ease-in-out infinite;
}

@keyframes gradientShift {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

/* ============================================
   FOOTER INNER WRAPPER
   ============================================ */
.apex-footer-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1rem 2rem;
}

/* ============================================
   FOOTER CONTENT LAYOUT
   ============================================ */
.apex-footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

/* ============================================
   LEFT SECTION - BRAND & COPYRIGHT
   ============================================ */
.apex-footer-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.apex-footer-brand {
    font-weight: 600;
    font-size: 0.9rem;
    color: #f8fafc;
    letter-spacing: 0.5px;
}

.apex-footer-separator {
    color: #475569;
    font-weight: 300;
}

.apex-footer-copyright {
    font-size: 0.8rem;
    color: #94a3b8;
}

/* ============================================
   RIGHT SECTION - LINKS & INFO
   ============================================ */
.apex-footer-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.apex-footer-link,
.apex-footer-link a {
    font-size: 0.8rem;
    color: #94a3b8;
    text-decoration: none;
    transition: color 0.2s ease;
}

.apex-footer-link a:hover {
    color: #3b82f6;
}

.apex-footer-login-info {
    font-size: 0.8rem;
    color: #64748b;
}

.apex-footer-login-info a {
    color: #94a3b8;
    text-decoration: none;
    transition: color 0.2s ease;
}

.apex-footer-login-info a:hover {
    color: #3b82f6;
}

/* ============================================
   HIDE STANDARD MOODLE FOOTER ELEMENTS
   ============================================ */
.apex-footer .tool_usertours-resettourcontainer,
.apex-footer .logininfo {
    display: none;
}

/* Style any remaining standard footer HTML */
.apex-footer-inner > div:not(.apex-footer-content):not(.footer-content-debugging) {
    font-size: 0.75rem;
    color: #64748b;
    text-align: center;
    padding-top: 0.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    margin-top: 0.75rem;
}

.apex-footer-inner a {
    color: #94a3b8;
    text-decoration: none;
    transition: color 0.2s ease;
}

.apex-footer-inner a:hover {
    color: #3b82f6;
}

/* ============================================
   DEBUGGING FOOTER (DEVELOPMENT MODE)
   ============================================ */
.apex-footer .footer-content-debugging {
    padding: 0.5rem 1rem;
    font-size: 0.75rem;
}

.apex-footer .footer-content-debugging:empty {
    display: none;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 768px) {
    .apex-footer-inner {
        padding: 1rem;
    }

    .apex-footer-content {
        flex-direction: column;
        text-align: center;
        gap: 0.75rem;
    }

    .apex-footer-left,
    .apex-footer-right {
        justify-content: center;
    }

    .apex-footer-separator {
        display: none;
    }

    .apex-footer-left {
        flex-direction: column;
        gap: 0.25rem;
    }
}

/* ============================================
   ACCESSIBILITY - REDUCED MOTION
   ============================================ */
@media (prefers-reduced-motion: reduce) {
    .apex-footer::before {
        animation: none;
        background: #3b82f6;
    }
}

/* ============================================
   OVERRIDE OLD FOOTER POPOVER STYLES
   ============================================ */
#page-footer.footer-popover {
    background: none;
}

#page-footer .btn-footer-popover,
#page-footer .btn-footer-communication,
#page-footer [data-region="footer-container-popover"],
#page-footer [data-region="footer-content-popover"] {
    display: none !important;
}
