/* ─────────────────────────────────────────────────────────────────
   AML Survey — shared visual primitives
   ─────────────────────────────────────────────────────────────────
   The `.aml-*` rhythm vocabulary used by every AML survey page
   (AmlPf202010, AmlPg202010, AmlPgInterpostoAr202010,
   AmlPgInterpostoBr202010, …). Lifted from AmlPf202010's scoped
   block so all sibling pages share one source of truth: page
   wrapper, semantic notice cards, navy-gradient hero identity
   card, slider-block cards, notes-block card, dialog intro cards
   (info / warn / danger / success), and dialog max-width rules.
   ────────────────────────────────────────────────────────────── */

/* ── Page wrapper ────────────────────────────────────────────────
   One container to set the vertical rhythm: every direct child
   gets a consistent gap so PageParts, hero, notices, slider blocks
   and notes don't collide or drift visually. */
.aml-page {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  max-width: 980px;
  margin: 0 auto;
  color: #1e293b;
}

/* When a child handles its own margin (PageParts have built-in
   0.85rem top/bottom; the hero has its own 1.25rem bottom) the
   parent gap still keeps them from collapsing into each other. */
.aml-page > .pp-section,
.aml-page > .aml-page > .pp-section {
  margin: 0;
}

/* ── Slider blocks (income / total capacity / balance sheet) ─────
   The legacy markup laid the *current value* in a separate row
   above the slider with bootstrap col-4 / col-8 spacers, which
   drifted off-screen on scroll. The new layout puts the value as
   a navy pill right next to the field caption, so the live value
   is always one glance away from the slider track. */
.aml-slider-block {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 0.95rem 1.15rem 1.15rem;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
}

.aml-slider-block + .aml-slider-block {
  margin-top: 0.85rem;
}

.aml-slider-block .ff-stacked-header {
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 0.65rem;
}

.aml-slider-label {
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: capitalize;
  color: rgb(0, 73, 118);
  line-height: 1.2;
}

.aml-slider-value-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.22rem 0.7rem;
  background: rgba(0, 73, 118, 0.08);
  border: 1px solid rgba(0, 73, 118, 0.18);
  color: rgb(0, 73, 118);
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.3;
  transition: background 0.18s ease;
}

.aml-slider {
  width: 100%;
  margin-top: 0.5rem;
}

/* ── Notes block ─────────────────────────────────────────────────
   Same card shell as the slider blocks so the two end-of-page
   sections form a quiet pair. The textarea fills the card and
   breathes. */
.aml-notes-block {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 0.95rem 1.15rem 1.15rem;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
}

.aml-notes-textarea {
  width: 100%;
  min-height: 7rem;
  font-size: 0.9rem;
  line-height: 1.55;
}

.aml-notes-textarea textarea {
  width: 100%;
  min-height: 7rem;
  padding: 0.65rem 0.85rem;
  color: #1f2937;
}

/* ── Hero summary ────────────────────────────────────────────────
   Compliance-themed gradient card replacing the legacy plain-text
   intro. A vertical rail on the left brands the section, the body
   shows applicant + fund + meta, and a 4-fact grid surfaces the
   compliance state (operation type, DD mode, current status). The
   palette stays in the project's navy spectrum with a warm orange
   glow at the lower-right corner so the AML flows feel like
   siblings, not strangers. */
.aml-hero {
  position: relative;
  display: flex;
  background: linear-gradient(145deg, #001f33 0%, #004976 55%, #002d4a 100%);
  color: #ffffff;
  border-radius: 14px;
  margin: 0 0 1.25rem;
  overflow: hidden;
  box-shadow: 0 6px 22px rgba(0, 73, 118, 0.18);
}

.aml-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 18% 20%, rgba(255, 255, 255, 0.1) 0%, transparent 35%),
    radial-gradient(circle at 92% 100%, rgba(255, 105, 0, 0.18) 0%, transparent 45%);
  pointer-events: none;
}

.aml-hero-rail {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  background: rgba(255, 255, 255, 0.06);
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  position: relative;
  z-index: 1;
}

.aml-hero-rail-tag {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.32em;
  color: rgba(255, 255, 255, 0.6);
}

.aml-hero-body {
  flex: 1 1 auto;
  padding: 1.4rem 1.6rem 1.5rem;
  position: relative;
  z-index: 1;
  min-width: 0;
}

.aml-hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.78);
}

.aml-hero-title {
  margin: 0.45rem 0 0.5rem;
  font-size: 1.55rem;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: #ffffff;
  word-break: break-word;
}

.aml-hero-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.85);
}

.aml-hero-meta-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.55rem;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  font-size: 0.66rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #ffffff;
}

.aml-hero-meta-text {
  color: rgba(255, 255, 255, 0.92);
  font-weight: 500;
}

.aml-hero-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.85rem;
  margin-top: 1.2rem;
  padding-top: 1.1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.aml-hero-fact {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}

.aml-hero-fact-label {
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: rgba(255, 255, 255, 0.6);
}

.aml-hero-fact-value {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 1.05rem;
  font-weight: 600;
  color: #ffffff;
  letter-spacing: 0.005em;
  word-break: break-word;
}

.aml-hero-fact-value--locked {
  color: #fde68a;
}

.aml-hero-fact-icon {
  font-size: 0.85rem;
  opacity: 0.85;
}

.aml-intro-paragraph {
  font-size: 0.92rem;
  line-height: 1.6;
  color: #2d3748;
}

/* ── Top-of-page notices ─────────────────────────────────────────
   Three accented info cards (warn / danger / info) replace the
   legacy bootstrap .alert blocks. Namespaced .aml-* so each AML
   page can evolve independently. */
.aml-notices {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin: 0 0 1rem;
}

.aml-notice {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-left: 4px solid rgb(0, 73, 118);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.aml-notice-icon {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: rgba(0, 73, 118, 0.08);
  color: rgb(0, 73, 118);
  font-size: 0.95rem;
}

.aml-notice-body {
  flex: 1 1 auto;
  min-width: 0;
}

.aml-notice-title {
  margin: 0 0 0.15rem;
  font-size: 0.92rem;
  font-weight: 600;
  color: #1e293b;
  line-height: 1.3;
}

.aml-notice-text {
  margin: 0;
  font-size: 0.82rem;
  color: #64748b;
  line-height: 1.45;
}

.aml-notice--warn { border-left-color: #d97706; }
.aml-notice--warn .aml-notice-icon {
  background: #fffbea;
  color: #b45309;
}

.aml-notice--danger { border-left-color: #b91c1c; }
.aml-notice--danger .aml-notice-icon {
  background: #fff5f5;
  color: #b91c1c;
}

.aml-notice--info { border-left-color: rgb(0, 73, 118); }

/* ── Dialog intro card ───────────────────────────────────────────
   Project-wide pattern: a small accented info card explains the
   dialog's purpose. Variants (info / warn / danger / success)
   reuse the same swatch as .aml-notice. The icon sits flush-left,
   text wraps to its right, and the accent border carries the
   meaning at a glance. */
.aml-dialog-intro {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  padding: 0.95rem 1.05rem;
  border-radius: 0 6px 6px 0;
  margin: 0.25rem 0;
}

.aml-dialog-intro--info {
  background: #f0f7ff;
  border-left: 3px solid rgb(0, 73, 118);
}

.aml-dialog-intro--warn {
  background: #fffbea;
  border-left: 3px solid #d69e2e;
}

.aml-dialog-intro--danger {
  background: #fff5f5;
  border-left: 3px solid #b91c1c;
}

.aml-dialog-intro--success {
  background: #ecfdf5;
  border-left: 3px solid #10b981;
}

.aml-dialog-intro-icon {
  flex: 0 0 auto;
  font-size: 1.35rem;
  margin-top: 0.05rem;
}

.aml-dialog-intro--info .aml-dialog-intro-icon { color: rgb(0, 73, 118); }
.aml-dialog-intro--warn .aml-dialog-intro-icon { color: #d69e2e; }
.aml-dialog-intro--danger .aml-dialog-intro-icon { color: #b91c1c; }
.aml-dialog-intro--success .aml-dialog-intro-icon { color: #065f46; }

.aml-dialog-intro-text {
  flex: 1 1 auto;
  font-size: 0.9rem;
  color: #2d3748;
  line-height: 1.55;
  word-break: break-word;
}

.aml-dialog-intro-text strong {
  color: rgb(0, 73, 118);
  font-weight: 600;
}

/* ── Dialog max-width clamps ─────────────────────────────────────
   kendo-dialog has no maxWidth prop; the upper bound is set on
   the dialog wrapper here. Lower bounds are on each kendo-dialog
   via :minWidth, producing a tight content-fit window. The four
   AML survey pages (PF / PG / PG-InterpostoAr / PG-InterpostoBr)
   share these IDs — only one page is rendered at a time so the
   IDs stay collision-free. */
.k-dialog:has(> #amlSaveDialog) { max-width: 520px; }
.k-dialog:has(> #amlConfirmDeleteDialog) { max-width: 480px; }
.k-dialog:has(> #amlImpersonateDialog) { max-width: 540px; }
.k-dialog:has(> #amlCopyFromDialog) { max-width: 540px; }

/* The mandatory pre-AML documents dialog also clamps height since
   its body lists each doc plus a progress bar. */
.k-dialog:has(> #preAmlDocsModal) {
  max-width: 640px;
  max-height: 90vh;
}

.k-dialog:has(> #preAmlDocsModal) > .k-window-content {
  max-height: calc(90vh - 130px);
  overflow-y: auto !important;
  padding: 1rem 1.15rem;
}

/* ── Intro card (regulatory disclaimer at the top of every AML page) ──
   Replaces the bare justified paragraph. A stationery-style card with
   an ivory parchment gradient, navy hairline border, leading icon,
   and a small eyebrow tag carrying the regulatory reference. The
   first letter of the legal text is enlarged in navy as a subtle
   drop-cap so the wall of text reads less like a wall. */
.aml-intro-card {
  position: relative;
  display: flex;
  gap: 1.05rem;
  padding: 1.15rem 1.3rem 1.2rem;
  background:
    linear-gradient(180deg, rgba(255, 252, 245, 0.95) 0%, rgba(248, 244, 235, 0.92) 100%),
    repeating-linear-gradient(
      45deg,
      rgba(0, 73, 118, 0.018) 0,
      rgba(0, 73, 118, 0.018) 1px,
      transparent 1px,
      transparent 6px
    );
  border: 1px solid #e7dec6;
  border-left: 4px solid rgb(0, 73, 118);
  border-radius: 0 12px 12px 0;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
}

.aml-intro-card::after {
  content: "";
  position: absolute;
  top: 8px;
  right: 10px;
  width: 38px;
  height: 38px;
  background: radial-gradient(circle, rgba(0, 73, 118, 0.06) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.aml-intro-card-icon {
  flex-shrink: 0;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-top: 0.15rem;
  border-radius: 12px;
  background: linear-gradient(140deg, rgba(0, 73, 118, 0.12) 0%, rgba(0, 73, 118, 0.06) 100%);
  border: 1px solid rgba(0, 73, 118, 0.18);
  color: rgb(0, 73, 118);
  font-size: 1.25rem;
  padding-top: 0.55rem;
  box-sizing: border-box;
  position: relative;
  z-index: 1;
}

.aml-intro-card-body {
  flex: 1 1 auto;
  min-width: 0;
  position: relative;
  z-index: 1;
}

.aml-intro-card-eyebrow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 0.6rem;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgb(0, 73, 118);
}

.aml-intro-card-eyebrow-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.6rem;
  background: rgb(0, 73, 118);
  color: #ffffff;
  border-radius: 999px;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.aml-intro-card-eyebrow-divider {
  display: inline-block;
  width: 18px;
  height: 1px;
  background: rgba(0, 73, 118, 0.35);
  margin: 0 0.05rem;
}

.aml-intro-card-text {
  font-size: 0.92rem;
  line-height: 1.65;
  color: #2d3748;
  text-align: justify;
  hyphens: auto;
}

/* Make embedded structural elements (paragraphs, ordered lists used
   by the MiFID-style disclaimers) inherit the card's rhythm. */
.aml-intro-card-text p,
.aml-intro-card-text ol,
.aml-intro-card-text ul {
  margin: 0.5rem 0 0;
}

.aml-intro-card-text > :first-child {
  margin-top: 0;
}

.aml-intro-card-text strong {
  color: rgb(0, 73, 118);
  font-weight: 600;
}

@media (max-width: 600px) {
  .aml-intro-card { padding: 0.95rem 1rem; gap: 0.85rem; }
  .aml-intro-card-icon { width: 38px; height: 38px; font-size: 1.1rem; padding-top: 0.4rem; }
  .aml-intro-card-text { font-size: 0.88rem; }
}

/* ── Instructions download link (PG modal) ──────────────────────
   Refined chip-style link replacing the bare span.span-button used
   inside the preAmlDocsModal on AmlPg. Reads as a deliberate call
   to action: navy-tinted background, rounded pill, leading icon,
   and a subtle hover lift. */
.aml-instructions-link {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.55rem 1.05rem 0.55rem 0.85rem;
  margin: 0.35rem 0;
  background: linear-gradient(135deg, rgba(0, 73, 118, 0.07) 0%, rgba(0, 73, 118, 0.12) 100%);
  border: 1px solid rgba(0, 73, 118, 0.22);
  border-radius: 999px;
  color: rgb(0, 73, 118);
  font-size: 0.86rem;
  font-weight: 600;
  letter-spacing: 0.005em;
  text-decoration: none;
  cursor: pointer;
  transition:
    background 0.18s ease,
    border-color 0.18s ease,
    transform 0.18s ease,
    box-shadow 0.18s ease;
}

.aml-instructions-link:hover,
.aml-instructions-link:focus-visible {
  background: linear-gradient(135deg, rgba(0, 73, 118, 0.12) 0%, rgba(0, 73, 118, 0.2) 100%);
  border-color: rgba(0, 73, 118, 0.4);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 73, 118, 0.15);
  outline: none;
}

.aml-instructions-link:active {
  transform: translateY(0);
  box-shadow: 0 1px 4px rgba(0, 73, 118, 0.12);
}

.aml-instructions-link-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgb(0, 73, 118);
  color: #ffffff;
  font-size: 0.75rem;
  flex-shrink: 0;
}

.aml-instructions-link-name {
  flex: 1 1 auto;
  text-align: left;
  word-break: break-word;
}

.aml-instructions-link-arrow {
  font-size: 0.75rem;
  opacity: 0.6;
  transition: transform 0.18s ease, opacity 0.18s ease;
}

.aml-instructions-link:hover .aml-instructions-link-arrow {
  transform: translateX(2px);
  opacity: 1;
}

/* When stacked inside the preAmlDocsModal, give each entry breathing
   room and a soft separator. */
.aml-instructions-list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0;
  margin: 0.5rem 0 0.85rem;
  list-style: none;
}

.aml-instructions-list-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.65rem 0.85rem;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.aml-instructions-list-item:hover {
  border-color: #cbd5e0;
  box-shadow: 0 2px 6px rgba(0, 73, 118, 0.06);
}

.aml-instructions-list-item-description {
  font-size: 0.82rem;
  line-height: 1.4;
  color: #4a5568;
  margin: 0;
}
