/* نافذة «تواصل معنا» (popover بلا سكربت) تُستعمل في الرئيسية وصفحتي الخصوصية والشروط */
.cp-open { font: inherit; color: inherit; background: none; border: 0; padding: 2px 4px; margin: 0; cursor: pointer; -webkit-appearance: none; appearance: none; }
.cp-fallback { display: none; }
.home-legal .cp-open { color: #8a93b4; }
.home-legal .cp-open:hover, .home-legal .cp-open:focus-visible { color: var(--cyan, #63ddff); text-decoration: underline; }
.lg-foot .cp-open { color: #aebbe0; font-size: inherit; text-decoration: underline; text-underline-offset: 3px; }
.cp-open:focus-visible { outline: 2px solid var(--cyan, #63ddff); outline-offset: 3px; border-radius: 4px; }

.cp { width: min(94vw, 480px); max-height: calc(var(--vh, 1vh) * 92); max-height: 92svh; margin: auto; padding: 0; border: 0; background: transparent; color: #e9efff; overflow: visible;
  font-family: "IBM Plex Sans Arabic", system-ui, -apple-system, "Segoe UI", Tahoma, sans-serif; line-height: 1.8; text-align: start; }
.cp::backdrop { background: rgba(2, 4, 11, .74); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.cp:popover-open { animation: cpIn .3s cubic-bezier(.2, .8, .2, 1) both; }
.cp-panel { position: relative; max-height: calc(var(--vh, 1vh) * 92); max-height: 92svh; overflow: auto; padding: 14px 18px 22px; border-radius: 28px; border: 1px solid transparent;
  background: linear-gradient(160deg, #0b1130 0%, #05070f 100%) padding-box, linear-gradient(135deg, var(--cyan, #63ddff), var(--blue, #4d8cff), var(--violet, #8455ff)) border-box;
  box-shadow: 0 0 40px rgba(88, 205, 255, .16), 0 0 90px rgba(120, 80, 255, .14), 0 30px 70px rgba(0, 0, 0, .6); }
.cp-close { position: absolute; top: 14px; inset-inline-start: 14px; width: 38px; height: 38px; display: grid; place-items: center; font: 700 15px/1 inherit; font-family: inherit; color: #e9efff; cursor: pointer; border-radius: 50%; border: 1px solid transparent;
  background: linear-gradient(#0a0f22, #0a0f22) padding-box, linear-gradient(135deg, var(--cyan, #63ddff), var(--violet, #8455ff)) border-box; transition: transform .2s ease, box-shadow .2s ease; }
.cp-close:hover, .cp-close:focus-visible { transform: scale(1.08) rotate(90deg); box-shadow: 0 0 20px rgba(99, 221, 255, .4); }
.cp-close:focus-visible { outline: 2px solid var(--cyan, #63ddff); outline-offset: 3px; }
.cp-title { margin: 0 0 18px; line-height: 38px; text-align: center; font-size: clamp(1.1rem, 4vw, 1.4rem); font-weight: 700; color: #fff; text-shadow: 0 0 22px rgba(99, 221, 255, .35); }
.cp-lbl { margin: 0 0 4px; color: #8f9bbd; font-size: .88rem; }
.cp-mail { margin: 0 0 8px; padding: 14px 10px; text-align: center; font-size: clamp(1.05rem, 5vw, 1.4rem); font-weight: 700; color: #fff; border-radius: 12px; background: rgba(99, 221, 255, .07); border: 1px dashed rgba(99, 221, 255, .35); user-select: all; -webkit-user-select: all; overflow-wrap: anywhere; }
.cp-hint { margin: 0 0 12px; color: #aebbe0; font-size: .9rem; }
.cp-btns { display: flex; flex-wrap: wrap; gap: 10px; }
.cp-btn { flex: 1 1 120px; text-align: center; padding: 11px 12px; border-radius: 999px; color: #eef3ff; text-decoration: none; font-weight: 700; font-size: .95rem; border: 1px solid transparent;
  background: linear-gradient(160deg, #080d1f, #04050f) padding-box, linear-gradient(135deg, var(--cyan, #63ddff), var(--blue, #4d8cff), var(--violet, #8455ff)) border-box; }
.cp-btn:hover, .cp-btn:focus-visible { box-shadow: 0 0 24px rgba(99, 221, 255, .3); }
@keyframes cpIn { from { opacity: 0; transform: translateY(14px) scale(.96); } to { opacity: 1; transform: none; } }
@supports not selector(:popover-open) {
  html:not(.js-pop) .cp { display: none; }
  html:not(.js-pop) .cp-open { display: none; }
  html:not(.js-pop) .cp-fallback { display: inline; color: inherit; }
}
/* متصفح قديم بلا popover وفيه جافاسكربت: نافذة «تواصل» تُفتح فوق الصفحة (assets/popfallback.js) */
html.js-pop .cp { display: none; }
html.js-pop .cp.is-open { display: flex; position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 100; width: 100%; height: 100%; box-sizing: border-box; max-height: none; margin: 0; padding: 3vw; overflow: auto; align-items: center; justify-content: center; background: rgba(2, 4, 11, .86); }
html.js-pop .cp.is-open .cp-panel { width: min(94vw, 480px); max-height: calc(var(--vh, 1vh) * 92); }
.cp-row { display: flex; gap: 8px; align-items: stretch; margin: 0 0 8px; }
.cp-row .cp-mail { flex: 1 1 auto; min-width: 0; margin: 0; display: grid; place-items: center; }
.cp-copy { flex: 0 0 auto; min-width: 84px; padding: 0 14px; font: inherit; font-weight: 700; font-size: .9rem; color: #eef3ff; cursor: pointer; border-radius: 12px; border: 1px solid transparent;
  background: linear-gradient(160deg, #080d1f, #04050f) padding-box, linear-gradient(135deg, var(--cyan, #63ddff), var(--blue, #4d8cff), var(--violet, #8455ff)) border-box; }
.cp-copy[hidden] { display: none; }
.cp-copy:hover, .cp-copy:focus-visible { box-shadow: 0 0 20px rgba(99, 221, 255, .35); }
.cp-copy:focus-visible { outline: 2px solid var(--cyan, #63ddff); outline-offset: 3px; }
.cp-hidden-ta { position: fixed; top: 0; inset-inline-start: 0; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.cp-row .cp-mail, .cp-row .ct-mail { font-size: clamp(.92rem, 4.3vw, 1.3rem); white-space: nowrap; overflow-wrap: normal; padding-inline: 8px; }
.cp-copy { min-width: 76px; padding: 0 10px; }
/* الرئيسية: البريد ظاهر بوضوح في السطر السفلي */
.home-legal { font-size: .72rem; }
.home-legal .cp-email { color: #b9d8f5; font-weight: 500; font-size: .74rem; }
.home-legal .cp-open.cp-email:hover, .home-legal .cp-open.cp-email:focus-visible { color: var(--cyan, #63ddff); }
.home-legal .cp-fallback.cp-email { text-decoration: none; }
