/* =====================================================================
   Customer sign-in / register / password pages (storefront::public.auth.studio.*,
   config app.storefront_auth_skin). Colour tokens --a-* are set in the layout
   from the storefront theme colour.
   ===================================================================== */

* { box-sizing: border-box; }
[x-cloak] { display: none !important; }
html, body { height: 100%; }

body.shop-auth {
    --a-muted: color-mix(in srgb, var(--a-text) 58%, var(--a-bg));
    --a-faint: color-mix(in srgb, var(--a-text) 38%, var(--a-bg));
    --a-line: color-mix(in srgb, var(--a-text) 14%, var(--a-bg));
    --a-field: color-mix(in srgb, #fff 70%, var(--a-bg));
    --a-grad: linear-gradient(135deg,
        color-mix(in srgb, var(--a-btn) 62%, #ff7a95) 0%,
        var(--a-btn) 55%,
        color-mix(in srgb, var(--a-btn) 62%, #000) 100%);
    margin: 0;
    background: var(--a-bg);
    color: var(--a-text);
    font: 400 15px/1.55 var(--a-font);
    -webkit-font-smoothing: antialiased;
}

body.shop-auth.rtl { --a-font: "IBM Plex Sans Arabic", system-ui, sans-serif; }

a { color: inherit; }

.a-i {
    display: inline-block;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    background: currentColor;
    -webkit-mask: var(--a-icon) center / contain no-repeat;
    mask: var(--a-icon) center / contain no-repeat;
}

.a-back { transform: scaleX(-1); }
.rtl .a-back { transform: none; }
.rtl .a-fwd { transform: scaleX(-1); }
.a-sep { margin: 0 6px; opacity: .5; }

/* ------------------------------------------------------------ shell */
.a-shell {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(440px, 1fr);
    min-height: 100vh;
}

/* ------------------------------------------------------------ photo side */
.a-photo {
    position: relative;
    overflow: hidden;
    margin: 14px;
    margin-inline-end: 0;
    border-radius: 28px;
    background: #1d1717;
    color: #fff;
    isolation: isolate;
}

.a-photo > img {
    position: absolute;
    inset: 0;
    z-index: -2;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.03);
    animation: a-zoom 18s ease-out forwards;
}

@keyframes a-zoom { to { transform: scale(1); } }

.a-photo-shade {
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        linear-gradient(180deg, rgba(20, 14, 14, .55) 0%, rgba(20, 14, 14, 0) 26%),
        linear-gradient(0deg, rgba(20, 14, 14, .88) 0%, rgba(20, 14, 14, .35) 42%, rgba(20, 14, 14, 0) 70%);
}

.a-photo-inner {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 36px 44px 40px;
}

.a-photo-logo img { height: 40px; width: auto; max-width: 190px; object-fit: contain; }
.a-photo-logo img.is-dark { filter: brightness(0) invert(1); }
.a-photo-logo span { font-size: 24px; font-weight: 700; color: #fff; text-decoration: none; }

.a-photo-copy { margin-top: auto; max-width: 520px; }

.a-tagline {
    margin: 0 0 22px;
    font-size: clamp(28px, 3vw, 42px);
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: -.02em;
    text-shadow: 0 2px 24px rgba(0, 0, 0, .35);
}

.rtl .a-tagline { letter-spacing: 0; line-height: 1.4; }

.a-promises {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.a-promises li {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border: 1px solid rgba(255, 255, 255, .22);
    border-radius: 999px;
    background: rgba(255, 255, 255, .1);
    font-size: 13px;
    font-weight: 500;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

.a-promises .a-i { width: 15px; height: 15px; color: var(--a-accent); }

/* ------------------------------------------------------------ form side */
.a-panel {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    padding: 22px 44px;
}

.a-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }

.a-ghost {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 40px;
    padding: 0 14px;
    border: 1px solid transparent;
    border-radius: 999px;
    background: transparent;
    color: var(--a-muted);
    font: 500 13.5px/1 var(--a-font);
    text-decoration: none;
    cursor: pointer;
    transition: background-color .15s ease, color .15s ease;
}

.a-ghost:hover { background: color-mix(in srgb, var(--a-text) 6%, transparent); color: var(--a-text); }
.a-ghost .a-i { width: 16px; height: 16px; }
.a-ghost-line { border-color: var(--a-line); }
.a-caret { width: 14px !important; height: 14px !important; opacity: .6; }

.a-lang { position: relative; }

.a-lang-menu {
    position: absolute;
    inset-inline-end: 0;
    top: calc(100% + 6px);
    z-index: 10;
    min-width: 190px;
    padding: 6px;
    border: 1px solid var(--a-line);
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 18px 40px -12px rgba(30, 20, 20, .22);
}

.a-lang-menu a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 9px 11px;
    border-radius: 9px;
    color: var(--a-text);
    font-size: 14px;
    text-decoration: none;
}

.a-lang-menu a:hover { background: var(--a-bg); }
.a-lang-menu a.is-current { font-weight: 600; background: color-mix(in srgb, var(--a-accent) 14%, #fff); }
.a-lang-menu small { color: var(--a-faint); font-size: 11px; font-weight: 600; letter-spacing: .06em; }

.a-form-wrap { width: 100%; max-width: 420px; margin: auto; padding: 36px 0; }

.a-form-logo { display: none; margin-bottom: 26px; text-decoration: none; }
.a-form-logo img { height: 34px; width: auto; max-width: 170px; object-fit: contain; }
.a-form-logo span { font-size: 22px; font-weight: 700; }

.a-head h1 { margin: 0 0 8px; font-size: 32px; font-weight: 700; line-height: 1.15; letter-spacing: -.03em; }
.rtl .a-head h1 { letter-spacing: 0; }
.a-head p { margin: 0 0 28px; color: var(--a-muted); font-size: 15px; }

.a-form { display: grid; gap: 18px; }
.a-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.a-field > label,
.a-label-row label { display: block; margin-bottom: 7px; font-size: 13.5px; font-weight: 600; }
.a-label-row { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }

.a-link { color: var(--a-text); font-weight: 600; text-decoration: underline; text-decoration-color: var(--a-accent); text-underline-offset: 3px; }
.a-link:hover { color: var(--a-btn); }
.a-label-row .a-link { font-size: 13px; }

.a-input { position: relative; display: flex; align-items: center; }

.a-input > .a-i {
    position: absolute;
    inset-inline-start: 15px;
    width: 17px;
    height: 17px;
    color: var(--a-faint);
    pointer-events: none;
    transition: color .15s ease;
}

.a-input input {
    width: 100%;
    height: 50px;
    padding: 0 46px;
    border: 1px solid var(--a-line);
    border-radius: 14px;
    background: var(--a-field);
    color: var(--a-text);
    font: 400 15px var(--a-font);
    outline: 0;
    transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}

.a-input input::placeholder { color: var(--a-faint); }
.a-input input:hover { border-color: color-mix(in srgb, var(--a-text) 24%, var(--a-bg)); }

.a-input input:focus {
    border-color: var(--a-text);
    background: #fff;
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--a-accent) 28%, transparent);
}

.a-input:focus-within > .a-i { color: var(--a-text); }

.a-eye {
    position: absolute;
    inset-inline-end: 7px;
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--a-faint);
    cursor: pointer;
}

.a-eye:hover { background: color-mix(in srgb, var(--a-text) 6%, transparent); color: var(--a-text); }
.a-eye .a-i { width: 17px; height: 17px; }

.has-error .a-input input { border-color: #d92d20; }
.a-error { display: block; margin-top: 6px; color: #c0281c; font-size: 12.5px; }

.a-check {
    display: inline-flex;
    align-items: flex-start;
    gap: 10px;
    color: var(--a-text);
    font-size: 14px;
    cursor: pointer;
    user-select: none;
}

.a-check input[type="checkbox"] { position: absolute; opacity: 0; pointer-events: none; }

.a-box {
    position: relative;
    flex-shrink: 0;
    width: 19px;
    height: 19px;
    margin-top: 2px;
    border: 1.5px solid color-mix(in srgb, var(--a-text) 30%, var(--a-bg));
    border-radius: 6px;
    background: #fff;
    transition: background .15s ease, border-color .15s ease;
}

.a-check input:checked + .a-box { border-color: transparent; background: var(--a-grad); }

.a-check input:checked + .a-box::after {
    content: "";
    position: absolute;
    left: 5.5px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid var(--a-btn-text);
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.a-check input:focus-visible + .a-box { box-shadow: 0 0 0 4px color-mix(in srgb, var(--a-accent) 30%, transparent); }

.a-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    height: 52px;
    margin-top: 4px;
    border: 0;
    border-radius: 999px;
    background: var(--a-grad);
    color: var(--a-btn-text);
    font: 600 15.5px var(--a-font);
    cursor: pointer;
    box-shadow: 0 12px 28px -14px var(--a-btn), inset 0 1px 0 rgba(255, 255, 255, .18);
    transition: transform .15s ease, box-shadow .2s ease, filter .2s ease;
}

.a-btn:hover { transform: translateY(-1px); filter: brightness(1.06); box-shadow: 0 16px 32px -14px var(--a-btn), inset 0 1px 0 rgba(255, 255, 255, .18); }
.a-btn:focus-visible { outline: 0; box-shadow: 0 0 0 4px color-mix(in srgb, var(--a-accent) 35%, transparent); }
.a-btn .a-i { width: 17px; height: 17px; }
.a-btn.is-loading { color: transparent; pointer-events: none; }
.a-btn.is-loading .a-i { opacity: 0; }

.a-btn.is-loading::after {
    content: "";
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, .35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: a-spin .7s linear infinite;
}

@keyframes a-spin { to { transform: rotate(360deg); } }

.a-or {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 24px 0 14px;
    color: var(--a-faint);
    font-size: 13px;
}

.a-or::before, .a-or::after { content: ""; flex: 1; height: 1px; background: var(--a-line); }

.a-social { display: grid; gap: 10px; }

.a-social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    height: 48px;
    border: 1px solid var(--a-line);
    border-radius: 999px;
    background: #fff;
    color: var(--a-text);
    font-weight: 500;
    text-decoration: none;
    transition: border-color .15s ease, background-color .15s ease;
}

.a-social-btn:hover { border-color: color-mix(in srgb, var(--a-text) 30%, var(--a-bg)); }
.a-social-btn img { width: 18px; height: 18px; }

.a-switch { margin: 24px 0 0; color: var(--a-muted); font-size: 14.5px; text-align: center; }
.a-switch a { margin-inline-start: 4px; color: var(--a-text); font-weight: 700; text-decoration: underline; text-decoration-color: var(--a-accent); text-underline-offset: 3px; }

.a-captcha { display: flex; flex-direction: column; align-items: flex-start; }

.a-alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 18px;
    padding: 12px 14px;
    border-radius: 14px;
    font-size: 14px;
    line-height: 1.45;
}

.a-alert .a-i { margin-top: 1px; width: 17px; height: 17px; }
.a-alert span { flex: 1; }
.a-alert button { border: 0; background: none; color: inherit; font-size: 18px; line-height: 1; opacity: .6; cursor: pointer; }
.a-alert-error { background: #fdf0ee; color: #b42318; box-shadow: inset 0 0 0 1px #f6d2cc; }
.a-alert-success { background: #eef7f0; color: #17643f; box-shadow: inset 0 0 0 1px #cfe8d7; }

.a-foot { color: var(--a-faint); font-size: 12.5px; text-align: center; }
.a-foot a { color: var(--a-muted); font-weight: 600; text-decoration: none; }
.a-foot a:hover { color: var(--a-text); }

/* ------------------------------------------------------------ responsive */
@media (max-width: 1020px) {
    .a-shell { grid-template-columns: 1fr; }
    .a-photo { display: none; }
    .a-panel { padding: 16px 20px; }
    .a-form-logo { display: inline-block; }
}

@media (max-width: 520px) {
    .a-row { grid-template-columns: 1fr; }
    .a-head h1 { font-size: 27px; }
}

@media (prefers-reduced-motion: reduce) {
    .a-photo > img { animation: none; transform: none; }
}

.a-field > label.a-check { display: inline-flex; margin-bottom: 0; font-weight: 500; }
