/**
 * Footer Styles
 * PharmEasy footer styles for desktop and mobile
 */

/* Prevent scrolling when hamburger menu is open */
body.no-scroll {
    overflow: hidden;
    position: fixed;
    width: 100%;
    height: 100%;
}

/* Footer Styles */
.site-footer {
    background-color: #EEF4FF;
    color: #4a5568;
    padding: 50px 0 30px;
    margin-top: 60px;
}

.footer-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
}

.footer-desktop {
    display: block;
}

.footer-mobile {
    display: none;
}

.mobile-sticky-cta {
    display: none;
}

/* Footer Top Section - 4 Columns */
.footer-top {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
}

.footer-column {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.footer-section {
    display: flex;
    flex-direction: column;
}

/* Footer Headings */
.footer-heading {
    font-size: 14px;
    font-weight: 700;
    color: #2d3748;
    text-transform: uppercase;
    margin: 0 0 15px 0;
    letter-spacing: 0.5px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

/* Footer Links */
.footer-links {
    list-style: none;
    margin: 0;
    padding: 0;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: #4a5568;
    text-decoration: none;
    font-size: 14px;
    line-height: 1.6;
    transition: color 0.2s ease;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.footer-links a:hover {
    color: #10847E;
}

/* Social Links */
.social-links {
    display: flex;
    gap: 12px;
    margin-top: 5px;
}

.social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    color: #4a5568;
    transition: color 0.2s ease;
}

.social-icon:hover {
    color: #10847E;
}

.social-icon svg {
    width: 24px;
    height: 24px;
}

/* Footer Bottom Section */
.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 30px;
}

/* Payment Partners */
.payment-partners {
    flex: 1;
}

.payment-logos {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 15px;
    align-items: center;
}

.payment-logo {
    display: inline-flex;
    align-items: center;
    border-radius: 4px;
    font-size: 12px;
    color: #4a5568;
    font-weight: 500;
    min-height: 32px;
}

.payment-logo img {
    height: auto;
    width: auto;
    max-height: 24px;
    max-width: 50px;
    object-fit: contain;
    display: block;
}

/* Footer Copyright */
.footer-copyright {
    flex-shrink: 0;
}

.footer-copyright p {
    margin: 0;
    font-size: 14px;
    color: #718096;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

/* Tablet Styles */
@media (max-width: 1024px) {
    .footer-container {
        padding: 0 25px;
    }
    
    .footer-top {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }
}

/* Mobile Styles - Different structure as mentioned */
@media (max-width: 767px) {
    .site-footer {
        padding: 30px 0 20px;
        margin-top: 40px;
    }
    
    .footer-container {
        padding: 0 20px;
    }
    
    .footer-desktop {
        display: none;
    }

    .footer-mobile {
        display: flex;
        flex-direction: column;
        gap: 32px;
        padding-bottom: 90px;
    }

    .mobile-accordion {
        display: flex;
        flex-direction: column;
        border-radius: 12px;
        overflow: hidden;
    }

    .mobile-footer-section {
        border-bottom: 1px solid #d6dee6;
    }

    .mobile-footer-section:last-child {
        border-bottom: none;
    }

    .mobile-footer-section summary {
        list-style: none;
        margin: 0;
        padding: 16px 0px;
        display: flex;
        justify-content: space-between;
        align-items: center;
        font-size: 15px;
        font-weight: 600;
        color: #1a202c;
        cursor: pointer;
    }

    .mobile-footer-section summary::-webkit-details-marker {
        display: none;
    }

    .mobile-footer-section summary::after {
        content: '';
        width: 6px;
        height: 6px;
        border-right: 2px solid #4a5568;
        border-bottom: 2px solid #4a5568;
        margin-right: 10px;
        transform: rotate(45deg);
        transition: transform 0.2s ease;
    }

    .mobile-footer-section[open] summary::after {
        transform: rotate(45deg);
    }

    .mobile-footer-links {
        list-style: none;
        margin: 0;
        padding: 0 18px 18px;
        display: flex;
        flex-direction: column;
        gap: 12px;
    }

    .mobile-footer-links a {
        color: #4a5568;
        font-size: 14px;
        text-decoration: none;
        line-height: 1.5;
    }

    .mobile-footer-links a:hover {
        color: #10847E;
    }

    .mobile-heading {
        font-size: 16px;
        font-weight: 700;
        color: #2d3748;
        margin: 0 0 16px;
    }

    .store-badges {
        display: flex;
        gap: 14px;
        flex-wrap: wrap;
    }

    .store-badge {
        display: inline-flex;
        align-items: center;
    }

    .store-badge img {
        display: block;
        height: 42px;
        width: 142px;
    }

    .mobile-social .social-links {
        justify-content: flex-start;
        gap: 18px;
    }

    .mobile-social .social-icon svg {
        width: 24px;
        height: 24px;
    }

    .mobile-payments .payment-logos {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 12px;
        justify-items: center;
    }

    .mobile-payments .payment-logo {
        padding: 0;
        min-height: auto;
    }

    .mobile-payments .payment-logo img {
        max-width: 48px;
        max-height: 24px;
    }

    .mobile-download,
    .mobile-social,
    .mobile-payments {
        border-radius: 12px;
    }

    .mobile-copyright {
        text-align: center;
        font-size: 13px;
        color: #718096;
        padding-top: 12px;
        border-top: 1px solid #e2e8f0;
    }

    .mobile-sticky-cta {
        display: block;
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        /* max-width: 100vw; */
        box-sizing: border-box;
        z-index: 1000;
        background: rgba(255, 255, 255, 0.92);
        padding: 18px 16px calc(18px + env(safe-area-inset-bottom, 0px));
        backdrop-filter: blur(6px);
        box-shadow: 0px -1px 8px 0px #21212114, 0px -3px 3px 0px #2121210A, 0px -3px 4px 0px #2121210F;
        transition: opacity 0.3s ease, visibility 0.3s ease;
    }
    
    /* Hide mobile sticky CTA when hamburger menu is open */
    body.no-scroll .mobile-sticky-cta {
        display: none !important;
    }

    .mobile-sticky-button {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        background: #0f8b86;
        color: #ffffff;
        text-decoration: none;
        padding: 14px 20px;
        font-size: 16px;
        font-weight: 600;
        border-radius: 12px;
        letter-spacing: 0.2px;
    }

    .mobile-sticky-button:hover {
        background: #0c706b;
    }
}