.da-auth,.da-auth *{box-sizing:border-box}
.da-auth{--da-primary:#2563eb;direction:rtl;width:100%;max-width:430px;margin:0 auto;padding:22px;background:#fff;border:1px solid #e7ebf1;border-radius:14px;box-shadow:0 8px 28px rgba(15,23,42,.07);font-family:inherit;color:#172033;line-height:1.8}
.da-auth__head{text-align:center;margin-bottom:17px}.da-auth__head strong{display:block;font-size:20px;line-height:1.6}.da-auth__head span{display:block;color:#667085;font-size:13px;margin-top:3px}
.da-auth__tabs{display:grid;grid-template-columns:1fr 1fr;gap:5px;padding:4px;background:#f4f6f9;border-radius:11px;margin-bottom:17px}.da-auth__tabs button{appearance:none;border:0;background:transparent;border-radius:8px;padding:9px;cursor:pointer;font:inherit;color:#667085}.da-auth__tabs button.is-active{background:#fff;color:#111827;box-shadow:0 2px 8px rgba(15,23,42,.07)}
.da-auth label{display:block;font-size:13px;font-weight:650;margin:10px 0 5px}.da-auth input[type=text],.da-auth input[type=tel],.da-auth input[type=password],.da-auth input[type=email]{display:block;width:100%;height:46px;border:1px solid #d9e0e8;border-radius:10px;background:#fff;padding:0 13px;font:inherit;color:#111827;outline:0;transition:border-color .15s ease,box-shadow .15s ease}.da-auth input:focus{border-color:var(--da-primary);box-shadow:0 0 0 3px rgba(37,99,235,.10)}
.da-auth__mobile-row{display:grid;grid-template-columns:minmax(0,1fr) 124px;gap:8px;align-items:end}.da-auth__mobile-row .da-auth__primary{margin-top:0;height:46px}
.da-auth__primary{appearance:none;display:block;width:100%;min-height:46px;margin-top:15px;border:0;border-radius:10px;background:var(--da-primary);color:#fff;font:inherit;font-weight:750;cursor:pointer;padding:8px 14px;transition:transform .15s ease,opacity .15s ease}.da-auth__primary:hover{transform:translateY(-1px)}.da-auth__primary:disabled{opacity:.58;cursor:wait;transform:none}
.da-auth__link{appearance:none;border:0;background:transparent;color:var(--da-primary);font:inherit;font-size:13px;cursor:pointer;padding:5px}.da-auth__link:disabled{color:#98a2b3;cursor:not-allowed}.da-auth__forgot{display:block;margin:10px auto 0}.da-auth__row{display:flex;align-items:center;justify-content:space-between;margin-top:9px}
.da-auth__bale{text-align:center;margin-top:5px}.da-auth__bale-link{font-weight:650}.da-auth__bale-link:before{content:"";display:inline-block;width:7px;height:7px;margin-left:6px;border-radius:50%;background:#22c55e;vertical-align:middle}
.da-auth__message{display:none;padding:9px 11px;border-radius:9px;font-size:13px;margin-bottom:11px}.da-auth__message:not(:empty){display:block}.da-auth__message.is-error{background:#fff1f2;color:#b42318;border:1px solid #fecdd3}.da-auth__message.is-success{background:#ecfdf3;color:#067647;border:1px solid #a7f3d0}
.da-auth__password-wrap{position:relative}
.da-auth__password-wrap input{padding-left:65px}
.da-auth__password-wrap button{position:absolute;left:6px;top:5px;height:36px;border:0;background:#f3f4f6;border-radius:7px;padding:0 10px;cursor:pointer;color:#4b5563}.da-auth__sr-only{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}.da-auth__hp{position:absolute!important;left:0!important;width:1px!important;height:1px!important;opacity:0!important}.da-auth__hint{margin:5px 0 0;color:#737d8f;font-size:12px;line-height:1.8}.da-auth form{margin:0}
.da-auth__otp{display:flex;direction:ltr;justify-content:center;gap:9px;margin:8px 0 15px}.da-auth__otp-box{width:48px!important;min-width:0;height:52px!important;padding:0!important;text-align:center;font-size:22px!important;font-weight:800;line-height:1;border-radius:11px!important;caret-color:var(--da-primary)}.da-auth__otp-box:focus{transform:translateY(-1px)}
.da-auth-logged-in{padding:15px;border:1px solid #dcefe1;border-radius:12px;background:#f3fff6;color:#15703a}.da-auth-open{appearance:none;border:0;border-radius:10px;padding:10px 18px;background:var(--da-primary,#2563eb);color:#fff;font:inherit;font-weight:700;cursor:pointer}

/* Modal login/register */
.da-auth-modal[hidden]{display:none!important}.da-auth-modal{position:fixed;inset:0;z-index:999999;display:grid;place-items:center;padding:18px}.da-auth-modal__backdrop{position:absolute;inset:0;background:rgba(15,23,42,.60);backdrop-filter:blur(2px)}.da-auth-modal__dialog{position:relative;width:min(100%,460px);max-height:calc(100vh - 36px);max-height:calc(100dvh - 36px);overflow:auto;border-radius:15px;outline:0}.da-auth-modal__dialog .da-auth{max-width:none}.da-auth-modal__close{position:absolute;z-index:3;top:8px;left:8px;display:grid;place-items:center;width:34px;height:34px;padding:0;border:0;border-radius:50%;background:#f2f4f7;color:#475467;line-height:1;cursor:pointer}.da-auth-modal-open{overflow:hidden}

/* Checkout integration */
.da-auth--checkout-inline{max-width:none;margin:8px 0 0;padding:0;border:0;border-radius:0;background:transparent;box-shadow:none;line-height:1.65}.da-auth--checkout-inline .da-auth__message{margin:7px 0 0;padding:7px 9px;font-size:12px}.da-auth--checkout-inline .da-auth__primary{width:auto;min-height:38px;margin:0;padding:6px 13px;border-radius:9px;font-size:12.5px}.da-auth--checkout-inline .da-auth__inline-send{display:flex;align-items:center;gap:9px;flex-wrap:wrap}.da-auth--checkout-inline .da-auth__inline-hint{font-size:11.5px;color:#7a8494}
.da-auth--checkout .da-auth__bale,.da-auth--checkout-inline .da-auth__bale{display:block!important;visibility:visible!important;opacity:1!important;position:static!important;height:auto!important;overflow:visible!important;text-align:center;margin-top:7px}.da-auth--checkout .da-auth__bale-link,.da-auth--checkout-inline .da-auth__bale-link{display:inline-flex!important;align-items:center!important;justify-content:center!important;min-height:32px!important;padding:4px 8px!important;color:var(--da-primary)!important}
.da-auth--checkout-inline label{margin:7px 0 4px;font-size:12px}.da-auth--checkout-inline .da-auth__otp{justify-content:flex-start;margin:5px 0 8px;gap:6px}.da-auth--checkout-inline .da-auth__otp-box{width:40px!important;height:42px!important;border-radius:9px!important;font-size:18px!important}.da-auth--checkout-inline [data-da-step="otp-code"]>.da-auth__primary{width:100%;min-height:41px;margin-top:3px}.da-auth--checkout-inline .da-auth__row{margin-top:4px}.da-auth__inline-success[hidden]{display:none!important}.da-auth__inline-success{display:flex;align-items:center;gap:6px;margin-top:3px;padding:7px 9px;border:1px solid #a7f3d0;border-radius:9px;background:#ecfdf3;color:#067647;font-size:12.5px;font-weight:650}.da-auth__icon{display:inline-block;flex:0 0 auto;vertical-align:middle}.da-auth__icon--success{width:20px;height:20px}.da-auth__icon--close{width:20px;height:20px}.da-checkout-inline-slot{margin-top:8px}.da-checkout-inline-slot .da-auth--checkout-inline{margin-top:0}.da-checkout-login-required #place_order{cursor:not-allowed}.da-checkout-login-required .wc-block-components-checkout-place-order-button{pointer-events:none;opacity:.55}.da-checkout-login-required .wc-block-components-checkout-place-order-button:after{content:"ابتدا شماره موبایل را تأیید کنید";font-size:11px;margin-inline-start:7px;opacity:.9}

@media(max-width:600px){.da-auth{padding:18px 15px;border-radius:12px}.da-auth.da-auth--checkout-inline{padding:0;border-radius:0}.da-auth-modal{padding:10px}.da-auth-modal__dialog{max-height:calc(100dvh - 20px)}.da-auth__mobile-row{grid-template-columns:1fr}.da-auth__mobile-row .da-auth__primary{margin-top:2px}.da-auth__otp{gap:7px}.da-auth__otp-box{width:42px!important;height:48px!important;font-size:20px!important}.da-auth__primary{min-height:48px}.da-auth--checkout-inline .da-auth__inline-send{align-items:stretch}.da-auth--checkout-inline .da-auth__inline-send .da-auth__primary{width:100%}.da-auth--checkout-inline .da-auth__inline-hint{width:100%}.da-auth-modal__dialog{width:calc(100% - 10px)}}
@media(max-width:360px){.da-auth__otp{gap:5px}.da-auth__otp-box{width:37px!important;height:45px!important}}
@media(prefers-reduced-motion:reduce){.da-auth *{scroll-behavior:auto!important;transition:none!important}}

/* Checkout OTP: unobtrusive send button inside the native mobile field. */
/* Billing fields: consistent readable input typography. */
body.woocommerce-checkout #billing_first_name,
body.woocommerce-checkout #billing_phone,
body.woocommerce-checkout .woocommerce-billing-fields input:not([type="hidden"]),
body.woocommerce-checkout .wc-block-components-address-form input:not([type="hidden"]){
  font-weight:500!important;
  font-size:15px!important;
}

/* Hide the obsolete send section entirely; the existing hidden request button
   remains in the DOM for the in-field trigger to invoke safely. */
.da-auth--checkout-inline [data-da-step="otp-mobile"],
.da-auth--checkout-inline .da-auth__inline-hint{
  display:none!important;
}
.da-auth--checkout-inline .da-auth__panel{
  margin:0!important;padding:0!important;
}
.da-auth--checkout-inline:not(.da-checkout-otp-open) .da-auth__message:empty{
  display:none!important;
}
.da-auth--checkout-inline:not(.da-checkout-otp-open) [data-da-panel="otp"]{
  min-height:0!important;
}
html.da-checkout-otp-modal-open{overflow:hidden!important}
.da-auth--checkout-inline.da-checkout-otp-enhanced .da-auth__inline-send [data-da-request-otp]{display:none!important}
#billing_phone_field .da-checkout-phone-with-otp,
.wc-block-components-text-input .da-checkout-phone-with-otp,
.wc-block-components-address-form__phone .da-checkout-phone-with-otp{padding-left:121px!important;box-sizing:border-box!important}
.da-checkout-phone-otp-trigger{
  position:absolute;left:12px;top:35.6875px!important;z-index:3;
  min-height:39px;max-height:none;padding:4px 15px;
  border:1px solid #ffffff00!important;border-radius:9px!important;
  background:linear-gradient(135deg,#533ae0,#7d60f7);color:#fff;
  box-shadow:inset 1px 1px 0 #fff6,0 8px 22px -8px rgb(52 73 196 / .62)!important;
  font-family:inherit;font-size:12px;font-weight:700;line-height:1.4;white-space:nowrap;
  cursor:pointer;transition:filter .15s ease;
}
.da-checkout-phone-otp-trigger:hover{background:linear-gradient(135deg,#533ae0,#7d60f7);filter:brightness(1.06);color:#fff}
.da-checkout-phone-otp-trigger:focus-visible{outline:2px solid #5b4bea;outline-offset:2px}
.da-checkout-phone-otp-trigger[hidden]{display:none!important}
/* The OTP section stays in the original auth root, preserving JS event handling. */
.da-auth--checkout-inline [data-da-step="otp-code"]:not([hidden]){
  position:fixed!important;inset:0!important;z-index:1000001!important;
  display:flex!important;align-items:center;justify-content:center;
  padding:16px!important;margin:0!important;
  background:rgba(12,18,32,.58)!important;
  -webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px);
  isolation:isolate;
}
.da-auth--checkout-inline [data-da-step="otp-code"][hidden]{display:none!important}
.da-auth--checkout-inline .da-checkout-otp-dialog{
  position:relative;z-index:1;box-sizing:border-box;
  width:min(100%,390px);max-height:calc(100dvh - 32px);overflow-y:auto;
  padding:23px 20px 20px;background:#fff;color:#171b26;
  border:1px solid #e5e8ef;border-radius:12px;
  box-shadow:0 20px 65px rgba(5,10,25,.25);
  direction:rtl;text-align:right;
}
.da-auth--checkout-inline .da-checkout-otp-dialog__title{
  padding-left:28px;margin-bottom:14px;font-size:17px;font-weight:800;line-height:1.5;color:#171b26;
}
.da-auth--checkout-inline .da-checkout-otp-dialog__close{
  position:absolute;top:13px;left:13px;
  display:flex;align-items:center;justify-content:center;
  width:32px;height:32px;padding:0;border:0;border-radius:8px;
  background:#f2f4f8;color:#687082;font-size:25px;line-height:1;
  cursor:pointer;
}
.da-auth--checkout-inline .da-checkout-otp-dialog__close:hover{background:#e5e8ef;color:#171b26}
.da-auth--checkout-inline .da-checkout-otp-dialog__close:focus-visible{outline:2px solid #5b4bea}
.da-auth--checkout-inline .da-checkout-otp-dialog .da-auth__otp{justify-content:center;margin:10px 0 15px;gap:7px}
.da-auth--checkout-inline .da-checkout-otp-dialog .da-auth__otp-box{width:43px!important;height:49px!important;font-size:20px!important}
.da-auth--checkout-inline .da-checkout-otp-dialog>[data-da-verify-otp]{display:block;width:100%!important;min-height:43px}
.da-auth--checkout-inline .da-checkout-otp-dialog .da-auth__row{display:flex;justify-content:space-between;gap:10px}
.da-auth--checkout-inline .da-checkout-otp-dialog .da-auth__message{margin:0 0 9px}
@media(max-width:600px){
  .da-checkout-phone-otp-trigger{left:10px;padding:4px 15px;font-size:11.5px}
  #billing_phone_field .da-checkout-phone-with-otp,
  .wc-block-components-text-input .da-checkout-phone-with-otp,
  .wc-block-components-address-form__phone .da-checkout-phone-with-otp{padding-left:100px!important}
  .da-auth--checkout-inline .da-checkout-otp-dialog{width:min(100%,350px);padding:22px 15px 17px}
}
@media(prefers-reduced-motion:reduce){.da-checkout-phone-otp-trigger{transition:none!important}}

