/* About page — standalone full page, modeled on welcome.css. Loads theme.css for
   the design tokens; everything here is self-contained (popup.css is not loaded). */

body {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  /* Center the card when it fits; when the content is taller than the window
     (the fixed 360×600 desktop tray window, or a short phone) fall back to
     top-aligned and let the page scroll. `safe` keeps the top of the card from
     being clipped and unreachable — the bug that broke the desktop/mobile view. */
  justify-content: safe center;
  min-height: 100dvh;
  padding: 24px;
  /* Respect notches / rounded corners on phones. */
  padding-top: max(24px, env(safe-area-inset-top));
  padding-bottom: max(24px, env(safe-area-inset-bottom));
  overflow-x: hidden;
}

.card {
  position: relative;
  z-index: 1;
  max-width: 480px;
  width: 100%;
  padding: 26px 22px;
  margin: 0;
}

.card.about {
  text-align: center;
  display: flex;
  flex-direction: column;
}

.logo { font-size: 40px; line-height: 1; margin-bottom: 12px; }

h1 {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 6px;
}
[dir="rtl"] h1 { font-family: var(--font-arabic); }

.about-version {
  font-size: 12px;
  color: var(--muted-foreground);
  margin-bottom: 16px;
  font-variant-numeric: tabular-nums;
}
.about-version[hidden] { display: none; }

.lead {
  color: var(--muted-foreground);
  line-height: 1.7;
  margin-bottom: 22px;
}

/* ---- Sadaqah (ongoing-charity) dedication --------------------------------- */

.sadaqah {
  padding: 20px;
  margin-bottom: 22px;
  text-align: center;
}

.sadaqah h2 {
  font-size: 14px;
  color: var(--teal);
  margin-bottom: 16px;
  line-height: 1.6;
}

.sadaqah-names {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
}

.sadaqah-names li {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 4px;
}

/* A soft, centered hairline between names (fades out at both ends). */
.sadaqah-names li + li::before {
  content: "";
  position: absolute;
  top: 0;
  inset-inline: 18%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--teal), transparent);
  opacity: 0.35;
}

/* Names are always shown in Arabic (prominent); a transliteration sits on a
   quieter line below in non-Arabic-script UIs. */
.ded-ar {
  font-family: var(--font-arabic);
  direction: rtl;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.7;
  color: var(--color-foreground);
}
.sadaqah-names .ded-ar { font-size: 20px; line-height: 1.75; letter-spacing: 0.01em; }

.ded-translit {
  font-size: 13px;
  line-height: 1.45;
  color: var(--muted-foreground);
}
.ded-translit[hidden] { display: none; }

.sadaqah-all {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.sadaqah-all .ded-ar { font-size: 16px; font-weight: 600; }

/* ---- Back button ---------------------------------------------------------- */

.about-back {
  margin-top: 4px;
  padding: 12px 16px;
  border-radius: var(--radius);
  border: none;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  color: #04211c;
  background: var(--teal);
  transition: filter 0.15s;
}
.about-back:hover { filter: brightness(1.1); }

/* Names without Arabic script (a request written only in, say, English). */
.ded-main {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.6;
  color: var(--color-foreground);
}

/* ---- "Add a name" request (signed-in players) ----------------------------- */

.ded-request {
  padding: 20px;
  margin-bottom: 22px;
  text-align: start;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.ded-request [hidden] { display: none !important; }
.ded-request h2 { font-size: 14px; color: var(--teal); line-height: 1.6; }
.ded-request h3 { font-size: 13px; margin-top: 6px; }
.ded-intro, .ded-note { color: var(--muted-foreground); font-size: 13px; line-height: 1.7; }
/* "Requests are reviewed before publishing": sits right under the request button. */
.ded-review-note { margin-top: -4px; font-size: 12.5px; }
#ded-open[hidden] + .ded-review-note { display: none; }

.ded-btn {
  display: inline-block;
  align-self: flex-start;
  padding: 10px 16px;
  border-radius: var(--radius);
  border: none;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  color: #04211c;
  background: var(--teal);
  text-decoration: none;
}
.ded-btn:disabled { opacity: 0.6; cursor: default; }
.ded-link {
  background: none;
  border: none;
  font-family: inherit;
  color: var(--muted-foreground);
  cursor: pointer;
  text-decoration: underline;
}

#ded-form { display: flex; flex-direction: column; gap: 8px; }
.ded-field { display: flex; flex-direction: column; gap: 3px; font-size: 12.5px; color: var(--muted-foreground); }
.ded-field input, #ded-note {
  box-sizing: border-box;
  width: 100%;
  font: inherit;
  font-size: 15px;
  color: var(--color-foreground);
  background: var(--input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 9px 10px;
}
#ded-note { resize: vertical; }
#ded-more summary { cursor: pointer; font-size: 13px; color: var(--muted-foreground); margin: 4px 0; }
#ded-more-fields { display: flex; flex-direction: column; gap: 8px; }
.ded-actions { display: flex; gap: 12px; align-items: center; }
.ded-msg { font-size: 13px; line-height: 1.6; color: var(--teal); }

.ded-mine { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.ded-mine li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.ded-mine-name { font-weight: 600; flex: 1; min-width: 0; overflow-wrap: anywhere; }
.ded-status { font-size: 12px; padding: 2px 8px; border-radius: 999px; background: var(--secondary); }
.ded-approved { color: #04211c; background: var(--teal); }
.ded-rejected { background: rgba(140, 52, 50, 0.6); }
.ded-reason { flex-basis: 100%; font-size: 12.5px; color: var(--muted-foreground); }
