/* ==========================================================================
   Alpha Media — "تماس برای ثبت سفارش" modal
   --------------------------------------------------------------------------
   Every project order and every class registration is taken over the phone,
   so each of those CTAs opens this one dialog instead of a form. Markup is
   injected by call.js; this file only styles it.

   Uses the tokens from styles.css — no new colours are introduced here.
   ========================================================================== */

.callm {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: var(--s-5);
  visibility: hidden;
  opacity: 0;
  transition: opacity var(--t), visibility var(--t);
}
.callm.is-open { visibility: visible; opacity: 1; }

.callm__scrim {
  position: absolute;
  inset: 0;
  background: rgba(12, 3, 20, .72);
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
}

/* --------------------------------------------------------------- panel --- */
.callm__panel {
  position: relative;
  width: min(460px, 100%);
  max-height: calc(100dvh - var(--s-10));
  overflow-y: auto;
  border-radius: var(--r-lg);
  border: 1px solid rgba(240, 180, 41, .22);
  background:
    radial-gradient(120% 70% at 50% -10%, rgba(107, 47, 143, .55), transparent 70%),
    linear-gradient(170deg, var(--purple-850), var(--purple-950));
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .8), 0 0 90px -40px var(--accent);
  /* --s-7 does not exist in the scale; using it made the whole padding
     declaration invalid, which is why the contents sat on the edges. */
  padding: var(--s-10) var(--s-8) var(--s-8);
  text-align: center;
  transform: translateY(18px) scale(.97);
  transition: transform var(--t);
}
.callm.is-open .callm__panel { transform: none; }

/* the thin gold hairline across the top edge */
.callm__panel::before {
  content: '';
  position: absolute;
  inset-block-start: 0;
  inset-inline: 12%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
}

.callm__close {
  position: absolute;
  inset-block-start: var(--s-5);
  inset-inline-end: var(--s-5);
  width: 34px; height: 34px;
  display: grid; place-items: center;
  border: 1px solid var(--border-dark);
  border-radius: var(--r-full);
  background: rgba(21, 5, 32, .55);
  color: var(--text-on-dark-muted);
  cursor: pointer;
  transition: color var(--t-fast), border-color var(--t-fast), transform var(--t-fast);
}
.callm__close:hover {
  color: var(--accent);
  border-color: rgba(240, 180, 41, .45);
  transform: rotate(90deg);
}
.callm__close svg { width: 15px; height: 15px; fill: currentColor; }

/* ------------------------------------------------------------ the mark --- */
.callm__ring {
  width: 66px; height: 66px;
  margin: 0 auto var(--s-5);
  display: grid; place-items: center;
  border-radius: var(--r-full);
  color: var(--accent);
  background: rgba(240, 180, 41, .10);
  box-shadow: 0 0 0 1px rgba(240, 180, 41, .28), 0 0 34px -6px rgba(240, 180, 41, .5);
}
.callm__ring svg { width: 27px; height: 27px; fill: currentColor; }

/* the handset gives a slow double-nudge, like a ring, once on open */
@media (prefers-reduced-motion: no-preference) {
  .callm.is-open .callm__ring svg { animation: callm-ring 1.4s ease-in-out .25s 2; }
}
@keyframes callm-ring {
  0%, 62%, 100% { transform: rotate(0); }
  68% { transform: rotate(-13deg); }
  74% { transform: rotate(11deg); }
  80% { transform: rotate(-7deg); }
  86% { transform: rotate(4deg); }
}

.callm__kicker {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .06em;
  color: var(--purple-200, #d9bff0);
  margin-bottom: var(--s-2);
}
.callm__title {
  font-size: 1.22rem;
  font-weight: 800;
  color: var(--accent);
  line-height: 1.7;
  margin-bottom: var(--s-3);
}
.callm__sub {
  font-size: .88rem;
  line-height: 2;
  color: var(--text-on-dark-muted);
  margin-bottom: var(--s-6);
}

/* what the caller is ringing about — filled from the trigger */
.callm__subject {
  display: none;
  margin: 0 auto var(--s-6);
  padding: var(--s-3) var(--s-4);
  border: 1px dashed rgba(240, 180, 41, .3);
  border-radius: var(--r-md);
  background: rgba(21, 5, 32, .45);
  font-size: .84rem;
  line-height: 1.9;
  color: var(--text-on-dark);
}
.callm__subject.is-on { display: block; }
.callm__subject b { color: var(--accent); font-weight: 800; }

/* ----------------------------------------------------------- the number -- */
.callm__number {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-3);
  margin-bottom: var(--s-5);
}
.callm__num {
  font-size: clamp(1.5rem, 6vw, 1.95rem);
  font-weight: 900;
  letter-spacing: .04em;
  color: var(--text-on-dark);
  direction: ltr;
  transition: color var(--t-fast);
}
.callm__num:hover { color: var(--accent); }

.callm__copy {
  width: 34px; height: 34px;
  flex: none;
  display: grid; place-items: center;
  border: 1px solid var(--border-dark);
  border-radius: var(--r-sm);
  background: rgba(21, 5, 32, .5);
  color: var(--text-on-dark-muted);
  cursor: pointer;
  transition: color var(--t-fast), border-color var(--t-fast);
}
.callm__copy:hover { color: var(--accent); border-color: rgba(240, 180, 41, .4); }
.callm__copy.is-done { color: #6ee7a8; border-color: rgba(110, 231, 168, .45); }
.callm__copy svg { width: 15px; height: 15px; fill: currentColor; }

/* --------------------------------------------------------------- CTAs ---- */
.callm__cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  width: 100%;
  padding: var(--s-4);
  border-radius: var(--r-md);
  font-size: .98rem;
  font-weight: 800;
  color: var(--purple-950);
  background: linear-gradient(135deg, var(--gold-300, #f4c65a), var(--gold-500, #d99a12));
  box-shadow: 0 10px 26px -10px rgba(240, 180, 41, .8);
  transition: transform var(--t-fast), box-shadow var(--t-fast);
}
.callm__cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 34px -10px rgba(240, 180, 41, .9);
}
.callm__cta svg { width: 18px; height: 18px; fill: currentColor; }

.callm__or {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  margin: var(--s-5) 0 var(--s-4);
  font-size: .74rem;
  color: var(--text-on-dark-muted);
}
.callm__or::before,
.callm__or::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-dark);
}

.callm__alts { display: flex; gap: var(--s-3); }
.callm__alt {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  padding: var(--s-3);
  border: 1px solid var(--border-dark);
  border-radius: var(--r-md);
  font-size: .84rem;
  font-weight: 700;
  color: var(--text-on-dark);
  background: rgba(21, 5, 32, .5);
  transition: border-color var(--t-fast), color var(--t-fast), transform var(--t-fast), background var(--t-fast);
}
.callm__alt:hover {
  transform: translateY(-2px);
  background: rgba(107, 47, 143, .22);
}
.callm__alt svg { width: 17px; height: 17px; fill: currentColor; }
.callm__alt--wa:hover { border-color: rgba(37, 211, 102, .5); color: #4ee08a; }
.callm__alt--tg:hover { border-color: rgba(41, 171, 226, .5); color: #5cc8ee; }

.callm__hours {
  margin-top: var(--s-5);
  font-size: .74rem;
  color: var(--text-on-dark-muted);
}

@media (max-width: 480px) {
  .callm { padding: var(--s-3); align-items: end; }
  .callm__panel { padding: var(--s-8) var(--s-5) var(--s-6); }
  .callm__alts { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  .callm, .callm__panel { transition: none; }
  .callm__panel { transform: none; }
}
