/*
 * The page where a visitor signs in (the shop's account page, for somebody who is not signed in).
 *
 * One look for every shop, whatever theme it wears. Nothing of a theme is on this page, and SpinasWebShop's general
 * styles are not on it either: this file gives the page its frame (the whole page; one card in the middle, the way
 * back right above it, the shop's logo or name at its top) and styles the few things that stand in it. What stands
 * in the card, the three steps, is drawn by the plugin that signs shoppers in (sitedp-login); here it is given the
 * look of the buying pages, so that signing in and buying look like one place.
 *
 * Written for either direction of writing ("start" and "end", never "left" and "right").
 * (Written with SpinasWebShop's own names. Where this file is brought into a shop it gets the shop's names, like
 * every file a browser fetches.)
 *
 * The letters are the shop's own two fonts. Their files are the buying pages' own (the folder beside this one in a
 * browser's eyes, /spinasweb/checkout/fonts), named here by the same address and the same mark of the file, so a
 * browser fetches each font once for signing in and for buying. When a font's file changes, its mark ("?v=") is
 * changed here too, as in checkout.css and the theme's letters.css.
 */
@font-face {
    font-family: 'Spinas Rasteh Bazaar';
    font-style: normal;
    font-weight: 100 1000;
    font-display: swap;
    src: url('../checkout/fonts/SpinasRastehBazaar.woff2?v=615ae11c') format('woff2');
}
@font-face {
    font-family: 'Vazirmatn';
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url('../checkout/fonts/vazirmatn-arabic.woff2') format('woff2');
    unicode-range: U+0600-06FF, U+0750-077F, U+200C-200E, U+2010-2011, U+FB50-FDFF, U+FE70-FEFC;
}
@font-face {
    font-family: 'Vazirmatn';
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url('../checkout/fonts/vazirmatn-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+2000-206F, U+20AC, U+2122;
}

:root {
    --signing-ink: #1f2430;
    --signing-soft: #6b7280;
    --signing-line: #e5e7eb;
    --signing-ground: #f5f6f8;
    --signing-card: #ffffff;
    --signing-go: #1f2430;
    --signing-bad: #b42318;
    --signing-good: #067647;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body.signing {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: 100dvh;
    margin: 0;
    background: var(--signing-ground);
    color: var(--signing-ink);
    font-family: 'Spinas Rasteh Bazaar', Vazirmatn, Tahoma, Arial, sans-serif;
    font-size: 15px;
    line-height: 1.8;
}
body.signing button, body.signing input, body.signing select, body.signing textarea { font-family: inherit; font-size: inherit; }
body.signing a { color: inherit; }
body.signing h1, body.signing h2, body.signing h3 { font-weight: 700; line-height: 1.5; margin: 0 0 12px; }

/* The page: one box in the middle, a little above the middle of the screen. In the box: the way back, and under it
   the card. */
.signing-page { flex: 1; display: flex; flex-direction: column; justify-content: center; padding: 24px 16px 12vh; }
.signing-box { width: 100%; max-width: 420px; margin: 0 auto; }
/* (The page's main heading is there for whoever does not see the page; the card's own title is what is read.) */
.signing-page__name { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* The way back: right above the card, where the eye is, at the side a line begins at. */
.signing-back { display: inline-flex; align-items: center; gap: 10px; margin: 0 4px 10px; padding: 6px 0; color: var(--signing-soft); font-size: 14px; text-decoration: none; }
.signing-back:hover, .signing-back:focus { color: var(--signing-ink); }
/* (An arrow that points to where a line begins: to the left on a page written from the left, to the right on one
   written from the right.) */
.signing-back__arrow { display: inline-block; width: 8px; height: 8px; border-block-start: 2px solid currentColor; border-inline-start: 2px solid currentColor; transform: rotate(-45deg); }
body.rtl .signing-back__arrow { transform: rotate(45deg); }

/* The card. At its top the shop's logo, or its name when it has no logo; under that, what the page holds. */
.signing-card { padding: 32px 28px; border: 1px solid var(--signing-line); border-radius: 14px; background: var(--signing-card); box-shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 8px 24px rgba(16, 24, 40, .05); }
.signing-brand { margin: 0 0 20px; text-align: center; line-height: 1.4; }
.signing-brand a { display: inline-block; text-decoration: none; }
.signing-brand img { display: block; width: auto; height: auto; max-width: 180px; max-height: 64px; margin: 0 auto; }
.signing-brand__name { color: var(--signing-ink); font-size: 22px; font-weight: 800; }

/* The plugin's own form stands in the card: it brings no second card of its own here. */
body.signing .sitedp-login { max-width: none; margin: 0; padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; }
body.signing .sitedp-login__title { font-size: 18px; margin: 0 0 6px; }
body.signing .sitedp-login__say { color: var(--signing-soft); opacity: 1; margin: 0 0 22px; }
body.signing .sitedp-login__rules { color: var(--signing-soft); opacity: 1; font-size: 13px; }
body.signing .sitedp-login__rules a { color: var(--signing-ink); }
body.signing .sitedp-login__link, body.signing .sitedp-login__more { color: var(--signing-soft); font-size: 14px; }

/* SpinasWebShop's own sign-in and sign-up forms (a shop where the plugin is switched off) stand in the same card. */
body.signing form.spinaswebshop-form:not(.sitedp-login__form) { margin: 0 0 16px; padding: 0; border: 0; }
body.signing .u-columns, body.signing .u-column1, body.signing .u-column2 { float: none; width: 100%; max-width: none; margin: 0; padding: 0; }

/* The boxes a visitor fills in. */
body.signing .spinaswebshop form .form-row { float: none; width: 100%; padding: 0; margin: 0 0 14px; }
body.signing .spinaswebshop form .form-row label { display: block; font-size: 14px; color: var(--signing-ink); margin-bottom: 4px; line-height: 1.6; }
body.signing .spinaswebshop form .form-row .required { color: var(--signing-bad); text-decoration: none; }
body.signing .spinaswebshop form .form-row input.input-text {
    width: 100%; min-height: 48px; padding: 8px 12px; background: #fff; color: var(--signing-ink);
    border: 1px solid #cfd4dc; border-radius: 10px; line-height: 1.6; outline: none; box-shadow: none;
}
body.signing .spinaswebshop form .form-row input.input-text:focus { border-color: var(--signing-ink); box-shadow: 0 0 0 3px rgba(31, 36, 48, .08); }
body.signing .spinaswebshop form .form-row input.input-text::placeholder { color: #a3a9b3; }

/* The one button of a step. */
body.signing .spinaswebshop button.button, body.signing .spinaswebshop a.button, body.signing .spinaswebshop input.button {
    display: block; width: 100%; min-height: 48px; margin: 0; padding: 10px 18px; background: var(--signing-go); color: #fff;
    border: 0; border-radius: 10px; font-weight: 700; line-height: 1.7; text-align: center; text-decoration: none; cursor: pointer; box-shadow: none;
}
body.signing .spinaswebshop button.button:hover, body.signing .spinaswebshop a.button:hover, body.signing .spinaswebshop input.button:hover,
body.signing .spinaswebshop button.button:focus, body.signing .spinaswebshop a.button:focus, body.signing .spinaswebshop input.button:focus { background: #000; color: #fff; }

/* What the shop says to the visitor (a number that is none, a wrong code, "a code was sent"). */
body.signing .spinaswebshop-notices-wrapper:empty { display: none; }
body.signing .spinaswebshop-info, body.signing .spinaswebshop-message, body.signing .spinaswebshop-error {
    margin: 0 0 16px; padding: 12px 16px; list-style: none; background: var(--signing-card); color: var(--signing-ink);
    border: 1px solid var(--signing-line); border-inline-start: 4px solid var(--signing-soft); border-radius: 10px; font-size: 14px;
}
body.signing .spinaswebshop-info::before, body.signing .spinaswebshop-message::before, body.signing .spinaswebshop-error::before { content: none; }
body.signing .spinaswebshop-error { border-inline-start-color: var(--signing-bad); }
body.signing .spinaswebshop-message { border-inline-start-color: var(--signing-good); }
body.signing .spinaswebshop-error li, body.signing .spinaswebshop-message li, body.signing .spinaswebshop-info li { margin: 0; padding: 0; list-style: none; }

/* A narrow screen: the box takes the width, and stands at the top rather than in the middle. */
@media (max-width: 600px) {
    .signing-page { justify-content: flex-start; padding: 16px 16px 32px; }
    .signing-card { padding: 24px 18px; }
}

/*
 * The look of the page: a pale ground, one white card with a soft deep shadow and a fan of fine arcs in its upper
 * corner, the shop's logo (or its name) in the shop's colour, a tall box for the number and one tall button.
 * (These rules stand after the ones above and say only what differs.)
 */
:root {
    --signing-ink: #16181d;
    --signing-tone: #3a3d45;
    --signing-soft: #74777e;
    --signing-line: #e3e4e8;
    --signing-go: #0d9488;
    --signing-go-over: #0b7d73;
    --signing-bad: #d32f2f;
    --signing-good: #0f8a55;
}
body.signing { font-size: 14px; text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased; }
body.signing :focus:not(:focus-visible) { outline: 0; }
.signing-page { justify-content: flex-start; padding: max(118px, 15vh) 16px 48px; }
.signing-box { position: relative; max-width: 500px; }
.signing-back { position: absolute; top: -44px; inset-inline-start: 2px; gap: 8px; height: 32px; margin: 0; padding: 0 6px; border-radius: 10px; color: var(--signing-tone); font-size: 13px; font-weight: 700; }
.signing-back:hover, .signing-back:focus-visible { background: #ebecef; color: var(--signing-ink); }
.signing-back__arrow { width: 7px; height: 7px; border-width: 1.6px; }
.signing-card { padding: 48px 52px 40px; border: 0; border-radius: 22px; box-shadow: 0 1px 2px rgba(12, 12, 12, .04), 0 24px 60px -20px rgba(12, 12, 12, .18);
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='220'%3E%3Cdefs%3E%3CradialGradient id='f' cx='0' cy='0' r='1'%3E%3Cstop offset='0' stop-color='%23fff'/%3E%3Cstop offset='.5' stop-color='%23fff' stop-opacity='.7'/%3E%3Cstop offset='1' stop-color='%23fff' stop-opacity='0'/%3E%3C/radialGradient%3E%3Cmask id='m'%3E%3Crect width='100%25' height='100%25' fill='url(%23f)'/%3E%3C/mask%3E%3C/defs%3E%3Cg mask='url(%23m)' fill='none' stroke='%23e3e5ea' stroke-width='1.2'%3E%3Ccircle r='26'/%3E%3Ccircle r='46'/%3E%3Ccircle r='66'/%3E%3Ccircle r='86'/%3E%3Ccircle r='106'/%3E%3Ccircle r='126'/%3E%3Ccircle r='146'/%3E%3Ccircle r='166'/%3E%3Ccircle r='186'/%3E%3Ccircle r='206'/%3E%3Ccircle r='226'/%3E%3C/g%3E%3C/svg%3E") no-repeat left top / 340px 310px; }
.signing-brand { margin: 0 0 26px; }
.signing-brand img { max-height: 44px; }
body.signing .signing-brand__name { color: var(--signing-go); font-size: 30px; line-height: 38px; font-weight: 900; }
body.signing .sitedp-login { text-align: center; }
body.signing .sitedp-login__title { margin: 0 0 6px; color: var(--signing-ink); font-size: 23px; line-height: 38px; font-weight: 800; }
body.signing .sitedp-login__say { margin: 0 0 30px; color: var(--signing-soft); font-size: 14px; line-height: 26px; }
body.signing .sitedp-login__rules { margin: 20px 0 0; color: var(--signing-soft); font-size: 13px; line-height: 24px; }
body.signing .sitedp-login__rules a { color: var(--signing-tone); font-weight: 700; text-underline-offset: 4px; }
body.signing .sitedp-login__link, body.signing .sitedp-login__more { color: var(--signing-soft); font-size: 13px; }
body.signing .spinaswebshop form .form-row { margin: 0 0 18px; text-align: start; }
body.signing .spinaswebshop form .form-row label { margin-bottom: 8px; color: var(--signing-tone); font-size: 14px; font-weight: 700; line-height: 20px; }
body.signing .spinaswebshop form .form-row .required { display: none; }
body.signing .spinaswebshop form .form-row input.input-text { min-height: 62px; padding: 0 16px; border: 1px solid var(--signing-line); border-radius: 14px; color: var(--signing-ink); font-size: 16px; }
body.signing .spinaswebshop form .form-row input.input-text[type="tel"], body.signing .spinaswebshop form .form-row input.input-text[inputmode="numeric"] { direction: ltr; text-align: start; font-size: 22px; font-weight: 600; letter-spacing: 1.5px; }
body.signing .spinaswebshop form .form-row input.input-text:focus { border-color: var(--signing-tone); box-shadow: inset 0 0 0 1px var(--signing-tone); }
body.signing .spinaswebshop form .form-row input.input-text::placeholder { color: #b3b6bd; font-weight: 500; letter-spacing: 1.5px; }
body.signing .spinaswebshop button.button, body.signing .spinaswebshop a.button, body.signing .spinaswebshop input.button { min-height: 56px; padding: 0 18px; border-radius: 14px; font-size: 16px; font-weight: 700; line-height: 56px; transition: background-color .15s, opacity .15s; }
body.signing .spinaswebshop button.button:hover, body.signing .spinaswebshop a.button:hover, body.signing .spinaswebshop input.button:hover,
body.signing .spinaswebshop button.button:focus, body.signing .spinaswebshop a.button:focus, body.signing .spinaswebshop input.button:focus { background: var(--signing-go-over); color: #fff; }
body.signing .spinaswebshop button.button:active { transform: scale(.98); }
body.signing .spinaswebshop-info, body.signing .spinaswebshop-message, body.signing .spinaswebshop-error { border: 1px solid #e6e7eb; border-radius: 12px; background: #f7f8fa; color: var(--signing-tone); text-align: start; }
body.signing .spinaswebshop-error { border-color: rgba(211, 47, 47, .3); background: #ffebee; color: var(--signing-bad); }
body.signing .spinaswebshop-message { border-color: rgba(76, 175, 80, .35); background: rgba(76, 175, 80, .1); color: #2e7b32; }

/* A phone: no card, the page itself is white and the form fills its width. */
@media (max-width: 640px) {
    body.signing { background: #fff; }
    .signing-page { padding: 72px 20px 32px; }
    .signing-back { top: -52px; inset-inline-start: -6px; }
    .signing-card { padding: 8px 0 0; border-radius: 0; box-shadow: none; background-size: 0 0; }
    .signing-brand__name { font-size: 26px; }
    body.signing .sitedp-login__title { font-size: 19px; line-height: 32px; }
    body.signing .spinaswebshop form .form-row input.input-text { min-height: 56px; }
    body.signing .spinaswebshop form .form-row input.input-text[type="tel"], body.signing .spinaswebshop form .form-row input.input-text[inputmode="numeric"] { font-size: 20px; }
    body.signing .spinaswebshop button.button, body.signing .spinaswebshop a.button, body.signing .spinaswebshop input.button { min-height: 50px; border-radius: 12px; font-size: 15px; line-height: 50px; }
}
