/* ==========================================================================
   NadPoint — Site Footer (frontend)
   Breakpoints: mobile ≤600px, tablet 601–1024px, desktop ≥1025px —
   matching the admin hub's own preview tabs (768px / 390px reference
   widths), so what an admin sees in the Overview preview is what
   actually happens on a real device at that size.
   ========================================================================== */

.ndp-ftr {
    background: var(--ndp-footer-bg, #1a1a2e);
    color: var(--ndp-footer-text, #c5c6d0);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 14px;
    margin-top: 40px;
}
.ndp-ftr, .ndp-ftr *, .ndp-ftr *::before, .ndp-ftr *::after { box-sizing: border-box; }
.ndp-ftr-container { max-width: 1280px; margin: 0 auto; padding: 0 24px; }

/* ── Back to top ────────────────────────────────────────────────── */
.ndp-ftr-totop {
    display: block; width: 100%; text-align: center; padding: 13px 12px;
    background: rgba(255,255,255,0.04); border: none; border-bottom: 1px solid var(--ndp-footer-border, #33334d);
    color: var(--ndp-footer-text, #c5c6d0); font-size: 12.5px; font-weight: 600; letter-spacing: .02em;
    cursor: pointer; transition: background .15s;
}
.ndp-ftr-totop:hover { background: rgba(255,255,255,0.08); color: #fff; }
.ndp-ftr-totop i { margin-left: 5px; }

/* ── Newsletter bar ─────────────────────────────────────────────── */
.ndp-ftr-newsletter { padding: 30px 0; }
.ndp-ftr-newsletter-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.ndp-ftr-newsletter-copy h3 { margin: 0 0 4px; font-size: 18px; font-weight: 700; color: #fff; }
.ndp-ftr-newsletter-copy p { margin: 0; font-size: 13px; color: var(--ndp-footer-text, #c5c6d0); opacity: .85; }
.ndp-ftr-newsletter-form { display: flex; gap: 0; flex: 0 0 auto; min-width: 320px; max-width: 420px; width: 100%; }
.ndp-ftr-newsletter-form input {
    flex: 1; min-width: 0; padding: 12px 16px; border: none; border-radius: 8px 0 0 8px;
    font-size: 13.5px; font-family: inherit;
}
.ndp-ftr-newsletter-form input:focus { outline: 2px solid var(--ndp-footer-link-hover, #e8b923); outline-offset: -2px; }
.ndp-ftr-newsletter-form button {
    display: flex; align-items: center; gap: 7px; padding: 12px 22px; border: none; border-radius: 0 8px 8px 0;
    background: var(--ndp-footer-link-hover, #e8b923); color: #1a1a2e; font-size: 13.5px; font-weight: 700; cursor: pointer;
    white-space: nowrap; transition: filter .15s;
}
.ndp-ftr-newsletter-form button:hover { filter: brightness(.94); }
.ndp-ftr-spinner { display: none; }
.ndp-ftr-newsletter-form.is-loading .ndp-ftr-spinner { display: inline-block; }
.ndp-ftr-newsletter-msg { grid-column: 1/-1; width: 100%; margin: 10px 0 0; font-size: 12.5px; font-weight: 600; display: none; }
.ndp-ftr-newsletter-msg.is-visible { display: block; }
.ndp-ftr-newsletter-msg.is-error { color: #f87171; }
.ndp-ftr-newsletter-msg.is-success { color: #4ade80; }

/* ── Column grid ────────────────────────────────────────────────── */
.ndp-ftr-columns { display: grid; grid-template-columns: repeat(var(--ftr-cols-desktop, 5), 1fr); gap: 28px; padding: 36px 0; }
.ndp-ftr-col-title { margin: 0 0 14px; font-size: 12.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--ndp-footer-heading, #fff); }
.ndp-ftr-col-links { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.ndp-ftr-col-links a { color: var(--ndp-footer-link, #c5c6d0); text-decoration: none; font-size: 13px; transition: color .12s; }
.ndp-ftr-col-links a:hover { color: var(--ndp-footer-link-hover, #e8b923); text-decoration: underline; }

/* <details>/<summary> is collapsed by default in every browser at
   every viewport width the instant it lacks the `open` attribute —
   that's the UA stylesheet, not a mistake in this file, but it means
   "accordion mode" as rendered by PHP (which always emits <details>
   when that mode is selected, regardless of viewport) needs an
   explicit override here to actually stay open above mobile width.
   Without this block, "accordion" mode looks broken on desktop/tablet:
   every column collapsed, headings only, no links ever visible. */
.ndp-ftr-col-accordion { display: block; }
@media (min-width: 601px) {
    .ndp-ftr-col-accordion > .ndp-ftr-col-links { display: flex !important; }
    .ndp-ftr-col-accordion .ndp-ftr-col-title { cursor: default; pointer-events: none; }
    .ndp-ftr-col-accordion .ndp-ftr-chevron { display: none; }
}

/* ── Trust row: payment / social / app ─────────────────────────── */
.ndp-ftr-trust-row {
    display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
    padding: 22px 0; border-top: 1px solid var(--ndp-footer-border, #33334d);
}
.ndp-ftr-payment, .ndp-ftr-social, .ndp-ftr-app { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.ndp-ftr-trust-label { font-size: 12px; font-weight: 700; color: var(--ndp-footer-text, #c5c6d0); text-transform: uppercase; letter-spacing: .04em; }
.ndp-ftr-payment-icons { display: flex; gap: 8px; }
.ndp-ftr-payment-icon {
    width: 40px; height: 28px; display: flex; align-items: center; justify-content: center;
    background: rgba(255,255,255,0.08); border-radius: 5px; color: #fff; font-size: 14px;
}
.ndp-ftr-trust-badge { display: flex; align-items: center; gap: 6px; font-size: 12px; color: #4ade80; font-weight: 600; }
.ndp-ftr-social-icon {
    width: 34px; height: 34px; display: flex; align-items: center; justify-content: center;
    background: rgba(255,255,255,0.08); border-radius: 50%; color: #fff; font-size: 14px; text-decoration: none;
    transition: background .15s, transform .12s;
}
.ndp-ftr-social-icon:hover { background: var(--ndp-footer-link-hover, #e8b923); color: #1a1a2e; transform: translateY(-2px); }
.ndp-ftr-app-badge {
    display: flex; align-items: center; gap: 9px; padding: 8px 16px; background: rgba(255,255,255,0.08);
    border-radius: 8px; color: #fff; text-decoration: none; font-size: 12px;
}
.ndp-ftr-app-badge i { font-size: 18px; }
.ndp-ftr-app-badge span { display: flex; flex-direction: column; line-height: 1.1; font-weight: 700; }
.ndp-ftr-app-badge:hover { background: rgba(255,255,255,0.15); }

/* ── Bottom bar ─────────────────────────────────────────────────── */
.ndp-ftr-bottom { background: rgba(0,0,0,0.18); padding: 16px 0; }
.ndp-ftr-bottom-inner { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.ndp-ftr-copyright { margin: 0; font-size: 12px; color: var(--ndp-footer-text, #c5c6d0); opacity: .75; }
.ndp-ftr-bottom-links { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ndp-ftr-bottom-links a { color: var(--ndp-footer-text, #c5c6d0); text-decoration: none; font-size: 12px; opacity: .8; }
.ndp-ftr-bottom-links a:hover { opacity: 1; color: var(--ndp-footer-link-hover, #e8b923); }
.ndp-ftr-bottom-sep { opacity: .4; font-size: 11px; }
.ndp-ftr-bottom-payment { display: flex; gap: 8px; color: rgba(255,255,255,0.5); font-size: 15px; }

/* ── Per-device visibility (server-computed classes) ───────────── */
@media (min-width: 1025px) { .ndp-ftr-hide-desktop { display: none !important; } }
@media (min-width: 601px) and (max-width: 1024px) { .ndp-ftr-hide-tablet { display: none !important; } }
@media (max-width: 600px) { .ndp-ftr-hide-mobile { display: none !important; } }

/* ── Tablet ─────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
    .ndp-ftr-columns { grid-template-columns: repeat(var(--ftr-cols-tablet, 3), 1fr); gap: 22px; }
    .ndp-ftr-newsletter-inner { justify-content: center; text-align: center; }
    .ndp-ftr-newsletter-form { min-width: 0; }
    .ndp-ftr-trust-row { justify-content: center; text-align: center; }
}

/* ── Mobile ─────────────────────────────────────────────────────── */
@media (max-width: 600px) {
    .ndp-ftr-container { padding: 0 16px; }
    .ndp-ftr-newsletter { padding: 22px 0; }
    .ndp-ftr-newsletter-form { flex-direction: column; }
    .ndp-ftr-newsletter-form input { border-radius: 8px; margin-bottom: 8px; }
    .ndp-ftr-newsletter-form button { border-radius: 8px; justify-content: center; }
    .ndp-ftr-bottom-inner { flex-direction: column; text-align: center; gap: 10px; }

    /* Mode: accordion (default) — native <details>/<summary>, no marker, custom chevron that rotates */
    .ndp-ftr-mobile-accordion { display: block; padding: 6px 0; }
    .ndp-ftr-mobile-accordion .ndp-ftr-col-accordion { border-bottom: 1px solid var(--ndp-footer-border, #33334d); }
    .ndp-ftr-mobile-accordion .ndp-ftr-col-title { margin: 0; padding: 15px 2px; display: flex; align-items: center; justify-content: space-between; cursor: pointer; list-style: none; }
    .ndp-ftr-mobile-accordion .ndp-ftr-col-title::-webkit-details-marker { display: none; }
    .ndp-ftr-chevron { font-size: 12px; transition: transform .2s; color: var(--ndp-footer-text, #c5c6d0); }
    .ndp-ftr-col-accordion[open] .ndp-ftr-chevron { transform: rotate(180deg); }
    .ndp-ftr-mobile-accordion .ndp-ftr-col-links { padding: 0 2px 16px; }

    /* Mode: stacked — every column just renders full-width, always open */
    .ndp-ftr-mobile-stacked { display: block; }
    .ndp-ftr-mobile-stacked .ndp-ftr-col { padding: 14px 0; border-bottom: 1px solid var(--ndp-footer-border, #33334d); }

    /* Mode: scroll — horizontal snap-scroll of narrow column cards */
    .ndp-ftr-mobile-scroll { display: flex; gap: 16px; overflow-x: auto; padding: 16px 0; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; }
    .ndp-ftr-mobile-scroll::-webkit-scrollbar { display: none; }
    .ndp-ftr-mobile-scroll .ndp-ftr-col { flex: 0 0 auto; width: 68vw; max-width: 260px; scroll-snap-align: start; background: rgba(255,255,255,0.04); border-radius: 10px; padding: 16px; }
}

@media (prefers-reduced-motion: reduce) {
    .ndp-ftr-chevron, .ndp-ftr-social-icon { transition: none; }
}
