/* ==========================================================================
   IzzahTech download experience
   Loaded on the storefront (widget only) and on /download (widget + page).
   Everything page-level is scoped under body.dlp so styles never leak.
   ========================================================================== */

:root {
  --dl-ink: #0f172a;
  --dl-muted: #6B6656;
  --dl-surface: #ffffff;
  --dl-surface-2: #f6f1e6;
  --dl-border: #e5dcc8;
  --dl-hover: rgba(201, 162, 39, 0.1);
  --dl-gold: #c9a227;
  --dl-gold-deep: #a8801a;
  --dl-navy: #0f172a;
  --dl-on-gold: #191203;
}

html[data-theme="dark"] {
  --dl-ink: #e9eef8;
  --dl-muted: #9fb0c9;
  --dl-surface: #101a2d;
  --dl-surface-2: #16213a;
  --dl-border: #26344e;
  --dl-hover: rgba(201, 162, 39, 0.14);
  --dl-on-gold: #14100a;
}

/* --------------------------------------------------------------------------
   Shared animated widget: icon-only pill that grows into a labelled button
   -------------------------------------------------------------------------- */
.dl-widget {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  z-index: 70;
}

.dl-trigger {
  display: inline-flex;
  align-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, #d8b23a 0%, var(--dl-gold) 45%, var(--dl-gold-deep) 100%);
  color: var(--dl-on-gold);
  cursor: pointer;
  overflow: hidden;
  font-family: inherit;
  box-shadow: 0 4px 14px rgba(201, 162, 39, 0.32);
  transition: width 0.42s cubic-bezier(0.22, 0.61, 0.36, 1),
              box-shadow 0.25s ease, transform 0.25s ease;
}

.dl-trigger:hover,
.dl-trigger:focus-visible {
  box-shadow: 0 10px 26px rgba(201, 162, 39, 0.45);
  transform: translateY(-1px);
}

.dl-trigger:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.dl-trigger-ico {
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
}

.dl-trigger-ico svg {
  width: 19px;
  height: 19px;
  display: block;
}

.dl-trigger-label {
  max-width: 0;
  overflow: hidden;
  opacity: 0;
  padding-right: 0;
  white-space: nowrap;
  font-weight: 800;
  font-size: 0.86rem;
  letter-spacing: 0.01em;
  transform: translateX(-6px);
  transition: max-width 0.42s cubic-bezier(0.22, 0.61, 0.36, 1),
              opacity 0.22s ease 0.06s,
              transform 0.3s ease 0.04s,
              padding-right 0.3s ease;
}

.dl-widget:hover .dl-trigger,
.dl-widget:focus-within .dl-trigger,
.dl-widget.is-open .dl-trigger {
  width: 150px;
}

.dl-widget:hover .dl-trigger-label,
.dl-widget:focus-within .dl-trigger-label,
.dl-widget.is-open .dl-trigger-label {
  max-width: 110px;
  opacity: 1;
  padding-right: 16px;
  transform: none;
}

.dl-widget:hover .dl-trigger-ico svg {
  animation: dl-bob 0.55s ease;
}

@keyframes dl-bob {
  0%, 100% { transform: translateY(0); }
  45% { transform: translateY(3px); }
}

.dl-widget.is-open .dl-trigger-ico svg {
  transform: rotate(180deg);
  transition: transform 0.3s ease;
}

/* Dropdown */
.dl-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 292px;
  padding: 8px;
  border: 1px solid var(--dl-border);
  border-radius: 16px;
  background: var(--dl-surface);
  box-shadow: 0 24px 60px rgba(2, 8, 20, 0.35);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-8px) scale(0.98);
  transform-origin: top right;
  transition: opacity 0.2s ease, transform 0.22s cubic-bezier(0.22, 0.61, 0.36, 1), visibility 0.22s;
}

.dl-widget.is-open .dl-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: none;
}

.dl-menu-head {
  padding: 8px 10px 6px;
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--dl-muted);
}

.dl-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 10px;
  border-radius: 12px;
  text-decoration: none;
  color: var(--dl-ink);
  transition: background 0.18s ease, transform 0.18s ease;
}

.dl-item:hover,
.dl-item:focus-visible {
  background: var(--dl-hover);
  transform: translateX(2px);
  outline: none;
}

.dl-item-ico {
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: var(--dl-surface-2);
  color: var(--dl-ink);
}

.dl-item-ico svg { width: 20px; height: 20px; display: block; }

.dl-item--android .dl-item-ico { color: #3ddc84; background: rgba(61, 220, 132, 0.12); }
.dl-item--windows .dl-item-ico { color: #2f81f7; background: rgba(47, 129, 247, 0.14); }

.dl-item-txt { display: flex; flex-direction: column; line-height: 1.25; }
.dl-item-txt strong { font-size: 0.9rem; }
.dl-item-txt small { font-size: 0.72rem; color: var(--dl-muted); }

.dl-item-go {
  margin-left: auto;
  color: var(--dl-muted);
  font-weight: 800;
  font-size: 0.85rem;
}

.dl-item--guide {
  margin-top: 4px;
  border-top: 1px dashed var(--dl-border);
  border-radius: 0 0 12px 12px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--dl-gold-deep);
}

html[data-theme="dark"] .dl-item--guide { color: #e8c964; }

/* --------------------------------------------------------------------------
   Download page shell
   -------------------------------------------------------------------------- */
body.dlp {
  margin: 0;
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  background: #f8f5ee;
  color: var(--dl-ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

html[data-theme="dark"] body.dlp { background: #0a1020; }

body.dlp * { box-sizing: border-box; }

.dlp-nav {
  position: sticky;
  top: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px clamp(16px, 4vw, 48px);
  background: rgba(248, 245, 238, 0.86);
  border-bottom: 1px solid var(--dl-border);
  backdrop-filter: blur(12px);
}

html[data-theme="dark"] .dlp-nav { background: rgba(10, 16, 32, 0.86); }

.dlp-nav-left { display: flex; align-items: center; gap: 14px; }

.dlp-nav-logo { height: 44px; width: auto; display: block; }

html[data-theme="dark"] .dlp-nav-logo {
  filter: drop-shadow(0 0 1px rgba(255, 255, 255, 0.35));
}

.dlp-nav-link {
  color: var(--dl-muted);
  text-decoration: none;
  font-size: 0.86rem;
  font-weight: 700;
  border: 1px solid var(--dl-border);
  border-radius: 999px;
  padding: 7px 14px;
  transition: color 0.18s, border-color 0.18s;
}

.dlp-nav-link:hover { color: var(--dl-ink); border-color: var(--dl-gold-deep); }

.dlp-hero {
  position: relative;
  padding: clamp(48px, 8vw, 96px) clamp(18px, 5vw, 56px) clamp(40px, 6vw, 72px);
  text-align: center;
  color: #eef3fb;
  background:
    radial-gradient(60% 70% at 50% 0%, rgba(201, 162, 39, 0.22) 0%, rgba(201, 162, 39, 0) 62%),
    linear-gradient(160deg, #0b1222 0%, #0f172a 48%, #16213a 100%);
}

.dlp-hero::after {
  content: "";
  position: absolute;
  inset: auto 0 -1px 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(201, 162, 39, 0.55), transparent);
}

.dlp-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border: 1px solid rgba(201, 162, 39, 0.42);
  border-radius: 999px;
  background: rgba(201, 162, 39, 0.1);
  color: #e8c964;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.dlp-hero h1 {
  margin: 18px auto 12px;
  max-width: 17ch;
  font-size: clamp(2rem, 5.2vw, 3.4rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
}

.dlp-hero h1 em {
  font-style: normal;
  color: #e8c964;
}

.dlp-hero p {
  margin: 0 auto;
  max-width: 58ch;
  color: #b9c6dc;
  font-size: clamp(0.94rem, 1.6vw, 1.05rem);
}

.dlp-hero-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  margin-top: 34px;
}

.dlp-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  font-size: 0.74rem;
  color: #9fb0c9;
}

.dlp-meta span {
  padding: 4px 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
}

/* Hero variant of the widget */
.dl-widget--hero { align-items: center; }

.dl-widget--hero .dl-trigger {
  width: 64px;
  height: 64px;
  box-shadow: 0 14px 34px rgba(201, 162, 39, 0.42);
}

.dl-widget--hero .dl-trigger-ico { flex-basis: 64px; width: 64px; height: 64px; }
.dl-widget--hero .dl-trigger-ico svg { width: 26px; height: 26px; }
.dl-widget--hero .dl-trigger-label { font-size: 1.02rem; }

.dl-widget--hero:hover .dl-trigger,
.dl-widget--hero:focus-within .dl-trigger,
.dl-widget--hero.is-open .dl-trigger { width: 236px; }

.dl-widget--hero:hover .dl-trigger-label,
.dl-widget--hero:focus-within .dl-trigger-label,
.dl-widget--hero.is-open .dl-trigger-label { max-width: 180px; padding-right: 24px; }

.dl-widget--hero .dl-menu {
  top: calc(100% + 14px);
  right: auto;
  left: 50%;
  min-width: 320px;
  transform: translate(-50%, -8px) scale(0.98);
  transform-origin: top center;
  background: #0f1a2e;
  border-color: #27374f;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.55);
}

.dl-widget--hero.is-open .dl-menu { transform: translate(-50%, 0) scale(1); }

.dl-widget--hero .dl-menu .dl-item { color: #e9eef8; }
.dl-widget--hero .dl-menu .dl-item:hover { background: rgba(201, 162, 39, 0.14); }
.dl-widget--hero .dl-menu .dl-item-ico { background: rgba(255, 255, 255, 0.06); }
.dl-widget--hero .dl-menu .dl-item-txt small { color: #9fb0c9; }
.dl-widget--hero .dl-menu .dl-menu-head { color: #9fb0c9; }
.dl-widget--hero .dl-menu .dl-item--guide {
  color: #e8c964;
  border-top-color: rgba(255, 255, 255, 0.12);
}

.dlp-hero-hint {
  margin-top: 4px;
  font-size: 0.76rem;
  color: #8fa1bc;
}

/* --------------------------------------------------------------------------
   Platform cards
   -------------------------------------------------------------------------- */
.dlp-main {
  max-width: 1120px;
  margin: 0 auto;
  padding: clamp(32px, 6vw, 64px) clamp(16px, 4vw, 32px) 40px;
}

.dlp-section-title {
  margin: 0 0 6px;
  font-size: clamp(1.35rem, 3vw, 1.8rem);
  letter-spacing: -0.01em;
}

.dlp-section-sub {
  margin: 0 0 26px;
  color: var(--dl-muted);
  font-size: 0.92rem;
}

.dlp-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(330px, 1fr));
  gap: 22px;
}

.dlp-card {
  display: flex;
  flex-direction: column;
  padding: 26px;
  border: 1px solid var(--dl-border);
  border-radius: 20px;
  background: var(--dl-surface);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.06);
  scroll-margin-top: 92px;
}

html[data-theme="dark"] .dlp-card { box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45); }

.dlp-card-top { display: flex; align-items: center; gap: 14px; }

.dlp-platform-ico {
  flex: 0 0 52px;
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 15px;
}

.dlp-platform-ico svg { width: 28px; height: 28px; display: block; }

.dlp-platform-ico--android { background: rgba(61, 220, 132, 0.14); color: #1faa5f; }
.dlp-platform-ico--windows { background: rgba(47, 129, 247, 0.14); color: #2f81f7; }

html[data-theme="dark"] .dlp-platform-ico--android { color: #3ddc84; }

.dlp-card h3 { margin: 0; font-size: 1.2rem; }

.dlp-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 16px 0 18px;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--dl-muted);
}

.dlp-tags span {
  padding: 4px 9px;
  border: 1px solid var(--dl-border);
  border-radius: 999px;
  background: var(--dl-surface-2);
}

.dlp-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 14px 20px;
  border-radius: 13px;
  background: linear-gradient(135deg, #d8b23a 0%, var(--dl-gold) 48%, var(--dl-gold-deep) 100%);
  color: var(--dl-on-gold);
  font: inherit;
  font-weight: 800;
  font-size: 0.95rem;
  text-decoration: none;
  box-shadow: 0 8px 20px rgba(201, 162, 39, 0.3);
  transition: transform 0.18s ease, box-shadow 0.2s ease, filter 0.2s ease;
  overflow: hidden;
}

.dlp-btn svg { width: 19px; height: 19px; }

.dlp-btn:hover { transform: translateY(-1px); box-shadow: 0 12px 26px rgba(201, 162, 39, 0.4); filter: brightness(1.03); }
.dlp-btn:active { transform: scale(0.985); }

.dlp-btn::after {
  content: "";
  position: absolute;
  top: 0;
  left: -60%;
  width: 40%;
  height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.45), transparent);
  transform: skewX(-18deg);
}

.dlp-btn:hover::after { animation: dlp-sheen 0.9s ease; }

@keyframes dlp-sheen {
  from { left: -60%; }
  to { left: 130%; }
}

.dlp-btn--ghost {
  margin-top: 10px;
  background: transparent;
  border: 1px solid var(--dl-border);
  color: var(--dl-ink);
  box-shadow: none;
  font-weight: 700;
  font-size: 0.84rem;
}

.dlp-btn--ghost:hover { border-color: var(--dl-gold-deep); box-shadow: none; }

.dlp-note {
  margin: 16px 0 0;
  padding: 12px 14px;
  border-left: 3px solid var(--dl-gold);
  border-radius: 8px;
  background: var(--dl-surface-2);
  color: var(--dl-muted);
  font-size: 0.8rem;
}

.dlp-note strong { color: var(--dl-ink); }

/* Steps */
.dlp-steps {
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.dlp-steps li {
  position: relative;
  padding: 0 0 16px 42px;
  counter-increment: step;
  font-size: 0.88rem;
}

.dlp-steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: -1px;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--dl-border);
  background: var(--dl-surface-2);
  color: var(--dl-ink);
  font-size: 0.76rem;
  font-weight: 800;
}

.dlp-steps li:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 13px;
  top: 30px;
  bottom: 2px;
  width: 1px;
  background: var(--dl-border);
}

.dlp-steps strong { display: block; margin-bottom: 2px; }
.dlp-steps span { color: var(--dl-muted); }

/* Hash + FAQ */
.dlp-hash {
  margin-top: 18px;
  border-top: 1px dashed var(--dl-border);
  padding-top: 14px;
  font-size: 0.76rem;
  color: var(--dl-muted);
}

.dlp-hash summary { cursor: pointer; font-weight: 700; }

.dlp-hash code {
  display: block;
  margin-top: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--dl-surface-2);
  font-size: 0.68rem;
  word-break: break-all;
  color: var(--dl-ink);
}

.dlp-faq {
  margin-top: clamp(36px, 6vw, 56px);
}

.dlp-faq details {
  border: 1px solid var(--dl-border);
  border-radius: 14px;
  padding: 14px 18px;
  background: var(--dl-surface);
  margin-bottom: 10px;
}

.dlp-faq summary {
  cursor: pointer;
  font-weight: 700;
  font-size: 0.92rem;
}

.dlp-faq details p {
  margin: 10px 0 0;
  color: var(--dl-muted);
  font-size: 0.86rem;
}

.dlp-footer {
  margin-top: 48px;
  padding: 26px 18px 36px;
  border-top: 1px solid var(--dl-border);
  text-align: center;
  color: var(--dl-muted);
  font-size: 0.78rem;
}

.dlp-footer a { color: var(--dl-ink); text-decoration: none; border-bottom: 1px dotted var(--dl-border); }
.dlp-footer a:hover { border-color: var(--dl-gold-deep); }

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 720px) {
  .dl-widget--hero .dl-menu { min-width: min(88vw, 320px); }
  .dlp-nav { padding: 10px 14px; }
  .dlp-nav-logo { height: 38px; }
  .dlp-card { padding: 20px; border-radius: 17px; }
  .dlp-hero h1 { max-width: 100%; }
}

@media (max-width: 520px) {
  .dl-menu { right: -6px; min-width: min(86vw, 292px); }
  .dl-trigger { width: 38px; height: 38px; }
  .dl-trigger-ico { flex-basis: 38px; width: 38px; height: 38px; }
  .dl-widget:hover .dl-trigger,
  .dl-widget:focus-within .dl-trigger,
  .dl-widget.is-open .dl-trigger { width: 44px; }
  .dl-widget:hover .dl-trigger-label,
  .dl-widget:focus-within .dl-trigger-label,
  .dl-widget.is-open .dl-trigger-label { max-width: 0; opacity: 0; padding-right: 0; }
  .dl-widget--hero .dl-trigger { width: 60px; height: 60px; }
  .dl-widget--hero .dl-trigger-ico { flex-basis: 60px; width: 60px; height: 60px; }
}

/* Touch devices never hover: keep the header button compact, label only on open */
@media (hover: none) {
  .dl-widget:not(.dl-widget--hero):hover .dl-trigger { width: 40px; }
  .dl-widget:not(.dl-widget--hero):hover .dl-trigger-label { max-width: 0; opacity: 0; padding-right: 0; }
  .dl-widget--hero:hover .dl-trigger-label { max-width: 180px; opacity: 1; padding-right: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  .dl-trigger,
  .dl-trigger-label,
  .dl-menu,
  .dlp-btn,
  .dl-item { transition: none !important; animation: none !important; }
  .dlp-btn:hover::after,
  .dl-widget:hover .dl-trigger-ico svg { animation: none !important; }
}
