/* Header toggle feedback (EN/AR pill knob and the switching overlay), generated from the marketing site's
   styles/scss/components/_switch-feedback.scss: npx sass --no-source-map --style=expanded <that file>. */
/*
 * Feedback for the header toggles.
 * 1. .sh-langpill: the EN / AR pill. The knob springs between the two sides (stiffness 500, damping 30,
 *    sampled into a CSS linear() easing: about 6% overshoot, settled in 0.46s) while the labels cross-fade.
 * 2. .tk-switch: the transient full-screen overlay (veil + frosted chip) shown for 500ms on every theme
 *    or language click. Colours and shadows are the --tk-switch-* tokens in base/_theme.scss.
 * Copied for takaful-buy as public/app/css/switch-feedback.css (compile this file, keep the header line).
 */
.sh-header .sh-langpill {
  position: relative;
  flex: none;
  display: inline-flex;
  align-items: center;
  width: 64px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  box-shadow: inset 0 0 0 1.5px var(--sh-line-strong);
  transition: box-shadow 0.2s, background 0.2s;
  isolation: isolate;
  font-size: 12px;
  font-weight: var(--fw-bold, 700);
  letter-spacing: 0.02em;
}

.sh-header .sh-langpill:hover {
  border: 0;
  box-shadow: inset 0 0 0 1.5px var(--sh-green-deep);
}

.sh-langpill__knob {
  position: absolute;
  top: 2px;
  left: 2px;
  z-index: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--sh-grad);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
  transform: translateX(0);
  transition: transform 0.46s cubic-bezier(0.34, 1.3, 0.64, 1);
}
@supports (transition-timing-function: linear(0, 1)) {
  .sh-langpill__knob {
    transition-timing-function: linear(0, 0.058, 0.193, 0.362, 0.532, 0.686, 0.813, 0.91, 0.979, 1.023, 1.048, 1.057, 1.057, 1.051, 1.042, 1.032, 1.022, 1.014, 1.008, 1.003, 1, 0.998, 0.997, 0.997, 0.997, 0.997, 0.998, 0.998, 1);
  }
}

.sh-langpill[data-lang=ar] .sh-langpill__knob {
  transform: translateX(32px);
}

.sh-langpill__opt {
  position: relative;
  z-index: 1;
  flex: 1 1 0;
  text-align: center;
  line-height: 32px;
  color: var(--sh-muted);
  transition: color 0.3s ease;
}

.sh-langpill__opt[lang=ar] {
  font-family: "Noto Kufi Arabic", sans-serif;
  font-size: 19px;
  font-weight: 500;
  line-height: 26px;
  letter-spacing: 0;
  top: -2px;
}

.sh-langpill__opt.is-active {
  color: #fff;
  text-shadow: 0 1px 1px rgba(0, 60, 40, 0.25);
}

[data-theme=dark] .sh-langpill__opt.is-active {
  color: #10201a;
  text-shadow: none;
}

.tk-switch {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  display: grid;
  place-items: center;
  pointer-events: none;
}

.tk-switch__veil,
.tk-switch__chip {
  opacity: 0;
  transition: opacity 0.3s ease;
}

.tk-switch.is-on .tk-switch__veil,
.tk-switch.is-on .tk-switch__chip {
  opacity: 1;
  transition-duration: 0.15s;
}

.tk-switch.is-instant.is-on .tk-switch__veil,
.tk-switch.is-instant.is-on .tk-switch__chip {
  transition-duration: 0s;
}

.tk-switch__veil {
  position: absolute;
  inset: 0;
  background: var(--tk-switch-veil);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.tk-switch__chip {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 16px 28px;
  border-radius: 999px;
  border: 1px solid var(--tk-switch-chip-border);
  background: var(--tk-switch-chip-bg);
  color: var(--tk-switch-chip-ink);
  box-shadow: var(--tk-switch-chip-shadow);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  backdrop-filter: blur(20px) saturate(180%);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
}
.tk-switch__chip .sh-ic {
  width: 22px;
  height: 22px;
  flex: none;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.tk-switch__chip--sun .sh-ic {
  color: var(--tk-switch-sun);
}

.tk-switch__chip--moon .sh-ic {
  color: var(--tk-switch-moon);
}

.tk-switch__chip--translate .sh-ic {
  color: var(--tk-switch-translate);
}

@media (prefers-reduced-motion: reduce) {
  .sh-langpill__knob {
    transition: none;
  }
}
