/* Verification requests and reading aloud (webapp/js/screens/*-verify.js, verify-kit.js,
   voice-settings.js), measured on the «طلب التحقق والصوت» mockup and drawn with tokens.css.
   Classes start with vf- (and the branch's third tab, br-three). */

.vf-grow { flex: 1 1 auto; min-width: 0; }
.vf-label { margin: 0; }
.vf-center { display: flex; justify-content: center; }
.vf-error-text { color: var(--color-error); }

/* ---------- The branch's third tab ---------- */

.br-tabs.br-three .br-tab-indicator { width: calc(100% / 3); }
.br-tabs.br-three .br-tab-indicator.br-third-1 { inset-inline-start: calc(100% / 3); }
.br-tabs.br-three .br-tab-indicator.br-third-2 { inset-inline-start: calc(200% / 3); }
.br-tabs.br-three .br-tab { padding: 0 8px; }

/* ---------- «طلب تحقق»: gold extended FAB at the bottom, on the reading start ---------- */

.vf-fab-wrap {
  position: fixed;
  inset-inline-start: var(--space-lg);
  bottom: calc(var(--space-lg) + env(safe-area-inset-bottom));
  z-index: 5;
}
.vf-fab.ds-ext-fab { background: var(--color-secondary); color: var(--color-on-secondary); }
.vf-fab.vf-locked-fab { opacity: 0.92; }
/* Room under the last card so the button never hides it. */
.vf-has-fab .br-list, .vf-has-fab .vf-list { padding-bottom: calc(56px + var(--space-xxl)); }
/* While a request screen is open the home's button would show through its edge on some browsers. */
.vf-covered .vf-fab-wrap { visibility: hidden; }
@media (min-width: 1024px) {
  .vf-fab-wrap { inset-inline-start: max(var(--space-xl), calc((100vw - 1180px) / 2 + var(--space-screen))); bottom: var(--space-xl); }
}

/* ---------- A request (card) ---------- */

.vf-list { display: flex; flex-direction: column; gap: var(--space-md); padding: var(--space-sm) var(--space-screen) var(--space-xl); }
.as-content .vf-list { padding: 0; }
.vf-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  width: 100%;
  padding: var(--space-md) var(--space-lg);
  border: 1px solid var(--color-outline-variant);
  border-radius: var(--shape-large);
  background: var(--color-surface-container-lowest);
  color: var(--color-on-surface);
  font: inherit;
  text-align: start;
}
button.vf-card { cursor: pointer; }
button.vf-card:hover { border-color: var(--color-outline); }
button.vf-card:focus-visible { outline: none; border-color: var(--color-primary); box-shadow: 0 0 0 1px var(--color-primary); }
.vf-card-top { display: flex; align-items: center; gap: var(--space-sm); min-width: 0; }
.vf-card-amount { font: 700 1.25rem/1.75rem var(--font-family); font-variant-numeric: tabular-nums; }
.vf-card-wallet { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vf-card-line { margin: 0; color: var(--color-on-surface-variant); }
.vf-card-line.vf-error-text { color: var(--color-error); }
.vf-card-actions { display: flex; justify-content: flex-end; margin-top: calc(var(--space-xs) * -1); margin-inline-end: -12px; }

/* State pills: gold while waiting (a turning ring), teal confirmed, red rejected, grey ended. */
.vf-pill { display: inline-flex; align-items: center; gap: 6px; }
.vf-pill.vf-red { background: var(--color-error-container); color: var(--color-on-error-container); }
.vf-pill.vf-quiet { background: var(--color-surface-container-high); color: var(--color-on-surface-variant); }
.vf-spin {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid color-mix(in srgb, currentColor 25%, transparent);
  border-top-color: var(--color-secondary);
  flex: none;
}
@media (prefers-reduced-motion: no-preference) {
  .vf-spin { animation: vf-spin 1s linear infinite; }
  @keyframes vf-spin { to { transform: rotate(360deg); } }
}

/* ---------- The form ---------- */

.vf-wallets { display: flex; flex-direction: column; gap: var(--space-xs); }
.vf-wallets .ds-chips-row, .vf-chips-wrap .ds-chips-row { flex-wrap: wrap; overflow: visible; }
.vf-field-error { margin: 0; color: var(--color-error); }
/* The amount: big, tabular, left to right with «ر.ي» after it, like a till's display. */
.vf-amount-field .ds-tf-input { font: 700 1.75rem/2.25rem var(--font-family); font-variant-numeric: tabular-nums; text-align: end; }
[dir="rtl"] .vf-amount-field .ds-tf-input { text-align: right; }
.vf-suffix { padding-inline: var(--space-sm) var(--space-md); }

/* ---------- The owner ---------- */

.vf-home-card {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  width: 100%;
  padding: var(--space-md) var(--space-lg);
  border: 0;
  border-radius: var(--shape-small);
  background: var(--color-secondary-container);
  color: var(--color-on-secondary-container);
  font: inherit;
  text-align: start;
  cursor: pointer;
}
.vf-big { display: flex; align-items: baseline; justify-content: center; gap: var(--space-sm); padding: var(--space-sm) 0; }
.vf-big-amount { font: 700 2.25rem/2.75rem var(--font-family); font-variant-numeric: tabular-nums; }
.vf-facts { display: grid; grid-template-columns: auto 1fr; gap: var(--space-xs) var(--space-lg); margin: 0; }
.vf-facts dt, .vf-facts dd { margin: 0; }
.vf-facts dd { font-weight: 600; overflow-wrap: anywhere; }
.vf-match {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  padding: var(--space-md) var(--space-lg) var(--space-xs);
  border: 1.5px dashed var(--color-primary);
  border-radius: var(--shape-medium);
  background: color-mix(in srgb, var(--color-primary-container) 40%, var(--color-surface-container-lowest));
}
.vf-match > p { margin: 0; }
.vf-match-body { white-space: pre-line; overflow-wrap: anywhere; unicode-bidi: plaintext; }
.vf-match .ds-btn-quiet { margin-inline-start: -12px; }
.vf-actions { display: flex; flex-direction: column; gap: var(--space-sm); }
.vf-reject.ds-btn-secondary { border-color: var(--color-error); color: var(--color-error); width: 100%; justify-content: center; }
.vf-danger.ds-btn-primary { background: var(--color-error); color: var(--color-on-error); }
.vf-chips-wrap { display: flex; }

/* ---------- Paid plans (locked sheet) ---------- */

.vf-locked { display: flex; flex-direction: column; align-items: center; gap: var(--space-md); text-align: center; }
.vf-locked > h2, .vf-locked > p { margin: 0; }
.vf-locked > .ds-btn-primary { width: 100%; }
.vf-plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); gap: var(--space-sm); width: 100%; }
.vf-plan {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: var(--space-sm);
  border: 1px solid var(--color-outline-variant);
  border-radius: var(--shape-small);
}
.vf-plan.vf-featured { border: 2px solid var(--color-primary); }

/* ---------- Reading aloud ---------- */

.vf-switch .ds-switch-row { padding-inline: var(--space-lg); }
.vf-speech {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-md) var(--space-lg);
  border-radius: var(--shape-medium);
  background: var(--color-primary);
  color: var(--color-on-primary);
}
.vf-wave { display: inline-flex; align-items: center; gap: 3px; height: 18px; }
.vf-wave i { display: block; width: 3px; height: 6px; border-radius: 2px; background: currentColor; }
.vf-wave i:nth-child(2) { height: 14px; }
.vf-wave i:nth-child(3) { height: 10px; }
.vf-wave i:nth-child(4) { height: 16px; }
@media (prefers-reduced-motion: no-preference) {
  .vf-speaking .vf-wave i { animation: vf-wave 0.9s ease-in-out infinite alternate; }
  .vf-speaking .vf-wave i:nth-child(2) { animation-delay: 0.15s; }
  .vf-speaking .vf-wave i:nth-child(3) { animation-delay: 0.3s; }
  .vf-speaking .vf-wave i:nth-child(4) { animation-delay: 0.45s; }
  @keyframes vf-wave { to { height: 4px; } }
}
