/* Afrah submit — Lab shell */
.jf-afrah-submit {
  --jf-as-ink: #1a1a1a;
  --jf-as-muted: #5c6570;
  --jf-as-line: rgba(26, 26, 26, 0.12);
  --jf-as-red: #e3000f;
  --jf-as-soft: #fff7f8;
  max-width: 720px;
  margin-inline: auto;
  padding: 1rem 1rem 5.5rem;
}

.jf-afrah-submit__eyebrow {
  margin: 0 0 0.35rem;
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--jf-as-red);
  letter-spacing: 0.06em;
}

.jf-afrah-submit__title {
  margin: 0;
  font-size: clamp(1.4rem, 5vw, 1.85rem);
  font-weight: 900;
  color: var(--jf-as-ink);
}

.jf-afrah-submit__sub {
  margin: 0.4rem 0 0;
  font-size: 0.9rem;
  color: var(--jf-as-muted);
  line-height: 1.5;
}

.jf-afrah-submit__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.9rem;
}

.jf-afrah-submit__status {
  min-height: 1.25rem;
  margin: 0.75rem 0;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--jf-as-muted);
}

.jf-afrah-submit__status.is-ok { color: #0a7a3e; }
.jf-afrah-submit__status.is-err { color: var(--jf-as-red); }

.jf-afrah-submit__panel {
  margin: 1rem 0;
  padding: 1rem;
  border: 1px solid var(--jf-as-line);
  border-radius: 14px;
  background: #fff;
}

.jf-afrah-submit__h {
  margin: 0 0 0.75rem;
  font-size: 1rem;
  font-weight: 900;
  color: var(--jf-as-ink);
}

.jf-afrah-submit__grid {
  display: grid;
  gap: 0.75rem;
}

@media (min-width: 560px) {
  .jf-afrah-submit__grid {
    grid-template-columns: 1fr 1fr;
  }
  .jf-afrah-submit__field--full {
    grid-column: 1 / -1;
  }
}

.jf-afrah-submit__field label,
.jf-afrah-submit__label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--jf-as-ink);
}

.jf-afrah-submit__label--lg {
  margin-top: 0;
  font-size: 1rem;
  font-weight: 900;
}

.jf-afrah-submit__compose {
  margin-bottom: 0.85rem;
  padding: 1rem 0.95rem 1.05rem;
  border-radius: 16px;
  border: 1px solid var(--jf-as-line);
  background:
    radial-gradient(90% 80% at 0% 0%, rgba(227, 0, 15, 0.06), transparent 55%),
    #fff;
}

.jf-afrah-submit__compose .jf-afrah-submit__hint {
  margin: 0.35rem 0 0.65rem;
  line-height: 1.5;
}

.jf-afrah-submit__textarea--hero {
  min-height: 168px;
  background: #fff;
  border-color: color-mix(in srgb, var(--jf-as-red) 22%, var(--jf-as-line));
}

.jf-afrah-submit__continue {
  width: 100%;
  margin-top: 0.75rem;
  min-height: 48px;
  font-weight: 900;
}

.jf-afrah-submit__continue.is-busy {
  opacity: 0.78;
  pointer-events: none;
}

.jf-afrah-submit__continue[hidden] {
  display: none !important;
}

.jf-afrah-submit__input,
.jf-afrah-submit__textarea {
  width: 100%;
  border: 1px solid var(--jf-as-line);
  border-radius: 10px;
  padding: 0.65rem 0.75rem;
  font: inherit;
  font-size: 0.9rem;
  background: #fafafa;
}

.jf-afrah-submit__hint {
  margin: 0.35rem 0 0;
  font-size: 0.72rem;
  color: var(--jf-as-muted);
}

.jf-afrah-submit__checkset {
  border: 0;
  margin: 0 0 0.85rem;
  padding: 0;
}

.jf-afrah-submit__checkset legend {
  font-size: 0.75rem;
  font-weight: 800;
  margin-bottom: 0.4rem;
}

.jf-afrah-submit__check {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-inline-end: 0.85rem;
  font-size: 0.85rem;
  font-weight: 700;
}

.jf-afrah-submit__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.4rem;
}

.jf-afrah-submit__chip {
  border: 1px solid var(--jf-as-line);
  border-radius: 999px;
  padding: 0.25rem 0.65rem;
  font: inherit;
  font-size: 0.72rem;
  font-weight: 800;
  background: #fff;
  cursor: pointer;
}

.jf-afrah-submit__range {
  width: 100%;
}

.jf-afrah-submit__portraits {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.5rem;
}

.jf-afrah-submit__btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  border-radius: 12px;
  padding: 0.75rem 1rem;
  font: inherit;
  font-weight: 800;
  border: 1px solid transparent;
  cursor: pointer;
  margin-top: 0.45rem;
}

.jf-afrah-submit__btn--primary {
  background: var(--jf-as-red);
  color: #fff;
}

.jf-afrah-submit__btn--ghost {
  background: var(--jf-as-soft);
  color: var(--jf-as-red);
  border-color: rgba(227, 0, 15, 0.25);
}

.jf-afrah-submit__panel--actions {
  position: sticky;
  bottom: 4.5rem;
  z-index: 5;
  box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.06);
}

.jf-afrah-submit__form:not(.is-unlocked) .jf-afrah-submit__rest {
  display: none;
}

.jf-afrah-submit__rest[hidden] {
  display: none !important;
}

@media (min-width: 768px) {
  .jf-afrah-submit__panel--actions {
    position: static;
    box-shadow: none;
  }
}

body.jf-afrah-preview-open {
  overflow: hidden;
}

.jf-afrah-preview-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.jf-afrah-preview-overlay[hidden] {
  display: none !important;
}

.jf-afrah-preview-overlay__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 10, 12, 0.55);
}

.jf-afrah-preview-overlay__sheet {
  position: relative;
  z-index: 1;
  width: min(420px, 100%);
  max-height: min(92vh, 860px);
  overflow: auto;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.28);
  padding: 0.85rem 0.85rem 1rem;
}

.jf-afrah-preview-overlay__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.65rem;
}

.jf-afrah-preview-overlay__title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 900;
  color: #111;
}

.jf-afrah-preview-overlay__close {
  border: 1px solid rgba(0, 0, 0, 0.12);
  background: #f6f6f6;
  color: #222;
  border-radius: 999px;
  min-height: 36px;
  padding: 0.35rem 0.85rem;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 800;
  cursor: pointer;
}

.jf-afrah-preview-overlay__mount {
  display: flex;
  justify-content: center;
  min-height: 220px;
}

.jf-afrah-preview-scaler {
  width: 100%;
  display: flex;
  justify-content: center;
}

.jf-afrah-preview-scaler .jsg-story,
.jf-afrah-preview-scaler .jsg-wedding-story,
.jf-afrah-preview-scaler [class*="story"] {
  max-width: 100%;
}

.jf-afrah-preview-overlay__loading {
  margin: 2rem 0;
  text-align: center;
  font-size: 0.88rem;
  font-weight: 800;
  color: #444;
}

.jf-afrah-preview-overlay__loading.is-err {
  color: #922b21;
}

.afrah-saraya-balance {
  position: fixed;
  z-index: 60;
  inset-inline-start: 0.85rem;
  bottom: 0.85rem;
  margin: 0;
  padding: 0.45rem 0.7rem;
  border-radius: 999px;
  background: rgba(20, 40, 28, 0.88);
  color: #e8f8ef;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
  pointer-events: none;
}

.afrah-saraya-award-toast {
  position: fixed;
  z-index: 70;
  left: 50%;
  top: 18%;
  transform: translate(-50%, -8px);
  margin: 0;
  padding: 0.7rem 1.1rem;
  border-radius: 0.75rem;
  background: #1e6b3a;
  color: #fff;
  font-size: 1.05rem;
  font-weight: 900;
  box-shadow: 0 10px 28px rgba(30, 107, 58, 0.35);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.afrah-saraya-award-toast.is-show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.afrah-saraya-award-toast.is-hide {
  opacity: 0;
  transform: translate(-50%, -8px);
}
