/* کانتینر اصلی تب‌ها */
.wd-auth-tabs-wrapper {
    margin: 0 0 18px 0 !important;
    padding: 0 !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

/* سوئیچ کپسولی تک‌خطی */
.wd-auth-tabs-wrapper ul.wd-auth-nav-tabs {
    display: flex !important;
    list-style: none !important;
    list-style-type: none !important;
    padding: 3px !important;
    margin: 0 0 16px 0 !important;
    background: #f1f1f1 !important;
    border-radius: 30px !important;
    border: none !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.wd-auth-tabs-wrapper ul.wd-auth-nav-tabs:before,
.wd-auth-tabs-wrapper ul.wd-auth-nav-tabs:after {
    display: none !important;
}

.wd-auth-tabs-wrapper ul.wd-auth-nav-tabs li {
    flex: 1 1 50% !important;
    list-style: none !important;
    list-style-type: none !important;
    margin: 0 !important;
    padding: 0 !important;
    text-align: center !important;
}

.wd-auth-tabs-wrapper ul.wd-auth-nav-tabs li:before {
    display: none !important;
}

.wd-auth-tabs-wrapper ul.wd-auth-nav-tabs li a {
    display: block !important;
    padding: 7px 4px !important;
    font-size: 12.5px !important;
    font-weight: 600 !important;
    color: #666 !important;
    text-decoration: none !important;
    border-radius: 25px !important;
    border: none !important;
    line-height: 1.5 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    letter-spacing: -0.2px !important;
    transition: all 0.25s ease !important;
}

.wd-auth-tabs-wrapper ul.wd-auth-nav-tabs li.active a {
    background: #ffffff !important;
    color: #222222 !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08) !important;
}

/* مخفی‌سازی تب غیرفعال */
.wd-auth-tab-content {
    width: 100% !important;
}

.wd-auth-tab-pane {
    display: none !important;
    width: 100% !important;
}

.wd-auth-tab-pane.active {
    display: block !important;
    animation: wdAuthFadeIn 0.25s ease !important;
}

@keyframes wdAuthFadeIn {
    from { opacity: 0; transform: translateY(3px); }
    to { opacity: 1; transform: translateY(0); }
}

/* راهنمای ثبت‌نام خودکار */
.wd-otp-hint {
    font-size: 11.5px !important;
    color: #777 !important;
    background: #f9f9f9 !important;
    border: 1px dashed #e0e0e0 !important;
    padding: 6px 10px !important;
    border-radius: 6px !important;
    margin: 0 0 12px 0 !important;
    line-height: 1.5 !important;
    text-align: center !important;
}

/* اصلاح باکس و آیکون موبایل */
.wd-otp-input-wrapper {
    position: relative !important;
    display: block !important;
    width: 100% !important;
}

.wd-otp-input-wrapper input.wd-otp-mobile-input {
    width: 100% !important;
    padding-left: 42px !important;
    padding-right: 14px !important;
    height: 46px !important;
    text-align: right !important;
    direction: rtl !important;
    box-sizing: border-box !important;
    font-size: 14px !important;
}

.wd-otp-input-wrapper input.wd-otp-mobile-input:focus,
.wd-otp-input-wrapper input.wd-otp-mobile-input:not(:placeholder-shown) {
    direction: ltr !important;
    text-align: left !important;
    padding-left: 42px !important;
    letter-spacing: 1px !important;
}

.wd-otp-icon-box {
    position: absolute !important;
    left: 12px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: #888 !important;
    pointer-events: none !important;
    z-index: 5 !important;
    width: 20px !important;
    height: 20px !important;
}

.wd-otp-icon-box svg {
    display: block !important;
    stroke: #888 !important;
}

/* فرم ورود پیامکی */
.wd-otp-container {
    width: 100% !important;
    padding: 2px 0 !important;
}

.wd-otp-step {
    display: none !important;
}

.wd-otp-step.active {
    display: block !important;
}

.wd-otp-subtitle {
    font-size: 13px !important;
    color: #666 !important;
    margin: 0 0 15px 0 !important;
    line-height: 1.5 !important;
}

/* فیلد کد ۴ رقمی */
.wd-otp-code-input {
    text-align: center !important;
    font-size: 26px !important;
    letter-spacing: 14px !important;
    font-weight: 700 !important;
    height: 50px !important;
    direction: ltr !important;
    border: 2px solid #ddd !important;
    border-radius: 8px !important;
    background: #fafafa !important;
    transition: all 0.25s ease !important;
}

.wd-otp-code-input:focus {
    border-color: var(--wd-primary-color, #e05822) !important;
    background: #fff !important;
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.07) !important;
}

/* فوتر و دکمه‌های کمکی */
.wd-otp-footer-actions {
    margin-top: 15px !important;
    font-size: 12.5px !important;
    color: #777 !important;
    text-align: center !important;
}

.wd-otp-footer-actions a {
    color: var(--wd-primary-color, #e05822) !important;
    text-decoration: none !important;
    font-weight: 500 !important;
}

.wd-otp-footer-actions a:hover {
    text-decoration: underline !important;
}

.wd-otp-sep {
    margin: 0 6px !important;
    color: #ccc !important;
}

/* اعلان‌ها و پیام‌ها */
.wd-otp-notice,
.wd-checkout-otp-notice {
    margin-top: 12px !important;
    font-size: 12.5px !important;
    text-align: center !important;
    border-radius: 4px !important;
    display: none !important;
}

.wd-otp-notice.active,
.wd-checkout-otp-notice.active {
    display: block !important;
    padding: 7px 10px !important;
}

.wd-otp-notice.error,
.wd-checkout-otp-notice.error {
    background-color: #fff1f0 !important;
    color: #cf1322 !important;
    border: 1px solid #ffa39e !important;
}

.wd-otp-notice.success,
.wd-checkout-otp-notice.success {
    background-color: #f6ffed !important;
    color: #389e0d !important;
    border: 1px solid #b7eb8f !important;
}

.wd-otp-container button.woocommerce-form-login__submit {
    width: 100% !important;
    margin-top: 5px !important;
}

/* ==========================================================================
   بخش تسویه حساب (Checkout)
   ========================================================================== */
.wd-checkout-otp-box {
    margin: 15px 0 20px 0 !important;
    width: 100% !important;
}

.wd-checkout-otp-card {
    background: #fdfdfd !important;
    border: 1.5px dashed #d9d9d9 !important;
    border-radius: 8px !important;
    padding: 16px !important;
    transition: border-color 0.3s ease !important;
}

.wd-checkout-otp-card:hover {
    border-color: var(--wd-primary-color, #e05822) !important;
}

.wd-checkout-otp-header {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    margin-bottom: 10px !important;
    font-size: 13.5px !important;
    color: #333 !important;
}

.wd-checkout-otp-badge {
    background: var(--wd-primary-color, #e05822) !important;
    color: #fff !important;
    font-size: 11px !important;
    padding: 2px 7px !important;
    border-radius: 12px !important;
    font-weight: bold !important;
}

.wd-checkout-otp-desc {
    font-size: 12px !important;
    color: #666 !important;
    margin-bottom: 12px !important;
    line-height: 1.5 !important;
}

.wd-checkout-send-btn {
    width: 100% !important;
    height: 42px !important;
    border-radius: 6px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
}

.wd-checkout-code-wrap {
    max-width: 220px !important;
    margin: 0 auto 10px auto !important;
}

.wd-checkout-footer {
    text-align: center !important;
    font-size: 12px !important;
    color: #777 !important;
}

.wd-checkout-footer a {
    color: var(--wd-primary-color, #e05822) !important;
    text-decoration: none !important;
}

.wd-checkout-success-badge {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    background: #f6ffed !important;
    border: 1px solid #b7eb8f !important;
    padding: 10px 14px !important;
    border-radius: 6px !important;
    color: #389e0d !important;
    font-size: 13px !important;
    font-weight: 600 !important;
}

#billing_phone[readonly],
.wd-phone-locked {
    background-color: #f7f7f7 !important;
    color: #555 !important;
    cursor: not-allowed !important;
    border-color: #e2e2e2 !important;
    box-shadow: none !important;
}

.wd-phone-locked-hint {
    display: flex !important;
    align-items: center !important;
    gap: 4px !important;
    font-size: 11.5px !important;
    color: #888 !important;
    margin-top: 5px !important;
    line-height: 1.4 !important;
}

.wd-phone-locked-hint svg {
    display: inline-block !important;
    stroke: #888 !important;
    flex-shrink: 0 !important;
}

/* ==========================================================================
   بخش تغییر کلمه عبور با OTP در صفحه حساب کاربری (Edit Account)
   ========================================================================== */
form.woocommerce-EditAccountForm fieldset:not(.wd-otp-password-fieldset) {
    display: none !important;
}

form.woocommerce-EditAccountForm .form-row:has(#account_email) label span.required {
    display: none !important;
}

.wd-otp-password-fieldset {
    margin: 25px 0 !important;
    padding: 0 !important;
    border: none !important;
}

.wd-otp-password-fieldset legend {
    font-weight: 700 !important;
    font-size: 15px !important;
    margin-bottom: 15px !important;
    color: #333 !important;
}

.wd-otp-password-card {
    background: #fafafa !important;
    border: 1px solid #e8e8e8 !important;
    border-radius: 8px !important;
    padding: 18px !important;
}

/* استایل دکمه دریافت کد در حساب کاربری */
#wd-pwd-send-otp-btn,
.wd-pwd-btn {
    width: 100% !important;
    height: 44px !important;
    background-color: var(--wd-primary-color, #e05822) !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 5px !important;
    font-weight: 700 !important;
    font-size: 14px !important;
    cursor: pointer !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1) !important;
    transition: all 0.25s ease !important;
}

#wd-pwd-send-otp-btn:hover,
.wd-pwd-btn:hover {
    background-color: var(--wd-primary-color-hover, #c94614) !important;
    color: #ffffff !important;
    opacity: 0.95 !important;
}

/* باکس اعلان و پیام‌های تغییر کلمه عبور */
.wd-pwd-notice-box {
    margin-top: 15px !important;
}

.wd-pwd-alert-error {
    background-color: #fff1f0 !important;
    color: #cf1322 !important;
    border: 1px solid #ffa39e !important;
    padding: 10px 14px !important;
    border-radius: 6px !important;
    font-size: 13px !important;
    text-align: center !important;
}

/* کارت پیام موفقیت پس از تغییر رمز */
.wd-pwd-success-card {
    display: flex !important;
    align-items: flex-start !important;
    gap: 12px !important;
    background: #f6ffed !important;
    border: 1px solid #b7eb8f !important;
    padding: 14px 16px !important;
    border-radius: 8px !important;
    color: #274917 !important;
}

.wd-pwd-success-card svg {
    flex-shrink: 0 !important;
    margin-top: 2px !important;
}

.wd-pwd-success-card strong {
    display: block !important;
    font-size: 14px !important;
    margin-bottom: 4px !important;
    color: #389e0d !important;
}

.wd-pwd-success-card p {
    margin: 0 !important;
    font-size: 12.5px !important;
    line-height: 1.6 !important;
    color: #555 !important;
}
