/*
 * DGA government-website verification banner (collapsible "How to verify").
 * Colors/spacing taken from the client's own supplied CSS
 * (updates/2/CSS - MISA.txt), re-pointed at DGA design tokens where they
 * match a named token 1:1, so this stays in sync with future token updates
 * -- see partials/dga-verification-banner.blade.php for the full context.
 */

.dga-verification-banner {
  width: 100%;
  background-color: var(--colors-neutral-100);
}

/* The footer's own background (Tailwind bg-gray-50, #f9fafb) is nearly
   identical to --colors-neutral-100 (#f3f4f6) -- against the header's
   white background this same gray reads fine, but sitting directly above
   the footer's near-matching gray leaves no visible seam. A solid
   white background was tried first, but with the newsletter section
   currently hidden sitewide, the banner sits directly against the
   page's own white body content above it too -- so a plain color swap
   just moves the blending problem to the other edge instead of fixing
   it. A border is robust regardless of what's actually adjacent above
   or below -- same technique the old digital-stamp badge used
   (.dga-stamp-bar, now removed) before this banner replaced it. */
.dga-verification-banner--footer {
  border-bottom: 1px solid var(--border-neutral-primary);
}

.dga-verification-banner__header {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--spacing-3);
  padding-top: var(--spacing-2);
  padding-bottom: var(--spacing-2);
}

/* Icon + label always share one row (own nowrap flex context, isolated
   from the header's own wrap behavior) -- the label's text wraps
   normally within its shrunk width; only the toggle button (a sibling
   of this whole block, not inside it) drops to its own line on narrow
   screens. */
.dga-verification-banner__icon-label {
  display: flex;
  align-items: flex-start;
  flex-wrap: nowrap;
  gap: var(--spacing-3);
  flex: 0 1 auto;
  min-width: 0;
}
.dga-verification-banner__shield {
  flex-shrink: 0;
  margin-top: 2px;
}

.dga-verification-banner__label {
  margin: 0;
  color: var(--text-default);
  font-family: var(--font-family-arabic);
  font-size: var(--font-size-text-small);
  line-height: var(--line-height-text-small);
  flex: 1 1 auto;
  min-width: 0;
}

.dga-verification-banner__toggle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
  flex-shrink: 0;
}
.dga-verification-banner__toggle span {
  color: var(--text-primary);
  font-family: var(--font-family-arabic);
  font-size: var(--font-size-text-small);
  line-height: var(--line-height-text-small);
}
.dga-verification-banner__toggle:focus-visible {
  outline: 2px solid var(--border-primary);
  outline-offset: 2px;
  border-radius: var(--radius-xs);
}

.dga-verification-banner__chevron {
  transition: transform 0.2s ease;
}
.dga-verification-banner__chevron.is-open {
  transform: rotate(180deg);
}

.dga-verification-banner__body {
  padding-top: var(--spacing-10);
  padding-bottom: var(--spacing-8);
}

.dga-verification-banner__grid {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-8);
  margin-bottom: var(--spacing-8);
}

.dga-verification-banner__item {
  display: flex;
  align-items: flex-start;
  gap: var(--spacing-4-5, 18px);
  flex: 1 1 280px;
}

.dga-verification-banner__icon {
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-success);
  border-radius: var(--radius-full);
  flex-shrink: 0;
}

.dga-verification-banner__item-title {
  margin: 0 0 var(--spacing-3) 0;
  color: var(--text-default);
  font-family: var(--font-family-arabic);
  font-size: var(--font-size-text-lg);
  line-height: var(--line-height-text-lg);
}
.dga-verification-banner__accent {
  color: var(--text-primary);
}
.dga-verification-banner__item-text {
  margin: 0;
  color: var(--text-primary-paragraph);
  font-family: var(--font-family-arabic);
  font-size: var(--font-size-text-md);
  line-height: var(--line-height-text-md);
}

.dga-verification-banner__reg {
  padding: var(--spacing-2) var(--spacing-7, 28px);
  display: flex;
  align-items: center;
  gap: var(--spacing-3);
  border-radius: var(--radius-md);
  background-color: var(--background-white);
}
/* Saudi emblem before the registration line. Inlined as an <svg> in the
   blade (not a masked external file) so it never depends on the gitignored
   /public build dir -- that path 404s on stage and other machines. The
   inline path uses fill="currentColor", so this color tints it. */
.dga-verification-banner__reg-logo {
  display: inline-block;
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  color: var(--colors-primary-sa-flag-700);
}
.dga-verification-banner__reg-text {
  margin: 0;
  color: var(--text-default);
  font-family: var(--font-family-arabic);
  font-size: var(--font-size-text-md);
  line-height: var(--line-height-text-md);
}
.dga-verification-banner__reg a {
  color: var(--link-primary);
  font-size: var(--font-size-text-md);
  text-decoration: underline;
}
.dga-verification-banner__reg a:hover {
  color: var(--link-primary-hovered);
}

@media (max-width: 768px) {
  .dga-verification-banner__header {
    padding-top: var(--spacing-1-5);
    padding-bottom: var(--spacing-1-5);
    gap: var(--spacing-2);
  }
  .dga-verification-banner__label {
    font-size: var(--font-size-text-xs);
    line-height: var(--line-height-text-xs);
  }
  .dga-verification-banner__toggle {
    /* Its own full-width row below icon+label -- the header row only has
       two flex items now (.icon-label and this button), so flex-wrap on
       the header plus this alone reliably forces it down, unlike trying
       to coordinate three separate items' wrapping. */
    flex-basis: 100%;
    justify-content: flex-start;
  }
  .dga-verification-banner__toggle span {
    font-size: var(--font-size-text-xs);
    line-height: var(--line-height-text-xs);
  }
  .dga-verification-banner__shield {
    width: 16px;
    height: auto;
  }
  .dga-verification-banner__grid {
    flex-direction: column;
    gap: var(--spacing-6);
  }
  .dga-verification-banner__item {
    /* was flex: 1 1 280px -> in a column that 280px becomes the item HEIGHT,
       leaving a big empty gap. Reset to content height on mobile. */
    flex: 0 0 auto;
  }
  .dga-verification-banner__body {
    padding-top: var(--spacing-6);
    padding-bottom: var(--spacing-6);
  }
  .dga-verification-banner__reg {
    flex-wrap: wrap;
  }
}

/* Mobile + tablet: keep the emblem inline at the FRONT of the registration
   text (not stacked above it). The long sentence otherwise claims the whole
   first line and pushes itself to a new row, leaving the 22px emblem alone
   on top. flex:1 1 0 lets the text share the first line with the emblem and
   wrap internally; align-self flex-start keeps the emblem beside the first
   line of text. */
@media (max-width: 1024px) {
  .dga-verification-banner__reg {
    flex-wrap: wrap;
  }
  .dga-verification-banner__reg-logo {
    align-self: flex-start;
    margin-top: 2px;
  }
  .dga-verification-banner__reg-text {
    flex: 1 1 0;
    min-width: 0;
  }
}

/* Wraps [accessibility toolbar, "How to verify" toggle] as one flex item,
   replacing the toggle's old position as a direct __header child -- same
   gap/alignment carried over so the row layout is unchanged. */
.dga-verification-banner__actions {
  display: flex;
  align-items: center;
  gap: var(--spacing-3);
  flex-wrap: wrap;
}
