/* Measured: the "save my size" step. Values come from tokens.css. Goes with save.js.
   The sheet itself reuses .sheet from buy.css.
   Only start/end ("inline") spacing is used, never left/right, so Arabic flips by itself.
   The Arabic typefaces are the ones chosen for the emails (../brand/email/README.md, point 7).
   They are not in the design tokens yet. */
@import url("https://fonts.googleapis.com/css2?family=Baloo+Bhaijaan+2:wght@500;700&family=IBM+Plex+Sans+Arabic:wght@400;500;600&display=swap");

.save-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--m-space-2) var(--m-space-3); margin-top: calc(var(--m-space-2) * -1); }
.save-row__hint { font-size: var(--m-text-small); color: var(--m-muted); }

.save[lang="ar"] { font-family: 'IBM Plex Sans Arabic', var(--m-font-body); }
.save[lang="ar"] .sheet__name, .save[lang="ar"] .m-btn:not(.m-btn--second), .save[lang="ar"] .save__space strong { font-family: 'Baloo Bhaijaan 2', var(--m-font-display); }

.save__space { background: var(--m-tape); color: var(--m-ink); border: var(--m-border); border-radius: var(--m-radius-pill); padding: 8px 20px; }
.save__space small { display: block; font-size: var(--m-text-caption); font-weight: 600; }
.save__space strong { font-family: var(--m-font-display); font-weight: 500; font-size: 16px; }

.save__form { display: flex; flex-direction: column; gap: var(--m-space-3); }
.save__field { display: flex; flex-direction: column; gap: 6px; }
.save__field label { font-size: var(--m-text-small); color: var(--m-muted); }
.save__field .m-input { padding: 0 14px; font-family: inherit; }
.save[dir="rtl"] .save__field .m-input { text-align: right; }   /* the address itself still reads left to right */
.save__help { margin: 0; font-size: var(--m-text-small); color: var(--m-muted); }
.save__error { margin: 0; padding: var(--m-space-3); border-radius: var(--m-radius-label); background: var(--m-nearly-bg); color: var(--m-nearly-text); font-weight: 600; font-size: 14px; }

/* the opt-in: a real checkbox, never ticked in advance. The whole row is the touch target. */
.save__optin { display: flex; align-items: flex-start; gap: var(--m-space-3); min-height: var(--m-touch-min); padding: var(--m-space-3); border: var(--m-border); border-radius: var(--m-radius-photo); background: var(--m-surface); font-size: 15px; line-height: var(--m-leading-body); cursor: pointer; }
.save__optin input { appearance: none; -webkit-appearance: none; flex: none; width: 24px; height: 24px; margin: 0; border: var(--m-border); border-radius: 8px; background: var(--m-surface); cursor: pointer; display: grid; place-content: center; }
.save__optin input::after { content: ""; width: 12px; height: 7px; border: solid var(--m-cushion); border-width: 0 0 3px 3px; transform: translateY(-2px) rotate(-45deg) scale(0); }
.save__optin input:checked { background: var(--m-ink); }
.save__optin input:checked::after { transform: translateY(-2px) rotate(-45deg) scale(1); }

.save__keeper { margin: 0; font-size: var(--m-text-caption); color: var(--m-muted); text-align: center; }
.save__done { display: flex; flex-direction: column; gap: var(--m-space-3); }
.save__done p { margin: 0; overflow-wrap: anywhere; }
.save__line { padding: var(--m-space-3) var(--m-space-4); border-radius: var(--m-radius-photo); background: var(--m-sunken); font-size: 14px; }

/* ---------- step two: the floor plan and the one question ---------- */
.save .sheet__name:focus { outline: none; }
.save__offer { display: flex; flex-direction: column; gap: var(--m-space-3); padding: var(--m-space-4); border: var(--m-border); border-radius: var(--m-radius-card); background: var(--m-cushion); }
.save__offer h3 { margin: 0; font-family: var(--m-font-display); font-weight: 700; font-size: var(--m-text-h3); line-height: var(--m-leading-snug); }
.save[lang="ar"] .save__offer h3 { font-family: 'Baloo Bhaijaan 2', var(--m-font-display); }
.save__offer p { margin: 0; }
/* a real file input, kept inside its label so the whole pill is the control */
.save__file { display: flex; align-items: center; justify-content: center; position: relative; text-align: center; }
.save__file input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; font-size: var(--m-text-input); }
.save__file:focus-within { outline: 3px solid var(--m-tape); outline-offset: 3px; }
.save__choices { display: flex; flex-wrap: wrap; gap: var(--m-space-2); }
.save__choices .m-chip { font-family: inherit; }
