/* Al Wird — adhan widget (site-wide). Marker: aw-adhan-v2 */
#aw-adhan {
  --aw-ink: #0d2e22;
  --aw-ink-2: #2c4a3d;
  --aw-gold: #c9a24b;
  --aw-gold-soft: #e9d9b2;
  --aw-cream: #f7f3e9;
  --aw-line: rgba(13, 46, 34, .12);
  position: fixed;
  z-index: 2147482000;
  inset-block-end: 18px;
  inset-inline-start: 18px;
  font-family: inherit;
  color: var(--aw-ink);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

#aw-adhan *,
#aw-adhan *::before,
#aw-adhan *::after { box-sizing: border-box; }

#aw-adhan button { font: inherit; color: inherit; }

/* ---------------------------------------------------------------- pill */
#aw-adhan .aw-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px 10px 14px;
  border: 0;
  border-radius: 999px;
  background: var(--aw-ink);
  color: var(--aw-cream);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .01em;
  cursor: pointer;
  box-shadow: 0 10px 28px -10px rgba(13, 46, 34, .65), 0 2px 6px rgba(13, 46, 34, .18);
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
  white-space: nowrap;
}
#aw-adhan .aw-pill:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 34px -10px rgba(13, 46, 34, .7);
}
#aw-adhan .aw-pill:focus-visible { outline: 2px solid var(--aw-gold); outline-offset: 3px; }
#aw-adhan .aw-pill svg { flex: 0 0 auto; color: var(--aw-gold); }
#aw-adhan .aw-pill.is-live::after {
  content: "";
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #6fbf8b;
  box-shadow: 0 0 0 0 rgba(111, 191, 139, .7);
  animation: aw-pulse 2.4s ease-out infinite;
}
@keyframes aw-pulse {
  0% { box-shadow: 0 0 0 0 rgba(111, 191, 139, .55); }
  70% { box-shadow: 0 0 0 8px rgba(111, 191, 139, 0); }
  100% { box-shadow: 0 0 0 0 rgba(111, 191, 139, 0); }
}

/* --------------------------------------------------------------- panel */
#aw-adhan .aw-panel {
  position: absolute;
  inset-block-end: calc(100% + 10px);
  inset-inline-start: 0;
  width: min(352px, calc(100vw - 32px));
  max-height: min(84vh, 640px);
  overflow-y: auto;
  overscroll-behavior: contain;
  background: #fff;
  border: 1px solid var(--aw-line);
  border-radius: 20px;
  padding: 16px;
  box-shadow: 0 24px 60px -18px rgba(13, 46, 34, .42), 0 4px 14px rgba(13, 46, 34, .08);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px) scale(.985);
  transform-origin: bottom left;
  transition: opacity .18s ease, transform .18s ease, visibility .18s;
}
#aw-adhan[dir="rtl"] .aw-panel { transform-origin: bottom right; }
#aw-adhan.is-open .aw-panel { opacity: 1; visibility: visible; transform: none; }

#aw-adhan .aw-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-block-end: 14px;
}
#aw-adhan .aw-panel-head > div { min-width: 0; }
#aw-adhan .aw-eyebrow {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--aw-gold);
  margin-block-end: 2px;
}
#aw-adhan .aw-title {
  margin: 0;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -.01em;
  color: var(--aw-ink);
}
#aw-adhan .aw-x {
  flex: 0 0 auto;
  width: 30px; height: 30px;
  display: grid; place-items: center;
  border: 1px solid var(--aw-line);
  border-radius: 50%;
  background: #fff;
  font-size: 19px;
  line-height: 1;
  cursor: pointer;
  color: var(--aw-ink-2);
  transition: background .15s ease;
}
#aw-adhan .aw-x:hover { background: var(--aw-cream); }

/* ------------------------------------------------------------ location */
#aw-adhan .aw-loc { margin-block-end: 10px; }
#aw-adhan .aw-loc-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
  align-items: center;
}
#aw-adhan .aw-select-wrap { position: relative; display: block; min-width: 0; }
#aw-adhan .aw-select-wrap::after {
  content: "";
  position: absolute;
  inset-inline-end: 13px;
  inset-block-start: 50%;
  width: 6px; height: 6px;
  margin-block-start: -4px;
  border-right: 1.6px solid var(--aw-ink-2);
  border-bottom: 1.6px solid var(--aw-ink-2);
  transform: rotate(45deg);
  opacity: .55;
  pointer-events: none;
}
#aw-adhan .aw-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 15px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease, opacity .15s ease;
}
#aw-adhan .aw-btn[disabled] { opacity: .55; cursor: progress; }
#aw-adhan .aw-btn-gold { background: var(--aw-gold); color: #2a1f06; }
#aw-adhan .aw-btn-gold:hover { background: #d9b45f; }
#aw-adhan .aw-btn-ghost {
  background: #fff;
  border-color: var(--aw-line);
  color: var(--aw-ink-2);
}
#aw-adhan .aw-btn-ghost:hover { background: var(--aw-cream); }

#aw-adhan .aw-loc-label {
  margin: 6px 0 0;
  font-size: 11.5px;
  color: var(--aw-ink-2);
  opacity: .85;
}
#aw-adhan .aw-loc-label:empty { display: none; }

#aw-adhan .aw-select {
  width: 100%;
  margin-block-start: 0;
  padding-block: 9px;
  padding-inline: 12px 30px;
  text-overflow: ellipsis;
  border-radius: 12px;
  border: 1px solid var(--aw-line);
  background: var(--aw-cream);
  color: var(--aw-ink);
  font-size: 12.5px;
  font-weight: 600;
  appearance: none;
  cursor: pointer;
}
#aw-adhan .aw-select:focus-visible { outline: 2px solid var(--aw-gold); outline-offset: 1px; }

#aw-adhan .aw-hijri {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--aw-ink-2);
  opacity: .8;
  padding-block: 0 9px;
  border-block-end: 1px solid var(--aw-line);
}
#aw-adhan .aw-hijri:empty { display: none; }

/* ---------------------------------------------------------------- list */
#aw-adhan .aw-list {
  list-style: none;
  margin: 0;
  padding: 4px 0 2px;
}
#aw-adhan .aw-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 10px;
  border-radius: 11px;
  font-size: 13px;
  color: var(--aw-ink-2);
  transition: background .15s ease, color .15s ease;
}
#aw-adhan .aw-row-n { font-weight: 600; }
#aw-adhan .aw-row-t {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: .01em;
}
#aw-adhan .aw-row.is-next {
  background: var(--aw-cream);
  color: var(--aw-ink);
  box-shadow: inset 0 0 0 1px var(--aw-gold-soft);
}
#aw-adhan .aw-row.is-next .aw-row-t { color: #8a6a1d; }

#aw-adhan .aw-next-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-block-start: 6px;
  padding-block: 9px;
  border-block: 1px solid var(--aw-line);
  font-size: 12px;
  color: var(--aw-ink-2);
}
#aw-adhan .aw-next-row b { font-size: 12.5px; color: var(--aw-ink); }

/* ------------------------------------------------------------ switches */
#aw-adhan .aw-switches { padding-block: 10px 8px; display: grid; gap: 10px; }
#aw-adhan .aw-switch {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}
#aw-adhan .aw-switch input {
  position: absolute;
  opacity: 0;
  width: 0; height: 0;
}
#aw-adhan .aw-switch-track {
  position: relative;
  width: 40px; height: 23px;
  border-radius: 999px;
  background: #d8d5cc;
  transition: background .18s ease;
  margin-block-start: 1px;
}
#aw-adhan .aw-switch-dot {
  position: absolute;
  inset-block-start: 3px;
  inset-inline-start: 3px;
  width: 17px; height: 17px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .22);
  transition: transform .18s ease;
}
#aw-adhan .aw-switch input:checked ~ .aw-switch-track { background: var(--aw-ink); }
#aw-adhan .aw-switch input:checked ~ .aw-switch-track .aw-switch-dot { transform: translateX(17px); }
#aw-adhan[dir="rtl"] .aw-switch input:checked ~ .aw-switch-track .aw-switch-dot { transform: translateX(-17px); }
#aw-adhan .aw-switch input:focus-visible ~ .aw-switch-track { outline: 2px solid var(--aw-gold); outline-offset: 3px; }
#aw-adhan .aw-switch-txt { display: grid; gap: 1px; }
#aw-adhan .aw-switch-txt b { font-size: 12.5px; font-weight: 700; color: var(--aw-ink); }
#aw-adhan .aw-switch-txt small { font-size: 11px; color: var(--aw-ink-2); opacity: .78; }

#aw-adhan .aw-row2 {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px;
  align-items: center;
  padding-block-start: 4px;
}
#aw-adhan .aw-select-sm { margin: 0; padding-block: 8px; font-size: 12px; }

/* --------------------------------------------------------------- misc */
#aw-adhan .aw-msg {
  margin: 8px 0 0;
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.45;
  display: none;
}
#aw-adhan .aw-msg.is-on { display: block; }
#aw-adhan .aw-msg.is-error { color: #a8352a; }
#aw-adhan .aw-msg.is-warn { color: #9a6b12; }
#aw-adhan .aw-msg.is-ok { color: #2c6b47; }
#aw-adhan .aw-msg.is-info { color: var(--aw-ink-2); }

#aw-adhan .aw-foot {
  margin: 10px 0 0;
  padding-block-start: 10px;
  border-block-start: 1px solid var(--aw-line);
  font-size: 10.5px;
  line-height: 1.6;
  color: var(--aw-ink-2);
  opacity: .72;
}
#aw-adhan .aw-credit { opacity: .8; }

/* -------------------------------------------------------------- toast */
#aw-adhan .aw-toast {
  position: fixed;
  inset-inline: 16px;
  inset-block-end: 84px;
  display: flex;
  justify-content: center;
  pointer-events: none;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity .25s ease, transform .25s ease;
}
#aw-adhan .aw-toast.is-on { opacity: 1; transform: none; pointer-events: auto; }
#aw-adhan .aw-toast-card {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 440px;
  width: 100%;
  padding: 12px 14px;
  border-radius: 16px;
  background: var(--aw-ink);
  color: var(--aw-cream);
  box-shadow: 0 20px 50px -16px rgba(13, 46, 34, .6);
}
#aw-adhan .aw-toast-ico {
  flex: 0 0 auto;
  width: 34px; height: 34px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: rgba(201, 162, 75, .16);
  color: var(--aw-gold);
}
#aw-adhan .aw-toast-body { flex: 1 1 auto; min-width: 0; }
#aw-adhan .aw-toast-title {
  display: block;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
#aw-adhan .aw-toast-sub {
  display: block;
  font-size: 11.5px;
  opacity: .72;
  font-variant-numeric: tabular-nums;
}
#aw-adhan .aw-toast-btn {
  flex: 0 0 auto;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid rgba(247, 243, 233, .22);
  background: transparent;
  color: var(--aw-cream);
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
}
#aw-adhan .aw-toast-btn:hover { background: rgba(247, 243, 233, .1); }
#aw-adhan .aw-toast-x {
  flex: 0 0 auto;
  width: 26px; height: 26px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--aw-cream);
  opacity: .6;
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
}
#aw-adhan .aw-toast-x:hover { opacity: 1; }

/* --------------------------------------------------------- responsive */
/* ---------------------------------------------------- adhan settings */
#aw-adhan .aw-set {
  margin-block: 2px 10px;
  border: 1px solid var(--aw-line);
  border-radius: 14px;
  background: #fff;
  overflow: hidden;
}
#aw-adhan .aw-set-sum {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 11px 13px;
  cursor: pointer;
  list-style: none;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--aw-ink);
  -webkit-tap-highlight-color: transparent;
}
#aw-adhan .aw-set-sum::-webkit-details-marker { display: none; }
#aw-adhan .aw-set-sum:hover { background: var(--aw-cream); }
#aw-adhan .aw-set-sum:focus-visible { outline: 2px solid var(--aw-gold); outline-offset: -2px; border-radius: 14px; }
#aw-adhan .aw-set-sum svg { flex: 0 0 auto; color: var(--aw-gold); }
#aw-adhan .aw-set-lbl { flex: 0 0 auto; }
#aw-adhan .aw-set-now {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 11px;
  font-weight: 600;
  color: var(--aw-ink-2);
  opacity: .78;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: end;
}
#aw-adhan .aw-set-chev {
  flex: 0 0 auto;
  width: 7px;
  height: 7px;
  margin-block-end: 3px;
  border-right: 1.8px solid currentColor;
  border-bottom: 1.8px solid currentColor;
  transform: rotate(45deg);
  opacity: .5;
  transition: transform .2s ease;
}
#aw-adhan .aw-set[open] .aw-set-chev { transform: rotate(225deg); margin-block-end: -2px; }

#aw-adhan .aw-set-body {
  display: grid;
  gap: 11px;
  padding: 12px 13px 13px;
  border-block-start: 1px solid var(--aw-line);
  background: #fcfbf8;
}
#aw-adhan .aw-field { display: grid; gap: 6px; }
#aw-adhan .aw-field-l { font-size: 11px; font-weight: 700; color: var(--aw-ink-2); letter-spacing: .01em; }
#aw-adhan .aw-field .aw-select { width: 100%; margin: 0; }
#aw-adhan .aw-field.is-off { opacity: .4; pointer-events: none; }

#aw-adhan .aw-vol { display: flex; align-items: center; gap: 9px; }
#aw-adhan .aw-vol-btn {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid var(--aw-line);
  border-radius: 10px;
  background: #fff;
  color: var(--aw-ink);
  cursor: pointer;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
#aw-adhan .aw-vol-btn:hover { background: var(--aw-cream); }
#aw-adhan .aw-vol-btn:focus-visible { outline: 2px solid var(--aw-gold); outline-offset: 2px; }
#aw-adhan .aw-vol-btn .aw-ico-off { display: none; }
#aw-adhan .aw-vol-btn.is-muted { color: #a8352a; border-color: rgba(168, 53, 42, .3); background: rgba(168, 53, 42, .06); }
#aw-adhan .aw-vol-btn.is-muted .aw-ico-on { display: none; }
#aw-adhan .aw-vol-btn.is-muted .aw-ico-off { display: block; }

#aw-adhan .aw-vol input[type="range"] {
  flex: 1 1 auto;
  min-width: 0;
  height: 22px;
  margin: 0;
  padding: 0;
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  cursor: pointer;
}
#aw-adhan .aw-vol input[type="range"]::-webkit-slider-runnable-track {
  height: 5px;
  border-radius: 99px;
  background: linear-gradient(to right, var(--aw-gold) var(--aw-pct, 70%), rgba(13, 46, 34, .14) var(--aw-pct, 70%));
}
#aw-adhan[dir="rtl"] .aw-vol input[type="range"]::-webkit-slider-runnable-track {
  background: linear-gradient(to left, var(--aw-gold) var(--aw-pct, 70%), rgba(13, 46, 34, .14) var(--aw-pct, 70%));
}
#aw-adhan .aw-vol input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  margin-block-start: -5.5px;
  border-radius: 50%;
  background: #fff;
  border: 2.5px solid var(--aw-ink);
  box-shadow: 0 1px 4px rgba(13, 46, 34, .25);
}
#aw-adhan .aw-vol input[type="range"]::-moz-range-track {
  height: 5px;
  border-radius: 99px;
  background: rgba(13, 46, 34, .14);
}
#aw-adhan .aw-vol input[type="range"]::-moz-range-progress {
  height: 5px;
  border-radius: 99px;
  background: var(--aw-gold);
}
#aw-adhan .aw-vol input[type="range"]::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border: 2.5px solid var(--aw-ink);
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(13, 46, 34, .25);
}
#aw-adhan .aw-vol input[type="range"]:focus-visible { outline: 2px solid var(--aw-gold); outline-offset: 4px; border-radius: 99px; }

#aw-adhan .aw-vol-val {
  flex: 0 0 auto;
  min-width: 40px;
  text-align: end;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--aw-ink-2);
  font-variant-numeric: tabular-nums;
}

#aw-adhan .aw-note {
  margin: 0;
  padding: 9px 11px;
  border-radius: 10px;
  background: var(--aw-cream);
  color: var(--aw-ink-2);
  font-size: 11px;
  line-height: 1.65;
}
#aw-adhan .aw-note[hidden] { display: none; }
#aw-adhan[dir="rtl"] .aw-note { line-height: 1.8; }

@media (max-width: 520px) {
  #aw-adhan { inset-block-end: 12px; inset-inline-start: 12px; }
  #aw-adhan .aw-pill { padding: 9px 14px 9px 12px; font-size: 12.5px; }
  #aw-adhan .aw-panel { width: calc(100vw - 24px); max-height: 76vh; border-radius: 18px; padding: 16px; }
  #aw-adhan .aw-toast { inset-block-end: 74px; }
}

@media (prefers-reduced-motion: reduce) {
  #aw-adhan .aw-pill,
  #aw-adhan .aw-panel,
  #aw-adhan .aw-toast { transition: none; }
  #aw-adhan .aw-pill.is-live::after { animation: none; }
}

@media print {
  #aw-adhan { display: none !important; }
}
