/**
 * Path: /boost-privacy/public/css/boost-privacy-legal-footer.css
 * 
 * Frontend styles for legal page footer links
 *
 * Provides styling for legal page links displayed in website footer
 * with responsive design and theme compatibility considerations.
 * Updated to handle dynamic company info display.
 */

/* Reset styles to avoid theme conflicts */
.boost-privacy-footer-links,
.boost-privacy-footer-links * {
    box-sizing: border-box;
}

.boost-privacy-footer-links {
    clear: both;
    margin: 20px 0 10px 0;
    padding: 15px 0;
    border-top: 1px solid #e0e0e0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: #666;
    text-align: center;
}

/* Company info section - may be hidden if company name is empty */
.boost-privacy-footer-links .boost-company-info {
    margin-bottom: 8px;
    font-size: inherit;
    color: inherit;
}

/* When company info is present, add some spacing */
.boost-privacy-footer-links .boost-company-info + .boost-legal-links {
    margin-top: 8px;
}

/* Legal links list */
.boost-privacy-footer-links .boost-legal-links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.boost-privacy-footer-links .boost-legal-link {
    margin: 0;
    padding: 0;
    display: inline-flex;
}

.boost-privacy-footer-links .boost-legal-link::after {
    content: "•";
    margin-left: 8px;
    color: #ccc;
    font-weight: normal;
}

.boost-privacy-footer-links .boost-legal-link:last-child::after {
    display: none;
}

.boost-privacy-footer-links .boost-legal-link-anchor {
    color: #666;
    text-decoration: none;
    font-weight: 400;
    transition: color 0.2s ease;
    border: none;
    background: none;
    padding: 4px 0;
    outline-offset: 2px;
}

.boost-privacy-footer-links .boost-legal-link-anchor:hover,
.boost-privacy-footer-links .boost-legal-link-anchor:focus {
    color: #0073aa;
    text-decoration: underline;
}

.boost-privacy-footer-links .boost-legal-link-anchor:visited {
    color: #666;
}

/* Alternative horizontal layout */
.boost-privacy-footer-links.boost-layout-horizontal .boost-legal-links {
    flex-direction: row;
    justify-content: center;
}

/* Alternative vertical layout */
.boost-privacy-footer-links.boost-layout-vertical .boost-legal-links {
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.boost-privacy-footer-links.boost-layout-vertical .boost-legal-link::after {
    display: none;
}

/* Left alignment variant */
.boost-privacy-footer-links.boost-align-left {
    text-align: left;
}

.boost-privacy-footer-links.boost-align-left .boost-legal-links {
    justify-content: flex-start;
}

/* Right alignment variant */
.boost-privacy-footer-links.boost-align-right {
    text-align: right;
}

.boost-privacy-footer-links.boost-align-right .boost-legal-links {
    justify-content: flex-end;
}

/* Dark theme variant */
.boost-privacy-footer-links.boost-theme-dark {
    background-color: #333;
    color: #ccc;
    border-top-color: #555;
}

.boost-privacy-footer-links.boost-theme-dark .boost-company-info {
    color: #ccc;
}

.boost-privacy-footer-links.boost-theme-dark .boost-legal-link-anchor {
    color: #ccc;
}

.boost-privacy-footer-links.boost-theme-dark .boost-legal-link-anchor:hover,
.boost-privacy-footer-links.boost-theme-dark .boost-legal-link-anchor:focus {
    color: #fff;
}

.boost-privacy-footer-links.boost-theme-dark .boost-legal-link-anchor:visited {
    color: #ccc;
}

.boost-privacy-footer-links.boost-theme-dark .boost-legal-link::after {
    color: #666;
}

/* Light theme variant */
.boost-privacy-footer-links.boost-theme-light {
    background-color: #f9f9f9;
    color: #333;
    border-top-color: #e0e0e0;
}

.boost-privacy-footer-links.boost-theme-light .boost-company-info {
    color: #333;
}

.boost-privacy-footer-links.boost-theme-light .boost-legal-link-anchor {
    color: #333;
}

.boost-privacy-footer-links.boost-theme-light .boost-legal-link-anchor:hover,
.boost-privacy-footer-links.boost-theme-light .boost-legal-link-anchor:focus {
    color: #0073aa;
}

/* Minimal theme variant */
.boost-privacy-footer-links.boost-theme-minimal {
    border: none;
    margin: 10px 0;
    padding: 10px 0;
}

.boost-privacy-footer-links.boost-theme-minimal .boost-legal-link::after {
    content: "|";
    color: #ddd;
    margin: 0 8px;
}

/* Handle case when only legal links are present (no company info) */
.boost-privacy-footer-links:not(:has(.boost-company-info)) {
    padding-top: 10px;
}

/* Shortcode styles */
.boost-legal-links-shortcode {
    display: inline-block;
    margin: 0;
    padding: 0;
    font-size: inherit;
    line-height: inherit;
}

.boost-legal-links-shortcode .boost-legal-links-title {
    font-weight: 600;
    margin-right: 8px;
    color: #333;
}

.boost-legal-links-shortcode .boost-legal-link {
    color: #0073aa;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s ease;
}

.boost-legal-links-shortcode .boost-legal-link:hover,
.boost-legal-links-shortcode .boost-legal-link:focus {
    border-bottom-color: currentColor;
    text-decoration: none;
}

/* Responsive design */
@media screen and (max-width: 768px) {
    .boost-privacy-footer-links {
        padding: 12px 0;
        margin: 15px 0 8px 0;
        font-size: 13px;
    }
    
    .boost-privacy-footer-links .boost-company-info {
        margin-bottom: 6px;
    }
    
    .boost-privacy-footer-links .boost-legal-links {
        gap: 6px;
        flex-direction: column;
        align-items: center;
    }
    
    .boost-privacy-footer-links .boost-legal-link::after {
        display: none;
    }
    
    .boost-privacy-footer-links .boost-legal-link {
        padding: 2px 0;
    }
    
    /* Force horizontal layout to vertical on mobile */
    .boost-privacy-footer-links.boost-layout-horizontal .boost-legal-links {
        flex-direction: column;
    }
    
    .boost-privacy-footer-links.boost-layout-horizontal .boost-legal-link::after {
        display: none;
    }
}

@media screen and (max-width: 480px) {
    .boost-privacy-footer-links {
        font-size: 12px;
        padding: 10px 0;
        margin: 10px 0 5px 0;
    }
    
    .boost-privacy-footer-links .boost-company-info {
        margin-bottom: 4px;
    }
    
    .boost-privacy-footer-links .boost-legal-links {
        gap: 4px;
    }
}

/* High contrast mode support */
@media (prefers-contrast: more) {
    .boost-privacy-footer-links {
        border-top: 2px solid;
        border-top-color: currentColor;
    }
    
    .boost-privacy-footer-links .boost-legal-link-anchor {
        border: 1px solid transparent;
        padding: 4px 6px;
    }
    
    .boost-privacy-footer-links .boost-legal-link-anchor:hover,
    .boost-privacy-footer-links .boost-legal-link-anchor:focus {
        border-color: currentColor;
        text-decoration: none;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .boost-privacy-footer-links .boost-legal-link-anchor {
        transition: none;
    }
}

/* Print styles */
@media print {
    .boost-privacy-footer-links {
        page-break-inside: avoid;
        border-top: 1px solid #000;
        color: #000;
    }
    
    .boost-privacy-footer-links .boost-company-info {
        color: #000;
    }
    
    .boost-privacy-footer-links .boost-legal-link-anchor {
        color: #000;
        text-decoration: underline;
    }
    
    .boost-privacy-footer-links .boost-legal-link-anchor::after {
        content: " (" attr(href) ")";
        font-size: 10px;
        color: #666;
    }
}

/* WordPress admin bar compatibility */
.admin-bar .boost-privacy-footer-links {
    margin-top: 15px;
}

/* RTL support */
.rtl .boost-privacy-footer-links .boost-legal-link::after {
    margin-left: 0;
    margin-right: 8px;
}

.rtl .boost-privacy-footer-links.boost-theme-minimal .boost-legal-link::after {
    margin: 0 8px 0 8px;
}

/* Focus indicators for accessibility */
.boost-privacy-footer-links .boost-legal-link-anchor:focus {
    outline: 2px solid #005caa;
    outline-offset: 2px;
}

/* Ensure sufficient color contrast */
.boost-privacy-footer-links .boost-legal-link-anchor {
    color: #555;
}

.boost-privacy-footer-links .boost-legal-link-anchor:hover,
.boost-privacy-footer-links .boost-legal-link-anchor:focus {
    color: #0073aa;
}

/* Custom positioning when moved by JavaScript */
.boost-privacy-footer-links.boost-js-positioned {
    position: relative;
    z-index: 1;
    display: block;
    width: 100%;
}

/* Integration with common footer patterns */
.site-footer .boost-privacy-footer-links,
.footer .boost-privacy-footer-links,
#footer .boost-privacy-footer-links,
.footer-content .boost-privacy-footer-links {
    border-top: none;
    margin-top: 0;
    padding-top: 0;
}

/* Theme-specific overrides for better integration */
body.theme-twentytwentyone .boost-privacy-footer-links {
    font-family: inherit;
}

body.theme-twentytwentytwo .boost-privacy-footer-links {
    font-family: inherit;
}

body.theme-twentytwentythree .boost-privacy-footer-links {
    font-family: inherit;
}

/* Flexbox fallback for older browsers */
.boost-privacy-footer-links .boost-legal-links {
    display: block;
    text-align: center;
}

.boost-privacy-footer-links .boost-legal-link {
    display: inline-block;
    margin: 0 4px;
}

@supports (display: flex) {
    .boost-privacy-footer-links .boost-legal-links {
        display: flex;
    }
    
    .boost-privacy-footer-links .boost-legal-link {
        margin: 0;
    }
}

/* Handle empty states gracefully */
.boost-privacy-footer-links:empty {
    display: none;
}

/* When no legal links are present, hide the entire container */
.boost-privacy-footer-links .boost-legal-links:empty {
    display: none;
}

/* Adjust layout when only company info is present */
.boost-privacy-footer-links:has(.boost-company-info):not(:has(.boost-legal-links li)) .boost-company-info {
    margin-bottom: 0;
}

/* Fallback for browsers that don't support :has() */
.boost-privacy-footer-links .boost-company-info:only-child {
    margin-bottom: 0;
}