﻿.site-footer {
    background-color: #f8f9fa; /* Light grey, or change to #1a1a1a for dark mode */
    border-top: 1px solid #e9ecef;
    padding: 4rem 1rem 1.5rem 1rem;
    font-family: inherit;
    color: #495057;
    position: relative; /* create stacking context */
    z-index: 2; /* above ::before gradient (z-index: 0) */
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
}

/* ── Grid Layout ── */
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr; /* Brand column is wider */
    gap: 2rem;
    margin-bottom: 3rem;
}

/* ── Typography & Links ── */
.footer-col h3 {
    font-size: 1.1rem;
    color: #212529;
    margin-bottom: 1.25rem;
    font-weight: 600;
}

.footer-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-col li {
    margin-bottom: 0.75rem;
}

.footer-col a {
    color: #6c757d;
    text-decoration: none;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    gap: 8px; /* Space between icon and text */
    transition: color 0.2s ease-in-out;
}

    .footer-col a:hover {
        color: #0d6efd; /* OneContact Primary Blue */
    }

/* ── AffiliateRequestForm trigger — identical to .footer-col a ── */
.footer-col .affiliate-trigger-btn {
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    color: #6c757d;
    font-size: 0.95rem;
    font-family: inherit;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: color 0.2s ease-in-out;
    text-decoration: none;
    line-height: 1;
    outline: none;
    -webkit-appearance: none;
}

    .footer-col .affiliate-trigger-btn:hover {
        color: #0d6efd;
    }

/* ── Brand Column & Newsletter ── */
.footer-logo {
    max-width: 180px;
    margin-bottom: 1rem;
}

.footer-slogan {
    font-size: 0.95rem;
    color: #6c757d;
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.newsletter-form {
    display: flex;
    max-width: 300px;
}

    .newsletter-form input {
        flex-grow: 1;
        padding: 0.5rem 1rem;
        border: 1px solid #ced4da;
        border-start-start-radius: 4px; /* RTL aware radius */
        border-end-start-radius: 4px;
        border-inline-end: none;
        outline: none;
    }

        .newsletter-form input:focus {
            border-color: #0d6efd;
        }

    .newsletter-form button {
        background-color: #0d6efd;
        color: white;
        border: none;
        padding: 0.5rem 1rem;
        cursor: pointer;
        border-start-end-radius: 4px; /* RTL aware radius */
        border-end-end-radius: 4px;
        transition: background-color 0.2s;
    }

        .newsletter-form button:hover {
            background-color: #0b5ed7;
        }

/* ── Bottom Bar ── */
.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1.5rem;
    border-top: 1px solid #e9ecef;
    font-size: 0.85rem;
    color: #868e96;
}

.legal-links {
    display: flex;
    gap: 1.5rem;
}

    .legal-links a {
        color: #868e96;
        text-decoration: none;
    }

        .legal-links a:hover {
            color: #495057;
        }

/* ── Mobile Responsiveness ── */
@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr; /* Stack all columns on mobile */
        gap: 2.5rem;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}
/* Ensure the layout takes up the full screen height */
html, body, app { /* 'app' or whatever your root element is */
    height: 100%;
    margin: 0;
}

/* Make the cascading wrapper a flex column */
.products-main-content {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

    /* The Body content grows to push the footer down */
    .products-main-content > :first-child {
        flex: 1;
    }
/* ── Reset native details/summary styles ── */
/* ── Reset native details/summary styles ── */
.footer-accordion-list {
    list-style: none;
    padding: 0;
    margin: 0;
    /* Removed display: flex and gap: 0.75rem so it matches the other columns */
}

.footer-accordion summary {
    list-style: none; /* Hides default arrow in standard browsers */
}

    .footer-accordion summary::-webkit-details-marker {
        display: none; /* Hides default arrow in Safari */
    }

/* ── Trigger Design ── */
.footer-accordion__trigger {
    display: flex;
    justify-content: flex-start; /* Changed from space-between */
    gap: 12px; /* This controls the exact distance between the text and the arrow */
    align-items: center;
    color: #6c757d;
    font-size: 0.95rem;
    cursor: pointer;
    transition: color 0.2s ease;
    user-select: none;
}

    .footer-accordion__trigger:hover {
        color: #0d6efd;
    }

    .footer-accordion__trigger span {
        display: flex;
        align-items: center;
        gap: 8px;
    }

    /* ── Rotating Chevron Animation ── */
    .footer-accordion__trigger .chevron {
        font-size: 0.75rem;
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }

.footer-accordion[open] .footer-accordion__trigger .chevron {
    transform: rotate(180deg);
}

.footer-accordion[open] .footer-accordion__trigger {
    color: #212529; /* Darker color when open to show active state */
    font-weight: 500;
}

/* ── Sub-menu Content ── */
.footer-accordion__content {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding-top: 0.5rem;
    /* Automatically indents from the left in LTR and right in RTL */
    padding-inline-start: 1.75rem;
    animation: slideDownMenu 0.25s ease-out forwards;
}

.footer-sub-link {
    font-size: 0.85rem !important; /* Slightly smaller to show hierarchy */
    color: #868e96 !important;
}

    .footer-sub-link:hover {
        color: #0d6efd !important;
    }

@keyframes slideDownMenu {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}
.products-main-content {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

    .products-main-content > :first-child {
        flex: 1;
    }
/* ── Terms modal overlay ── */
.terms-overlay {
    position: fixed;
    inset: 0; /* top/right/bottom/left: 0 */
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 1rem;
    animation: fadeInOverlay 0.15s ease;
}

@keyframes fadeInOverlay {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* ── Panel ── */
.terms-panel {
    background: #fff;
    border-radius: 12px;
    width: min(720px, 92vw);
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.25);
    animation: slideUpPanel 0.2s ease;
    overflow: hidden;
}

@keyframes slideUpPanel {
    from {
        transform: translateY(20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.terms-panel__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #e9ecef;
    flex-shrink: 0;
}

    .terms-panel__header h2 {
        margin: 0;
        font-size: 1.2rem;
        color: #212529;
    }

.terms-panel__close {
    background: none;
    border: none;
    font-size: 1.1rem;
    color: #6c757d;
    cursor: pointer;
    padding: 0.3rem 0.5rem;
    border-radius: 6px;
    transition: background 0.15s, color 0.15s;
}

    .terms-panel__close:hover {
        background: #f1f3f5;
        color: #212529;
    }

.terms-panel__body {
    padding: 1.5rem;
    overflow-y: auto; /* scrollable terms content */
    flex: 1;
    font-size: 0.95rem;
    line-height: 1.7;
    color: #495057;
}

.terms-panel__footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid #e9ecef;
    display: flex;
    justify-content: flex-end;
    flex-shrink: 0;
}

.terms-panel__btn-accept {
    background: #0d6efd;
    color: #fff;
    border: none;
    padding: 0.5rem 1.5rem;
    border-radius: 6px;
    font-size: 0.95rem;
    cursor: pointer;
    transition: background 0.2s;
}

    .terms-panel__btn-accept:hover {
        background: #0b5ed7;
    }

/* ── Trigger button (matches existing legal links style) ── */
.footer-legal-btn {
    background: none;
    border: none;
    padding: 0;
    color: #868e96;
    font-size: inherit;
    font-family: inherit;
    cursor: pointer;
    transition: color 0.2s;
}

    .footer-legal-btn:hover {
        color: #495057;
    }
/* ─────────────────────────────────────────────────────────────────────
       .aff-form  —  overrides the products page gradient-theme variables
       so the modal inputs are solid and readable (not transparent).
       ───────────────────────────────────────────────────────────────────── */
.aff-form {
    background: #ffffff !important;
    color: #212529 !important;
    border-radius: 12px;
    padding: 2rem;
    max-width: 480px;
    width: 92vw;
    position: relative;
}

    .aff-form h3 {
        color: #212529 !important;
        font-size: 1.15rem;
        font-weight: 600;
        margin-bottom: 1.25rem;
    }

    /* Labels */
    .aff-form .form-group label {
        display: block;
        color: #495057 !important;
        font-size: 0.9rem;
        font-weight: 500;
        margin-bottom: 0.4rem;
    }

    /* Inputs & textareas — solid background, visible border */
    .aff-form .form-group input,
    .aff-form .form-group textarea,
    .aff-form .form-group .form-control {
        background: #f8f9fa !important;
        border: 1px solid #ced4da !important;
        color: #212529 !important;
        border-radius: 6px;
        padding: 0.5rem 0.75rem;
        width: 100%;
        font-size: 0.95rem;
        font-family: inherit;
        box-sizing: border-box;
    }

        .aff-form .form-group input:focus,
        .aff-form .form-group textarea:focus,
        .aff-form .form-group .form-control:focus {
            background: #ffffff !important;
            border-color: #0d6efd !important;
            outline: none;
            box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.15);
        }

    /* Validation messages */
    .aff-form .validation-message {
        color: #dc3545 !important;
        font-size: 0.82rem;
        margin-top: 0.25rem;
    }

    /* Navigation buttons row */
    .aff-form .form-navigation {
        display: flex;
        justify-content: flex-end;
        gap: 0.75rem;
        margin-top: 1.25rem;
    }

    /* Close × button */
    .aff-form ~ * .modal-close-button,
    .aff-form .modal-close-button {
        color: #495057 !important;
    }

    /* Status screens (sending / success / error) */
    .aff-form .form-status-message {
        text-align: center;
        padding: 1rem 0;
        color: #212529 !important;
    }

        .aff-form .form-status-message p {
            color: #495057 !important;
        }