/**
 * Footer Typography and Color Styles
 *
 * This file contains all typography and color styles for the footer.
 * It uses CSS variables for consistent theming and high specificity selectors
 * to ensure styles are applied correctly across the site.
 *
 * @package Codlion
 */

/* Base footer styles */
body .site-footer {
    font-family: var(--main-font);
    font-size: var(--body-font-size);
    line-height: var(--body-line-height);
    font-weight: var(--body-font-weight);
    background-color: var(--footer-background-color);
}

/* Footer main content color */
body .site-footer > div:not(.footer-bottom) {
    color: var(--footer-text-color);
}

/* Direct footer text color override - extremely specific selectors */
body .site-footer > div:not(.footer-bottom),
body .site-footer > div:not(.footer-bottom) p,
body .site-footer > div:not(.footer-bottom) span,
body .site-footer > div:not(.footer-bottom) div,
body .site-footer > div:not(.footer-bottom) h3,
body .site-footer h3.footer-about-title,
body .site-footer h3.footer-policies-title,
body .site-footer h3.footer-social-contact-title,
/* Direct selectors for brand text, menu items, and titles */
body .site-footer .brand-description,
body .site-footer .footer-menu li,
body .site-footer .footer-menu a,
body .site-footer .footer-widget ul li,
body .site-footer .footer-widget ul li a,
body .site-footer .footer-widget .widget-title,
body .site-footer .footer-widget h1,
body .site-footer .footer-widget h2,
body .site-footer .footer-widget h3,
body .site-footer .footer-widget h4,
body .site-footer .footer-widget h5,
body .site-footer .footer-widget h6,
body .site-footer .footer-widget,
body .site-footer .footer-navigation,
body .site-footer .footer-menu,
body .site-footer .footer-menu li,
body .site-footer .footer-menu li a,
body .site-footer .footer-navigation a,
body .site-footer .footer-contact-info,
body .site-footer .footer-contact-info li,
body .site-footer .footer-contact-info a,
body .site-footer .brand-description,
body .site-footer .brand-description p {
    color: var(--footer-text-color) !important;
}

/* Footer headings */
body .site-footer h3,
body .footer-widget h3 {
    font-family: var(--main-font);
    font-size: var(--h6-font-size);
    font-weight: var(--heading-font-weight);
    color: var(--footer-text-color);
    line-height: 1.3;
    margin: 0 0 15px;
    position: relative;
    white-space: nowrap;
}

/* Footer title underline */
body .footer-widget h3::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 60px;
    height: 2px;
    background-color: var(--footer-title-underline-color);
}

/* Footer links - simplified styling */
body .site-footer a,
body .footer-widget a,
body .footer-menu a,
body .footer-widget ul li a {
    color: var(--footer-text-color);
    text-decoration: none;
    transition: text-decoration 0.3s ease;
    font-size: var(--body-font-size);
    line-height: var(--body-line-height);
    font-weight: var(--body-font-weight);
}

/* Footer link hover style - change text to unified accent color on hover */
body .site-footer a:hover,
body .footer-widget a:hover,
body .footer-menu a:hover,
body .footer-widget ul li a:hover,
body .footer-contact-info a:hover,
body .footer-contact-info a:hover i,
body .site-footer a[href^="tel:"]:hover,
body .site-footer a[href^="tel:"]:hover i,
body .site-footer a[href^="tel:"]:hover .fas.fa-phone-alt,
body .site-footer a[href^="mailto:"]:hover,
body .site-footer a[href^="mailto:"]:hover i,
body .site-footer a[href^="mailto:"]:hover .fas.fa-envelope,
body .footer-navigation a:hover,
body .footer-bottom a:hover {
    color: var(--unified-accent-color); /* Change text to accent color on hover */
    text-decoration: underline; /* Add underline for better visual feedback */
}

/* Remove bullets and pseudo-elements from footer menu items - AGGRESSIVE VERSION */
body .footer-widget ul,
body .footer-menu,
body .footer-contact-info ul,
.footer-widget ul,
.footer-menu,
.footer-contact-info ul,
#footer ul,
.site-footer ul {
    list-style: none;
    padding-left: 0;
    margin-left: 0;
}

body .footer-widget ul li,
body .footer-menu li,
body .footer-contact-info li,
.footer-widget ul li,
.footer-menu li,
.footer-contact-info li,
#footer ul li,
.site-footer ul li {
    list-style-type: none;
    list-style-image: none;
    list-style-position: outside;
    display: block;
}

/* Target all possible pseudo-elements */
body .footer-widget ul li::before,
body .footer-widget ul li::after,
body .footer-menu li::before,
body .footer-menu li::after,
body .footer-contact-info li::before,
body .footer-contact-info li::after,
body .footer-widget a::before,
body .footer-widget a::after,
body .footer-menu a::before,
body .footer-menu a::after,
body .footer-contact-info a::before,
body .footer-contact-info a::after,
.footer-widget ul li::before,
.footer-widget ul li::after,
.footer-menu li::before,
.footer-menu li::after,
.footer-contact-info li::before,
.footer-contact-info li::after,
.footer-widget a::before,
.footer-widget a::after,
.footer-menu a::before,
.footer-menu a::after,
.footer-contact-info a::before,
.footer-contact-info a::after,
#footer ul li::before,
#footer ul li::after,
#footer a::before,
#footer a::after,
.site-footer ul li::before,
.site-footer ul li::after,
.site-footer a::before,
.site-footer a::after {
    content: none;
    display: none;
    visibility: hidden;
    opacity: 0;
    width: 0;
    height: 0;
    margin: 0;
    padding: 0;
    text-decoration: none;
}

/* Target hover state specifically */
body .footer-widget ul li:hover::before,
body .footer-widget ul li:hover::after,
body .footer-menu li:hover::before,
body .footer-menu li:hover::after,
body .footer-contact-info li:hover::before,
body .footer-contact-info li:hover::after,
body .footer-widget a:hover::before,
body .footer-widget a:hover::after,
body .footer-menu a:hover::before,
body .footer-menu a:hover::after,
body .footer-contact-info a:hover::before,
body .footer-contact-info a:hover::after,
.footer-widget ul li:hover::before,
.footer-widget ul li:hover::after,
.footer-menu li:hover::before,
.footer-menu li:hover::after {
    content: none;
    display: none;
}

/* Target the specific yellow/green bullet dots */
.site-footer a::before,
.site-footer li::before,
.site-footer .footer-widget a::before,
.site-footer .footer-widget li::before,
.footer-widget a::before,
.footer-widget li::before,
#footer a::before,
#footer li::before,
.site-footer ul a::before,
.site-footer ul li::before,
.footer-widget ul a::before,
.footer-widget ul li::before,
.footer-menu a::before,
.footer-menu li::before,
.footer-contact-info a::before,
.footer-contact-info li::before {
    content: none;
    display: none;
    visibility: hidden;
    opacity: 0;
    width: 0;
    height: 0;
    margin: 0;
    padding: 0;
    background: transparent;
    border: none;
    color: transparent;
    text-decoration: none;
    box-shadow: none;
    background-image: none;
    background-color: transparent;
}

/* Specific fix for the yellow/green dots */
.site-footer a,
.site-footer li,
.footer-widget a,
.footer-widget li {
    position: relative;
}

/* Override any theme-specific styling */
.site-footer .widget_nav_menu ul li a::before,
.site-footer .widget_meta ul li a::before,
.site-footer .widget_pages ul li a::before,
.site-footer .widget_categories ul li a::before,
.site-footer .widget_archive ul li a::before,
.site-footer .widget_recent_entries ul li a::before,
.site-footer .widget_recent_comments ul li a::before,
.site-footer .widget_rss ul li a::before,
.site-footer .widget_nav_menu ul li::before,
.site-footer .widget_meta ul li::before,
.site-footer .widget_pages ul li::before,
.site-footer .widget_categories ul li::before,
.site-footer .widget_archive ul li::before,
.site-footer .widget_recent_entries ul li::before,
.site-footer .widget_recent_comments ul li::before,
.site-footer .widget_rss ul li::before {
    display: none;
    content: none;
    visibility: hidden;
    opacity: 0;
    width: 0;
    height: 0;
    margin: 0;
    padding: 0;
    background: transparent;
    border: none;
    color: transparent;
}

/* Footer bottom section */
body .site-footer .footer-bottom {
    background-color: var(--footer-bottom-bg-color);
    border-top: 1px solid var(--footer-bottom-bg-color);
}

/* Copyright text color - completely separate from footer text color */
body .site-footer .footer-bottom,
body .site-footer .footer-bottom .container,
body .site-footer .copyright,
body .site-footer .copyright p,
body .site-footer .copyright span,
body .site-footer .copyright div,
body .site-footer .copyright a {
    color: var(--copyright-text-color);
}

/* Footer link hover state - keep color the same, only add underline */
body .site-footer a:hover,
body .footer-widget a:hover,
body .footer-menu a:hover,
body .footer-widget ul li a:hover,
body .footer-navigation a:hover,
body .footer-bottom a:hover {
    color: var(--footer-text-color);
    text-decoration: underline;
}

/* Footer text elements */
body .footer-widget p,
body .footer-widget li,
body .footer-contact-info,
body .brand-description p,
body .copyright,
body .footer-widget ul li,
body .footer-menu li,
body .footer-navigation li,
body .footer-widget nav,
body .footer-navigation {
    font-size: var(--body-font-size);
    line-height: var(--body-line-height);
    font-weight: var(--body-font-weight);
    color: var(--footer-text-color);
}

/* Footer spacing and layout */
body .footer-widget ul li {
    margin-bottom: 2px;
}

body .footer-contact-info .footer-menu li {
    margin-bottom: 2px;
}

/* Footer contact info - phone and email */
body .footer-contact-info,
body .footer-contact-info a,
body .footer-contact-info li,
body .footer-contact-info i,
body .footer-contact-info .fas.fa-phone-alt,
body .footer-contact-info .fas.fa-envelope {
    color: var(--footer-text-color);
    transition: color 0.3s ease;
}

/* Spacing between contact info and social icons */
.footer-contact-info {
    margin-bottom: 8px;
}

/* Social icons - completely rewritten for CSS-only hover effects */
.codlion-social-links {
    display: flex;
    gap: 2px;
    margin-top: 10px;
}

/* Social icons alignment based on footer alignment settings - Following Development Recommendations */
/* Mobile/Tablet: max-width: 991px (tablets >991px treated as desktop) */
@media (max-width: 991px) {
    .codlion-social-links {
        width: 100%;
    }
    
    /* Left alignment (default) */
    .mobile-footer-left .codlion-social-links {
        justify-content: flex-start;
        margin-left: 0;
        margin-right: auto;
    }
    
    /* Center alignment */
    .mobile-footer-center .codlion-social-links {
        justify-content: center;
        margin-left: auto;
        margin-right: auto;
    }
    
    /* Right alignment */
    .mobile-footer-right .codlion-social-links {
        justify-content: flex-end;
        margin-left: auto;
        margin-right: 0;
    }
}

/* Social Icon Styles */
.codlion-social-icon {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 36px !important;
    height: 36px !important;
    background-color: var(--social-icon-bg-color, #ffffff) !important;
    border-radius: 50% !important;
    border: 1px solid rgba(0,0,0,0.05) !important;
    text-decoration: none !important;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05) !important;
    transition: transform 0.3s ease, background-color 0.3s ease !important;
    margin: 0 2px !important;
}

.codlion-social-icon svg {
    fill: var(--social-icon-color, #4a4a4a) !important;
    transition: fill 0.3s ease !important;
    width: 16px !important;
    height: 16px !important;
}

.codlion-social-icon:hover {
    transform: translateY(-3px) !important;
    background-color: var(--social-icon-hover-color, #e09c81) !important;
}

.codlion-social-icon:hover svg {
    fill: #ffffff !important;
}

/* Specific icon styles - Base class for all social icons */
.facebook-icon, .twitter-icon, .instagram-icon, .linkedin-icon, .youtube-icon, .pinterest-icon, .tiktok-icon, .snapchat-icon {
    /* Common specific styling for all social icons if needed */
    margin: 0 2px !important;
}

/* TikTok icon styles */
.tiktok-icon {
    background-color: #69c9ff !important;
}

.tiktok-icon:hover {
    background-color: #55a8fd !important;
    border-color: #55a8fd !important;
}

.tiktok-icon svg {
    fill: #ffffff !important;
}

/* Snapchat icon styles */
.snapchat-icon {
    background-color: #fffc00 !important;
}

.snapchat-icon:hover {
    background-color: #ffff00 !important;
    border-color: #ffff00 !important;
}

.snapchat-icon svg {
    fill: #000000 !important;
}

/* Newsletter Subscription Styles */
.footer-newsletter {
    margin-top: 25px;
}

.footer-newsletter-title {
    font-family: var(--main-font);
    font-size: var(--h6-font-size);
    font-weight: var(--heading-font-weight);
    color: var(--footer-text-color) !important;
    line-height: 1.3;
    margin: 0 0 15px;
    position: relative;
}

.footer-newsletter-title::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 60px;
    height: 2px;
    background-color: var(--footer-title-underline-color);
}

.newsletter-description {
    font-size: var(--body-font-size);
    line-height: var(--body-line-height);
    margin-bottom: 15px;
    color: var(--footer-text-color) !important;
}

.newsletter-form-group {
    display: flex;
    max-width: 100%;
    width: 100%;
}

.footer-newsletter-form input[type="email"] {
    flex: 1;
    height: 40px;
    padding: 0 15px;
    border: 1px solid rgba(0,0,0,0.1);
    border-right: none;
    background-color: #fff;
    color: #333;
    font-size: 14px;
    outline: none;
    border-top-left-radius: 4px;
    border-bottom-left-radius: 4px;
    box-sizing: border-box;
}

.footer-newsletter-form button,
.newsletter-submit-btn {
    background-color: var(--newsletter-button-color);
    color: white;
    border: none;
    height: 40px;
    padding: 0 15px;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    transition: background-color 0.3s ease;
    font-weight: 500;
    white-space: nowrap;
    box-sizing: border-box;
}

.footer-newsletter-form button:hover,
.newsletter-submit-btn:hover {
    background-color: var(--footer-text-color, #4a4a4a);
}

/**
 * Mobile/Tablet-specific footer styles - Following Development Recommendations
 * Tablets >991px treated as desktop
 */
@media (max-width: 991px) {
    /* Optimize spacing between footer sections */
    .footer-grid > div:not(:first-child) {
        margin-top: 0;
    }
    
    /* Consistent spacing for all footer widgets */
    .footer-widget,
    .footer-widget.footer-brand,
    .footer-widget:first-child,
    .footer-widget:last-child,
    .footer-widget.footer-menu-widget,
    .footer-widget.footer-social-widget {
        margin: 0;
        padding: 0;
        border-bottom: none;
    }
    
    /* Footer headings styling for mobile */
    .footer-widget h3,
    .footer-newsletter-title {
        margin: 0 0 10px;
        font-size: var(--h6-font-size);
        padding-bottom: 5px;
    }
    
    /* Adjust footer title underline for mobile */
    body .footer-widget h3::after,
    .footer-newsletter-title::after {
        bottom: 0;
        width: 40px;
    }
    
    /* Mobile newsletter styles */
    .footer-newsletter {
        margin-top: 15px;
    }
    
    .newsletter-form-group {
        display: flex;
        flex-direction: row;
        margin-top: 10px;
        width: 100%;
    }
    
    .footer-newsletter-form {
        width: 100%;
    }
    
    .footer-newsletter-form input[type="email"] {
        flex: 1;
        border-right: none;
        border-top-left-radius: 4px;
        border-bottom-left-radius: 4px;
        border-top-right-radius: 0;
        border-bottom-right-radius: 0;
        margin-bottom: 0;
        height: 40px;
    }
    
    /* Mobile-specific newsletter button adjustments */
    .newsletter-submit-btn,
    .footer-newsletter-form button {
        border-top-left-radius: 0;
        border-bottom-left-radius: 0;
        border-top-right-radius: 4px;
        border-bottom-right-radius: 4px;
        width: auto;
    }
}
