/* إنترو ثيم Support (يشتغل من theme-support-fx.js عند التبديل للثيم) */
.spx { position: fixed; inset: 0; z-index: 9999; display: grid; place-items: center; align-content: center; gap: 14px;
  font-family: "IBM Plex Sans Arabic", system-ui, sans-serif; cursor: pointer; overflow: hidden; }
.spx-wash {
  position: absolute; inset: 0; opacity: 0; transition: opacity .45s ease;
  background:
    radial-gradient(rgba(31, 111, 235, .18) 1px, transparent 1.4px) 0 0 / 22px 22px,
    radial-gradient(700px 500px at 50% 42%, #FFFFFF 30%, rgba(255, 255, 255, 0) 100%),
    linear-gradient(160deg, #EAF2FF, #D6E6FD);
}
.spx.v-in .spx-wash { opacity: 1; }
.spx > :is(.spx-stage, .spx-chat, .spx-cap) { position: relative; }

/* الدرع والسماعة */
.spx-stage { width: 168px; height: 168px; display: grid; place-items: center; }
.spx-mark { width: 150px; height: 150px; overflow: visible; filter: drop-shadow(0 10px 18px rgba(31, 111, 235, .28)); }
.spx-mark path, .spx-mark rect, .spx-mark circle { stroke: #1F6FEB; stroke-width: 4.5; }
.spx-shield { fill: rgba(31, 111, 235, .09); stroke-dasharray: 1; stroke-dashoffset: 1; }
.spx-band, .spx-boom { stroke-dasharray: 1; stroke-dashoffset: 1; }
.spx-check { stroke: #129A68 !important; stroke-width: 6 !important; stroke-dasharray: 1; stroke-dashoffset: 1; }
.spx-cup { fill: #fff; opacity: 0; transform-box: fill-box; transform-origin: center; transform: scale(.4); }
.spx-mic { fill: #0EA5C6; opacity: 0; transform-box: fill-box; transform-origin: center; transform: scale(.2); stroke: #0EA5C6 !important; }
.spx.v-mark .spx-shield { transition: stroke-dashoffset .8s cubic-bezier(.6, 0, .2, 1); stroke-dashoffset: 0; }
.spx.v-mark .spx-band { transition: stroke-dashoffset .7s cubic-bezier(.6, 0, .2, 1) .25s; stroke-dashoffset: 0; }
.spx.v-mark .spx-boom { transition: stroke-dashoffset .4s ease .7s; stroke-dashoffset: 0; }
.spx.v-mark .spx-cup { transition: opacity .3s ease .55s, transform .45s cubic-bezier(.2, 1.4, .3, 1) .55s; opacity: 1; transform: none; }
.spx.v-mark .spx-mic { transition: opacity .25s ease .95s, transform .4s cubic-bezier(.2, 1.6, .3, 1) .95s; opacity: 1; transform: none; }
.spx.v-ok .spx-check { transition: stroke-dashoffset .45s ease; stroke-dashoffset: 0; }
.spx.v-ok .spx-shield { fill: rgba(18, 154, 104, .13); stroke: #129A68; transition: fill .4s ease, stroke .4s ease; }

/* حلقات الإشارة */
.spx-ringw { position: absolute; inset: 0; margin: auto; width: 150px; height: 150px; border-radius: 50%;
  border: 2px solid rgba(31, 111, 235, .4); opacity: 0; pointer-events: none; }
.spx.v-rings .spx-ringw { animation: spx-ring 1.9s ease-out infinite; }
.spx.v-rings .r2 { animation-delay: .6s; }
.spx.v-rings .r3 { animation-delay: 1.2s; }
@keyframes spx-ring { 0% { transform: scale(.7); opacity: .8; } 100% { transform: scale(2.3); opacity: 0; } }

/* الدردشة */
.spx-chat { display: grid; gap: 8px; width: min(300px, 80vw); justify-items: center; min-height: 96px; align-content: start; margin-top: 22px; }
.spx-b { border-radius: 16px; padding: 9px 15px; font-size: .95rem; font-weight: 500; color: #0E2542;
  background: #fff; box-shadow: 0 6px 18px -6px rgba(31, 111, 235, .4), inset 0 0 0 1px rgba(31, 111, 235, .2);
  opacity: 0; transform: translateY(10px) scale(.92); transform-origin: center bottom; }
.spx-b1, .spx-b2 { display: none; }
.spx.v-b1 .spx-b1 { display: block; animation: spx-pop .4s cubic-bezier(.2, 1.3, .3, 1) forwards; }
.spx-typing { display: none; gap: 4px; padding: 11px 15px; }
.spx.v-typing .spx-typing { display: inline-flex; animation: spx-pop .3s ease forwards; }
.spx.v-b2 .spx-typing { display: none; }
.spx-typing i { width: 7px; height: 7px; border-radius: 50%; background: #1F6FEB; animation: spx-dot 1s ease-in-out infinite; }
.spx-typing i:nth-child(2) { animation-delay: .15s; }
.spx-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes spx-dot { 0%, 100% { transform: translateY(0); opacity: .4; } 50% { transform: translateY(-4px); opacity: 1; } }
.spx.v-b2 .spx-b2 { display: block; background: #129A68; color: #fff; box-shadow: 0 6px 18px -6px rgba(18, 154, 104, .6);
  animation: spx-pop .4s cubic-bezier(.2, 1.3, .3, 1) forwards; }
@keyframes spx-pop { to { opacity: 1; transform: none; } }

/* الجملة تحت */
.spx-cap { margin: 0; height: 1.5em; display: grid; font-weight: 600; font-size: .98rem; color: #1559C8; text-align: center; }
.spx-cap span { grid-area: 1 / 1; opacity: 0; transition: opacity .35s ease; }
.spx.v-in .spx-cap .c1 { opacity: 1; }
.spx.v-ok .spx-cap .c1 { opacity: 0; }
.spx.v-ok .spx-cap .c2 { opacity: 1; color: #129A68; }

/* ومضة وخروج */
.spx-flash { position: absolute; inset: 0; background: #fff; opacity: 0; pointer-events: none; }
.spx.v-flash .spx-flash { animation: spx-flash .75s ease-out forwards; }
@keyframes spx-flash { 0% { opacity: 0; } 30% { opacity: 1; } 100% { opacity: 1; } }
.spx.v-after .spx-wash, .spx.v-after .spx-stage, .spx.v-after .spx-chat, .spx.v-after .spx-cap { opacity: 0; transition: none; }
.spx.v-out .spx-flash { animation: none; opacity: 0; transition: opacity .7s ease; }
.spx.v-out { pointer-events: none; }

@media (max-width: 520px) { .spx-stage { width: 140px; height: 140px; } .spx-mark { width: 124px; height: 124px; } }
