/* =========================================================
   WooCommerce Login / OTP Page — custom skin
   Place at: assets/css/woocommerce-login.css
   Enqueued conditionally on the My Account login page (see functions.php)
   ========================================================= */

:root {
    --ink: #1c1b19;
    --paper: #f8f6f2;
    --line: #e7e2d9;
    --muted: #857f74;
    --rust: #00baba;
    --rust-dark: #009e9e;
    --teal: #2c4a47;
    --teal-soft: #eaf0ef;
    --radius: 14px;
}

/* ── Page wrapper ── */
.auth-page {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 16px 64px;
    min-height: 60vh;
    background: var(--paper);
}

/* ── Card ── */
.auth-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    width: 100%;
    max-width: 420px;
    overflow: hidden;
}

/* ── Card header ── */
.auth-header {
    background: var(--ink);
    padding: 24px 32px 22px;
    color: #fff;
}

.auth-header .brand-link {
    display: block;
    margin-bottom: 18px;
    text-decoration: none;
}

.auth-header .brand-link img {
    max-height: 38px;
    width: auto;
    display: block;
}

/* Fallback text mark when no logo image is set */
.auth-header .brand-text {
    font-size: 20px;
    font-weight: 800;
    color: #fff;
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.auth-header .brand-text .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--rust);
    display: inline-block;
}

.auth-header h2 {
    font-size: 19px;
    font-weight: 700;
    margin-bottom: 4px;
    color: #fff;
}

.auth-header p {
    font-size: 13px;
    color: #b5aea2;
    line-height: 1.7;
    margin: 0;
}

/* ── Card body ── */
.auth-body {
    padding: 28px 32px 32px;
}

/* ── Step dots ── */
.step-dots {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-bottom: 24px;
}

.step-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--line);
    transition: all .25s;
}

.step-dot.active {
    background: var(--rust);
    width: 22px;
    border-radius: 4px;
}

.step-dot.done {
    background: var(--teal);
}

/* ── Steps ── */
.auth-step {
    display: none;
}

.auth-step.active {
    display: block;
}

/* ── Labels ── */
.auth-body label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 7px;
    color: var(--ink);
}

.auth-label-center {
    text-align: center;
    display: block;
    margin-bottom: 14px;
}

/* ── Phone input ── */
.input-group-custom {
    border: 1.5px solid var(--line);
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    align-items: center;
    background: #fff;
    transition: border-color .2s;
}

.input-group-custom:focus-within {
    border-color: var(--ink);
}

.input-group-custom .prefix {
    padding: 0 12px;
    font-size: 13.5px;
    color: var(--muted);
    border-left: 1.5px solid var(--line);
    height: 46px;
    display: flex;
    align-items: center;
    background: #faf9f6;
    flex-shrink: 0;
}

.input-group-custom input {
    border: none;
    outline: none;
    flex: 1;
    padding: 0 14px;
    font-size: 15px;
    font-family: 'Vazirmatn', sans-serif;
    height: 46px;
    background: transparent;
    direction: ltr;
    text-align: right;
    color: var(--ink);
}

.input-group-custom input::placeholder {
    color: var(--muted);
}

/* ── OTP boxes ── */
.otp-wrap {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-direction: row-reverse;
}

.otp-box {
    width: 52px;
    height: 58px;
    border: 1.5px solid var(--line);
    border-radius: 10px;
    font-size: 22px;
    font-weight: 700;
    text-align: center;
    font-family: 'Vazirmatn', sans-serif;
    color: var(--ink);
    outline: none;
    transition: border-color .2s, box-shadow .2s, background .2s;
    caret-color: var(--rust);
}

.otp-box:focus {
    border-color: var(--rust);
    box-shadow: 0 0 0 3px rgba(0, 186, 186, .12);
}

.otp-box.filled {
    border-color: var(--teal);
    background: var(--teal-soft);
}

/* ── Timer row ── */
.timer-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 16px;
    font-size: 13px;
}

.timer-text {
    color: var(--muted);
}

.timer-text span {
    color: var(--rust);
    font-weight: 700;
}

.resend-btn {
    color: var(--teal);
    font-weight: 600;
    background: none;
    border: none;
    font-family: 'Vazirmatn', sans-serif;
    font-size: 13px;
    cursor: pointer;
    display: none;
    padding: 0;
}

.resend-btn:hover {
    text-decoration: underline;
}

/* ── Phone display (step 2 header) ── */
.phone-display {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 11px 14px;
    font-size: 14px;
    font-weight: 600;
    direction: ltr;
    text-align: right;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.change-link {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--rust);
    cursor: pointer;
    background: none;
    border: none;
    font-family: 'Vazirmatn', sans-serif;
    padding: 0;
}

.change-link:hover {
    text-decoration: underline;
}

/* ── Success step ── */
.auth-step-success {
    text-align: center;
    padding: 12px 0;
}

.success-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--teal-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    color: var(--teal);
    font-size: 28px;
}

.success-title {
    font-weight: 700;
    margin-bottom: 8px;
    font-size: 16px;
}

.success-desc {
    font-size: 13.5px;
    color: var(--muted);
    line-height: 1.8;
    margin-bottom: 0;
}

.progress-wrap {
    margin-top: 20px;
    height: 4px;
    background: var(--line);
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar-auth {
    height: 100%;
    width: 0%;
    background: var(--rust);
    border-radius: 4px;
    transition: width 2.5s linear;
}

/* ── Primary button ── */
.btn-auth {
    background: var(--rust);
    border: none;
    color: #fff;
    font-weight: 700;
    border-radius: 10px;
    padding: 13px;
    width: 100%;
    font-size: 15px;
    font-family: 'Vazirmatn', sans-serif;
    transition: background .15s;
    cursor: pointer;
    margin-top: 20px;
    display: block;
    text-align: center;
    text-decoration: none;
}

.btn-auth:hover {
    background: var(--rust-dark);
    color: #fff;
}

.btn-auth:disabled {
    opacity: .5;
    cursor: not-allowed;
}

/* ── Helper text ── */
.helper-text {
    font-size: 12px;
    color: var(--muted);
    line-height: 1.7;
    margin-top: 12px;
    text-align: center;
}

.helper-text a {
    color: var(--rust);
    text-decoration: none;
}

.helper-text a:hover {
    text-decoration: underline;
}

/* ── Validation error ── */
.field-error {
    font-size: 12px;
    color: #c0392b;
    margin-top: 5px;
    display: none;
}

.field-error.show {
    display: block;
}

.field-error-center {
    text-align: center;
}

/* ── WooCommerce notices override ── */
.woocommerce-error,
.woocommerce-message,
.woocommerce-info {
    border-radius: 10px;
    padding: 12px 16px;
    margin-bottom: 16px;
    font-size: 13px;
    list-style: none;
}

.woocommerce-error {
    background: #fdecea;
    color: #c0392b;
    border: 1px solid #f5c6c2;
}

.woocommerce-message {
    background: var(--teal-soft);
    color: var(--teal);
    border: 1px solid #c3dbd8;
}

.woocommerce-info {
    background: #fff8e5;
    color: #856404;
    border: 1px solid #ffe69c;
}
