/* Text Mr Frank: the homepage modal (04 ACT-8; Figma Website W13d, component "TMF / Verify modal", built from the Frank Design
   System's Dialog on desktop and Drawer on a phone; Sola, 19 Nov 2026). Content centred, back at the top, one height for every
   step so only the content changes. Tokens only (07 §10). The plain link that opens it, .tlink, lives in base.css. */

.tsm[hidden] { display: none !important; }
.tsm { position: fixed; inset: 0; z-index: 2147483000; /* above every page layer, the Meet Mr Frank button included */ display: grid; place-items: center; padding: 16px; }
.tsm__scrim { position: absolute; inset: 0; background: color-mix(in srgb, var(--foreground) 50%, transparent); }
.tsm__box {
  position: relative; width: 100%; max-width: 440px; height: 508px; display: flex; flex-direction: column;
  background: var(--card); color: var(--foreground); border-radius: var(--radius-xl); box-shadow: var(--shadow-md); padding-top: 8px; overflow: hidden;
}
.tsm__grab { display: none; width: 36px; height: 4px; border-radius: 2px; background: var(--border); margin: 8px auto 0; }
.tsm__bar { display: grid; grid-template-columns: 24px 1fr 24px; align-items: center; gap: 12px; padding: 12px 24px 12px; }
.tsm__back { width: 24px; height: 24px; display: grid; place-items: center; border: 0; background: none; color: var(--foreground); cursor: pointer; padding: 0; border-radius: 6px; }
.tsm__back:focus-visible, .tsm__link:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.tsm__bartitle { margin: 0; text-align: center; font-size: 14px; font-weight: 500; }
.tsm__body { flex: 1; min-height: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; padding: 8px 32px 32px; text-align: center; overflow-y: auto; }
.tsm__body > * { width: 100%; }
.tsm__body > .tsm__otp, .tsm__body > .tsm__more { width: auto; }
.tsm__body > .tsm__tile, .tsm__body > .tsm__mark { width: 48px; flex: none; }
.tsm__tile { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: var(--info-subtle); color: var(--info); }
.tsm__tile--attention { background: var(--attention-subtle); color: var(--attention); }
.tsm__mark { width: 48px; height: 48px; display: block; }
.tsm__title { margin: 0; font-size: 32px; line-height: 1.15; font-weight: 300; letter-spacing: -0.02em; text-wrap: balance; }
.tsm__sub { margin: 6px 0 0; color: var(--muted-foreground); font-size: 16px; }
.tsm__field { text-align: left; display: flex; flex-direction: column; gap: 2px; border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 10px 14px; background: var(--card); }
.tsm__field:focus-within { border-color: var(--foreground); }
.tsm__field.is-err { border-color: var(--attention); background: var(--attention-subtle); }
.tsm__field.is-off { opacity: .6; }
.tsm__field label { font-size: 12px; line-height: 16px; color: var(--muted-foreground); }
.tsm__field input { border: 0; outline: 0; padding: 0; background: transparent; color: var(--foreground); font-family: inherit; font-weight: 500; font-size: 16px; line-height: 24px; }
.tsm__fieldhint { margin: -8px 0 0; text-align: left; font-size: 13px; color: var(--attention); }
.tsm__otp { display: flex; gap: 8px; justify-content: center; }
.tsm__otp input { width: 46px; height: 56px; text-align: center; font-family: inherit; font-weight: 500; font-size: 22px; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--card); color: var(--foreground); }
.tsm__otp input:focus { outline: 0; border-color: var(--primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 22%, transparent); }
.tsm__otp.is-err input { border-color: var(--attention); }
.tsm__err { margin: 0; color: var(--attention); font-size: 14px; font-weight: 500; }
.tsm__hint, .tsm__fine { margin: 0; color: var(--muted-foreground); font-size: 13px; line-height: 1.45; }
.tsm__fine a { color: inherit; text-decoration: underline; }
.tsm__more { display: inline-flex; align-items: center; gap: 4px; border: 0; background: none; color: var(--muted-foreground); font: inherit; font-size: 16px; cursor: pointer; padding: 4px; }
.tsm__link { border: 0; background: none; padding: 0; font: inherit; font-size: 14px; color: var(--primary); text-decoration: underline; cursor: pointer; width: auto !important; align-self: center; }
.tsm .btn { width: 100%; justify-content: center; }
.tsm .btn[disabled] { opacity: .6; cursor: progress; }
@media (hover: hover) and (pointer: fine) { .tsm__more:hover { color: var(--foreground); } }

/* A phone: the Drawer, from the bottom, the same height */
@media (max-width: 700px) {
  .tsm { padding: 0; align-items: end; }
  .tsm__box { max-width: none; border-radius: var(--radius-xl) var(--radius-xl) 0 0; padding-top: 0; padding-bottom: env(safe-area-inset-bottom, 0px); height: calc(508px + env(safe-area-inset-bottom, 0px)); }
  .tsm__grab { display: block; }
  .tsm__body { padding: 8px 24px 24px; }
  .tsm__title { font-size: 28px; }
}
@media (prefers-reduced-motion: no-preference) {
  .tsm:not([hidden]) .tsm__box { animation: tsm-in var(--dur-state) var(--ease-out); }
  .tsm:not([hidden]) .tsm__scrim { animation: tsm-fade var(--dur-state) var(--ease-out); }
}
@keyframes tsm-in { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes tsm-fade { from { opacity: 0; } to { opacity: 1; } }
