/* Faiq's built apps (Emotions, FDHRI, BlackMirror) dressed like the site. Linked from each app's index.html. */

/* Inside a frame that grows to its content, 100vh boxes feed back and the page becomes endless (41,000px). */
.min-h-screen, [class*="min-h-dvh"], [class*="min-h-svh"], [class*="min-h-[100vh]"] { min-height: 0 !important; }
.h-screen { height: auto !important; }
html, body, #root { min-height: 0 !important; height: auto !important; }

/* The site's width and type, not a narrow column. */
#root > div[class*="max-w-"] { max-width: min(1120px, 100%) !important; }
body { font-family: 'IBM Plex Sans Arabic', 'Tajawal', sans-serif !important; }
#root { font-size: 17px; line-height: 1.85; }
h1, h2, h3, .font-alexandria { font-family: 'Reem Kufi', 'Amiri', serif !important; letter-spacing: 0 !important; }
#root p { text-align: justify; text-wrap: pretty; }

/* No portrait inside the tools (Faiq, 23 Nov). */
img[src*="faiq.png"], div:has(> img[src*="faiq.png"]:only-child) { display: none !important; }

/* Pop-ups: in a frame as tall as its content, the frame's centre is far below the reader. Pin them near the top
   (frame-fit.js also scrolls the page to the frame when one opens). */
.fixed.inset-0.items-center { align-items: flex-start !important; padding-top: 96px !important; }

/* Faiq (23 Nov): the readiness scale should read like the site pages: wide, larger type, calm cards, pill buttons. */
#root .max-w-2xl, #root .max-w-3xl, #root .max-w-4xl { max-width: min(1080px, 100%) !important; }
#root .text-xs { font-size: 13.5px !important; line-height: 1.8 !important; }
#root .text-sm { font-size: 16px !important; line-height: 1.9 !important; }
#root .text-base { font-size: 17px !important; line-height: 1.9 !important; }
#root h1 { font-size: clamp(1.9rem, 4vw, 2.7rem) !important; line-height: 1.4 !important; }
#root h2 { font-size: clamp(1.4rem, 3vw, 2rem) !important; line-height: 1.5 !important; }
#root h3 { font-size: clamp(1.15rem, 2.4vw, 1.45rem) !important; }
#root .rounded-2xl.border { border-radius: 22px !important; box-shadow: none !important; padding: clamp(22px, 4vw, 44px) !important; }
#root button.rounded-xl, #root a.rounded-xl { border-radius: 999px !important; }
#root button[class*="bg-amber-5"] { font-family: 'Reem Kufi', 'Amiri', serif !important; font-size: 17px !important; min-height: 52px; }
#root input, #root select, #root textarea { font-size: 16px !important; min-height: 48px; border-radius: 14px !important; }

/* Faiq, 28 Nov: no white cards; gold-tinted cards with a little motion, like the rest of the site. */
:root, :host, [data-faiq] { --fq-surface: color-mix(in oklab, var(--fq-gold) 8%, var(--fq-bg)) !important; }
#root [class*="bg-app-surface"], #root [class*="bg-white"], #root [class*="bg-neutral-9"], #root [class*="bg-zinc-9"], #root [class*="bg-stone-9"] {
  background: linear-gradient(160deg, color-mix(in oklab, var(--fq-gold) 12%, var(--fq-bg)), color-mix(in oklab, var(--fq-gold) 5%, var(--fq-bg))) !important;
  border-color: color-mix(in oklab, var(--fq-gold) 35%, transparent) !important;
}
#root main button.group, #root button[class*="rounded-xl"][class*="text-start"], #root .rounded-2xl.border {
  border: 1px solid color-mix(in oklab, var(--fq-gold) 32%, transparent) !important;
  transition: transform .35s cubic-bezier(.2,.8,.2,1), box-shadow .35s ease, border-color .35s ease !important;
}
#root main button.group:hover, #root button[class*="rounded-xl"][class*="text-start"]:hover {
  transform: translateY(-2px); border-color: var(--fq-gold) !important;
  box-shadow: 0 10px 26px color-mix(in oklab, var(--fq-gold) 22%, transparent) !important;
}
#root main section, #root .rounded-2xl.border { animation: fqRise .6s cubic-bezier(.2,.8,.2,1) both; }
@keyframes fqRise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { #root main section, #root .rounded-2xl.border { animation: none; } }
/* the app writes «classname» (a typo), so the gold accent on «حالتك الآن» never applied */
#root h1 em { font-style: normal; color: var(--fq-gold); }
#root h1 { background: linear-gradient(90deg, var(--fq-ink), var(--fq-gold), var(--fq-ink)); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: fqShine 6s ease-in-out infinite; }
@keyframes fqShine { 0%, 100% { background-position: 0 0; } 50% { background-position: 100% 0; } }
#root main button.group:not([class*="accenttint"]):not([class*="bg-app-accent "]) { background: linear-gradient(160deg, color-mix(in oklab, var(--fq-gold) 10%, var(--fq-bg)), color-mix(in oklab, var(--fq-gold) 4%, var(--fq-bg))) !important; }
