/* FastCarton phone authentication. */
body.woocommerce-account:not(.logged-in){
    background:var(--fc-surface-canvas);
    color:var(--fc-color-white);
}

.fc-account-login-page{
    width:min(1120px,calc(100% - 32px));
    margin:0 auto;
    padding:1px 0;
}

.fc-auth{
    direction:rtl;
    display:block;
    max-width:500px;
    margin:42px auto 76px;
    overflow:hidden;
    border:1px solid rgba(105,139,112,.14);
    border-radius:var(--fc-radius-xl);
    background:var(--fc-surface-deep);
    box-shadow:0 30px 90px rgba(0,0,0,.24);
}

/* Compact brand scene. */
.fc-auth__package-scene{
    position:relative;
    z-index:1;
    width:220px;
    height:138px;
    margin:0 auto 14px;
}

.fc-auth__package{
    position:absolute;
    display:block;
    width:100px;
    height:78px;
    border:1px solid rgba(255,173,85,.38);
    border-radius:14px;
    background:linear-gradient(145deg,rgba(255,173,85,.14),rgba(255,173,85,.04));
    box-shadow:0 18px 44px rgba(0,0,0,.22);
}

.fc-auth__package::before{
    position:absolute;
    top:0;
    left:50%;
    width:20px;
    height:100%;
    transform:translateX(-50%);
    border-inline:1px solid rgba(255,173,85,.16);
    background:rgba(255,173,85,.06);
    content:"";
}

.fc-auth__package--back{
    top:0;
    left:25px;
    transform:scale(.76) rotate(-5deg);
    opacity:.46;
}

.fc-auth__package--front{
    top:38px;
    right:35px;
    animation:fc-package-float 5s ease-in-out infinite;
}

.fc-auth__package--front i{
    position:absolute;
    right:14px;
    bottom:12px;
    width:23px;
    height:2px;
    background:var(--fc-color-green);
    box-shadow:0 -7px 0 rgba(88,211,107,.42);
}

.fc-auth__route{
    position:absolute;
    right:3px;
    bottom:0;
    width:214px;
    height:48px;
    border-bottom:1px dashed rgba(88,211,107,.26);
    border-radius:50%;
}

.fc-auth__route i{
    position:absolute;
    bottom:-4px;
    left:26px;
    width:8px;
    height:8px;
    border-radius:50%;
    background:var(--fc-color-green);
    box-shadow:0 0 18px rgba(88,211,107,.72);
    animation:fc-route-pulse 2.4s ease-in-out infinite;
}

/* Panel and steps. */
.fc-auth__panel{
    position:relative;
    display:flex;
    min-width:0;
    flex-direction:column;
    justify-content:center;
    padding:30px 46px 40px;
    overflow:hidden;
    background:
        radial-gradient(circle at 50% 8%,rgba(88,211,107,.1),transparent 34%),
        var(--fc-surface-deep);
    text-align:right;
}

.fc-auth__panel::before{
    position:absolute;
    inset:0;
    background-image:
        linear-gradient(rgba(88,211,107,.03) 1px,transparent 1px),
        linear-gradient(90deg,rgba(88,211,107,.03) 1px,transparent 1px);
    background-size:42px 42px;
    mask-image:linear-gradient(to bottom,#000,transparent 50%);
    content:"";
    pointer-events:none;
}

.fc-auth__panel>*{
    position:relative;
    z-index:1;
}

.fc-auth form.fc-auth__step{
    margin:0;
    padding:0;
    border:0;
    background:transparent;
    box-shadow:none;
    animation:fc-auth-in .3s cubic-bezier(.2,.8,.2,1) both;
}

.fc-auth__step[hidden]{display:none}

.fc-auth__step h1,
.fc-auth__step h2{
    margin:7px 0 8px;
    color:var(--fc-color-white);
    font-size:var(--fc-type-heading-lg);
    font-weight:var(--fc-font-bold);
    line-height:1.45;
}

.fc-auth__step[data-fc-auth-step="phone"] h1,
.fc-auth__step[data-fc-auth-step="phone"]>p{text-align:center}

.fc-auth__step>p{
    margin:0 0 23px;
    color:var(--fc-color-muted);
    font-size:15px;
    line-height:1.9;
}

.fc-auth__step>p strong{
    color:var(--fc-color-white);
    font-weight:var(--fc-font-medium);
}

/* Phone and profile fields. */
.fc-auth__input-wrap{
    display:flex;
    height:58px;
    align-items:center;
    border:1px solid rgba(88,211,107,.18);
    border-radius:14px;
    background:#09100c;
    transition:border-color .18s,box-shadow .18s,background .18s;
}

.fc-auth__input-wrap:hover{border-color:rgba(88,211,107,.3)}

.fc-auth__input-wrap:focus-within{
    border-color:rgba(88,211,107,.62);
    background:#0a130e;
    box-shadow:0 0 0 4px rgba(88,211,107,.075);
}

.fc-auth__input-wrap:has(input[aria-invalid="true"]){
    border-color:rgba(239,127,120,.6);
    box-shadow:0 0 0 4px rgba(239,127,120,.07);
}

.fc-auth__input-wrap svg{
    width:21px;
    height:21px;
    flex:0 0 auto;
    margin-inline:16px 4px;
    fill:none;
    stroke:var(--fc-color-muted);
    stroke-width:1.6;
}

body.woocommerce-account:not(.logged-in) .fc-auth .fc-auth__input-wrap input{
    min-width:0;
    height:100%;
    flex:1;
    padding:0 14px;
    border:0;
    outline:0;
    background:transparent;
    color:var(--fc-color-white);
    box-shadow:none;
    font:500 18px Arial,sans-serif;
    text-align:left;
}

.fc-auth__name-grid{
    display:grid;
    width:100%;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:12px;
}

.fc-auth__name-grid>div{min-width:0}

.fc-auth__name-grid label{
    display:flex;
    align-items:center;
    gap:6px;
    margin-bottom:8px;
    color:#c5cec8;
    font-size:14px;
    font-weight:600;
}

.fc-auth__name-grid label span{color:var(--fc-color-green)}

body.woocommerce-account:not(.logged-in) .fc-auth .fc-auth__name-grid input{
    display:block;
    width:100%;
    max-width:100%;
    min-width:0;
    height:54px;
    margin:0;
    padding:0 14px;
    border:1px solid rgba(88,211,107,.18);
    border-radius:13px;
    outline:0;
    background:#09100c;
    color:var(--fc-color-white);
    box-shadow:none;
    font-size:15px;
    transition:border-color .18s,box-shadow .18s;
}

body.woocommerce-account:not(.logged-in) .fc-auth .fc-auth__name-grid input:hover{border-color:rgba(88,211,107,.3)}

body.woocommerce-account:not(.logged-in) .fc-auth .fc-auth__name-grid input:focus{
    border-color:rgba(88,211,107,.62);
    box-shadow:0 0 0 4px rgba(88,211,107,.075);
}

body.woocommerce-account:not(.logged-in) .fc-auth .fc-auth__name-grid input[aria-invalid="true"]{
    border-color:rgba(239,127,120,.6);
    box-shadow:0 0 0 4px rgba(239,127,120,.07);
}

/* Five equal OTP cells. */
.fc-auth__codes{
    --fc-auth-code-size:clamp(45px,13vw,58px);
    display:grid;
    width:100%;
    grid-template-columns:repeat(5,var(--fc-auth-code-size));
    justify-content:center;
    gap:clamp(7px,2vw,10px);
    margin:4px 0 2px;
}

body.woocommerce-account:not(.logged-in) .fc-auth input.fc-auth__code{
    appearance:none;
    width:var(--fc-auth-code-size);
    min-width:0;
    height:auto;
    aspect-ratio:1;
    margin:0;
    padding:0;
    border:1px solid rgba(88,211,107,.2);
    border-radius:13px;
    outline:0;
    background:#09100c;
    color:var(--fc-color-white);
    box-shadow:inset 0 1px rgba(255,255,255,.02);
    font:700 24px/1 Arial,sans-serif;
    text-align:center;
    caret-color:var(--fc-color-green);
    transition:border-color .16s,box-shadow .16s,background .16s,transform .16s;
    animation:fc-code-rise .3s cubic-bezier(.2,.8,.2,1) both;
}

.fc-auth__code:nth-child(2){animation-delay:30ms}
.fc-auth__code:nth-child(3){animation-delay:60ms}
.fc-auth__code:nth-child(4){animation-delay:90ms}
.fc-auth__code:nth-child(5){animation-delay:120ms}

body.woocommerce-account:not(.logged-in) .fc-auth input.fc-auth__code:hover{border-color:rgba(88,211,107,.36)}

body.woocommerce-account:not(.logged-in) .fc-auth input.fc-auth__code:focus{
    border-color:var(--fc-color-green);
    background:#0b1510;
    box-shadow:0 0 0 4px rgba(88,211,107,.085),inset 0 1px rgba(255,255,255,.025);
    transform:translateY(-2px);
}

body.woocommerce-account:not(.logged-in) .fc-auth input.fc-auth__code.has-value{
    border-color:rgba(88,211,107,.52);
    background:rgba(88,211,107,.07);
    color:#eaffed;
}

body.woocommerce-account:not(.logged-in) .fc-auth .fc-auth__codes.is-error input.fc-auth__code{
    border-color:rgba(239,127,120,.6);
    background:rgba(239,127,120,.045);
    box-shadow:0 0 0 3px rgba(239,127,120,.055);
}

/* Actions and feedback. */
body.woocommerce-account:not(.logged-in) .fc-auth button.fc-auth__primary{
    display:flex;
    width:100%;
    min-height:54px;
    align-items:center;
    justify-content:center;
    margin-top:18px;
    padding:12px 18px;
    border:0;
    border-radius:14px;
    background:var(--fc-color-green);
    color:#07100a;
    font-size:15px;
    font-weight:750;
    cursor:pointer;
    transition:transform .18s,background .18s,opacity .18s;
}

body.woocommerce-account:not(.logged-in) .fc-auth button.fc-auth__primary:hover{
    background:#76e186;
    color:#07100a;
    transform:translateY(-1px);
}

body.woocommerce-account:not(.logged-in) .fc-auth button.fc-auth__primary:disabled{
    cursor:wait;
    opacity:.64;
    transform:none;
}

.fc-auth__back{
    display:inline-flex;
    width:max-content;
    align-items:center;
    gap:6px;
    margin:0 0 21px;
    padding:8px 11px;
    border:1px solid rgba(105,139,112,.16);
    border-radius:10px;
    background:#09100c;
    color:#a1aca4;
    font-size:13px;
    cursor:pointer;
}

.fc-auth__back::before{color:var(--fc-color-green);content:"→"}
.fc-auth__back:hover{border-color:rgba(88,211,107,.3);color:var(--fc-color-white)}

.fc-auth__verify-phone{
    margin-bottom:21px;
    color:var(--fc-color-muted);
    direction:rtl;
}

.fc-auth__verify-phone::before{
    margin-inline-end:6px;
    content:"ارسال‌شده به";
}

.fc-auth__resend{
    min-height:24px;
    margin-top:17px;
    color:#98a49b;
    font-size:13px;
    text-align:center;
}

.fc-auth__resend button{
    border:0;
    background:transparent;
    color:var(--fc-color-green);
    font-weight:700;
    cursor:pointer;
}

.fc-auth__status:empty{display:none}

.fc-auth__status{
    margin:15px 0 0;
    padding:10px 12px;
    border:1px solid rgba(105,139,112,.12);
    border-radius:11px;
    background:rgba(105,139,112,.035);
    color:var(--fc-color-muted);
    font-size:13px;
    line-height:1.75;
    text-align:center;
}

.fc-auth__status[data-type="error"]{
    border-color:rgba(239,127,120,.18);
    background:rgba(239,127,120,.045);
    color:#ef9a94;
}

.fc-auth__status[data-type="success"]{
    border-color:rgba(88,211,107,.18);
    background:rgba(88,211,107,.045);
    color:var(--fc-color-green);
}

.fc-auth__terms{
    display:block;
    margin-top:14px;
    color:#7f8c83;
    font-size:13px;
    line-height:1.9;
    text-align:center;
}

.fc-auth__terms a{
    color:#aebbb2;
    font-weight:650;
    text-underline-offset:3px;
}

.fc-auth__terms a:hover{color:var(--fc-color-green)}

.fc-auth__sr-only{
    position:absolute;
    width:1px;
    height:1px;
    margin:-1px;
    padding:0;
    overflow:hidden;
    border:0;
    clip:rect(0,0,0,0);
    white-space:nowrap;
}

@keyframes fc-auth-in{
    from{opacity:0;transform:translateY(8px)}
    to{opacity:1;transform:none}
}

@keyframes fc-code-rise{
    from{opacity:0;transform:translateY(6px) scale(.96)}
    to{opacity:1;transform:none}
}

@keyframes fc-package-float{
    0%,100%{transform:translateY(0)}
    50%{transform:translateY(-6px)}
}

@keyframes fc-route-pulse{
    0%,100%{opacity:.45;transform:scale(.75)}
    50%{opacity:1;transform:scale(1)}
}

@media(max-width:800px){
    .fc-auth{margin:26px auto 56px}
    .fc-auth__panel{padding:28px 30px 36px}
    .fc-auth__package-scene{height:128px;margin-bottom:10px;transform:scale(.9);transform-origin:center top}
}

@media(max-width:540px){
    .fc-account-login-page{width:100%}
    .fc-auth{margin:15px 12px 42px;border-radius:21px}
    .fc-auth__panel{padding:25px 18px 31px}
    .fc-auth__package-scene{height:116px;margin-bottom:6px;transform:scale(.82)}
    .fc-auth__step h1,.fc-auth__step h2{font-size:var(--fc-type-heading-md)}
    .fc-auth__step>p{font-size:14px}
    .fc-auth__name-grid{grid-template-columns:1fr}
    .fc-auth__codes{--fc-auth-code-size:clamp(44px,13vw,52px)}
}

@media(max-width:350px){
    .fc-auth__panel{padding-inline:14px}
    .fc-auth__codes{--fc-auth-code-size:43px;gap:6px}
}

@media(prefers-reduced-motion:reduce){
    .fc-auth__step,
    .fc-auth__code,
    .fc-auth__package--front,
    .fc-auth__route i{animation:none}

    .fc-auth__primary,
    .fc-auth__code{transition:none}
}
