/*!
 * Nabd — internet speed test (speed.doniaweb.com)
 * Copyright (c) 2026 Mahmoud Ali — doniaweb.com. All rights reserved.
 * Created: 2026-10-13
 */
/* Ad placements — neutral styling that follows the active palette. */
.ad-slot { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.ad-slot:not([data-rendered]) { min-height: 1px; margin-block: 0; }
.ad-label { font-size: .68rem; color: var(--muted); letter-spacing: .5px; align-self: center; }
.ad-code { width: 100%; display: flex; justify-content: center; min-height: 1px; }
.ad-link { display: block; max-width: 100%; color: inherit; }
.ad-img { display: block; max-width: 100%; height: auto; border-radius: min(var(--radius), 14px); margin: 0 auto; }
.ad-video { display: block; width: 100%; max-width: 728px; border-radius: min(var(--radius), 14px); background: #000; margin: 0 auto; }
.ad-cta-link { font-size: .85rem; color: var(--c1); margin-top: 4px; }
.ad-text { --ad-accent: var(--c1); width: min(728px, 100%); box-sizing: border-box; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; text-align: start;
  padding: 16px 18px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); border-inline-start: 4px solid var(--ad-accent); }
.ad-text b { font-size: 1.05rem; }
.ad-text p { color: var(--muted); font-size: .92rem; line-height: 1.7; }
.ad-text .ad-cta { margin-top: 4px; padding: 8px 16px; border-radius: var(--btn-radius); background: var(--ad-accent); color: #fff; font-weight: 600; font-size: .88rem; }
.ad-link:hover .ad-text { border-color: var(--ad-accent); }
#view-test .ad-slot[data-slot="during_test"], #view-test .ad-slot[data-slot="below_hero"] { margin-top: 24px; }
.ad-footer { padding: 0 16px; }

/* Sticky bottom bar */
.ad-sticky { position: fixed; left: 0; right: 0; bottom: 0; z-index: 45; background: var(--card-solid); border-top: 1px solid var(--line); box-shadow: 0 -10px 30px rgba(0, 0, 0, .12); padding: 6px 44px 8px; }
.ad-sticky .ad-slot { margin: 0 auto; max-height: 120px; overflow: hidden; }
.ad-sticky .ad-img, .ad-sticky .ad-video { max-height: 96px; width: auto; }
.ad-sticky .ad-text { padding: 10px 14px; }
body.has-ad-sticky { padding-bottom: 130px; }
html[data-layout="bento"] body.has-ad-sticky .nav { bottom: 140px; }
.ad-x { position: absolute; top: 6px; inset-inline-end: 8px; width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--line); background: var(--card-solid); color: var(--text); cursor: pointer; font-size: .85rem; line-height: 1; z-index: 2; }

/* Popup */
.ad-pop { position: fixed; inset: 0; z-index: 60; background: rgba(3, 6, 15, .6); backdrop-filter: blur(4px); display: grid; place-items: center; padding: 16px; }
.ad-pop[hidden] { display: none; }
.ad-pop-box { position: relative; background: var(--card-solid); border: 1px solid var(--line); border-radius: var(--radius); padding: 40px 18px 18px; max-width: min(720px, 100%); max-height: 90vh; overflow: auto; box-shadow: var(--shadow); }
.ad-pop .ad-slot { margin: 0; }
