/* ===== OC Mobile Auth Styles ===== */
:root {
    --oc-primary: #6c63ff;
    --oc-primary-dark: #574fd6;
    --oc-danger: #e74c3c;
    --oc-success: #27ae60;
    --oc-warning: #f39c12;
    --oc-text: #2d3748;
    --oc-text-light: #718096;
    --oc-border: #dde3ec;
    --oc-bg: #f2f5fb;
    --oc-card-bg: #ffffff;
    --oc-radius: 12px;
    --oc-shadow: 0 8px 28px rgba(24, 41, 74, 0.08);
    --oc-transition: .2s ease;
    --oc-font: 'Estedad', 'Tahoma', 'Arial', sans-serif;
}

/* ========================================
   فونت Estedad - فقط ۳ وزن ضروری
======================================== */

/* نازک - Extra Light (200) */
@font-face {
    font-family: 'Estedad';
    src: url('../fonts/estedad/extra-light.woff2') format('woff2');
    font-weight: 200;
    font-style: normal;
    font-display: swap;
}

/* استاندارد - Regular (400) */
@font-face {
    font-family: 'Estedad';
    src: url('../fonts/estedad/regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

/* بولد - Bold (700) */
@font-face {
    font-family: 'Estedad';
    src: url('../fonts/estedad/bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}


/* Card */
.oc-auth-wrap { display:flex; justify-content:center; align-items:center; min-height:100vh; min-height:100dvh; width:100%; padding:20px; background:var(--oc-bg); direction:rtl; font-family:var(--oc-font); box-sizing:border-box; }
.oc-auth-body { margin:0; background:var(--oc-bg); font-family:var(--oc-font); }
.oc-auth-card { background:var(--oc-card-bg); border-radius:var(--oc-radius); box-shadow:var(--oc-shadow); padding:40px 36px; width:100%; max-width:420px; box-sizing:border-box; }
.oc-auth-logo { text-align:center; margin-bottom:20px; }
.oc-auth-logo img { max-height:60px; max-width:180px; width:auto; height:auto; margin:0 auto; display:block; }
.oc-site-name { font-size:1.4rem; color:var(--oc-primary); margin:0; font-weight:700; }
.oc-auth-title { font-size:1.2rem; font-weight:700; color:var(--oc-text); text-align:center; margin:0 0 24px; }
.oc-auth-back-home { margin:0 0 12px; width:100%; }
.oc-auth-back-home a { color:#556070; text-decoration:none; font-size:.85rem; }
.oc-auth-back-home a:hover { color:var(--oc-primary); text-decoration:underline; }

/* Fields */
.oc-field-group { margin-bottom:16px; }
.oc-label { display:block; font-size:.85rem; font-weight:600; color:var(--oc-text); margin-bottom:6px; }
.oc-required { color:var(--oc-danger); margin-right:2px; }
.oc-optional { color:var(--oc-text-light); font-weight:400; font-size:.8rem; }
.oc-input-wrap { position:relative; display:flex; align-items:center; border:1px solid var(--oc-border); border-radius:10px; background:#fff; overflow:hidden; transition:border-color var(--oc-transition), box-shadow var(--oc-transition); }
.oc-input-wrap:focus-within { border-color:var(--oc-primary); box-shadow:0 0 0 3px rgba(108,99,255,.12); }
.oc-input-icon { position:absolute; right:12px; width:18px; height:18px; top:50%; transform:translateY(-50%); color:var(--oc-text-light); pointer-events:none; display:flex; align-items:center; z-index:1; }
.oc-input-icon svg { width:18px; height:18px; }
.oc-input { width:100%; padding:12px 44px 12px 44px !important; border:none; border-radius:10px; font-size:.95rem; color:var(--oc-text); background:transparent; transition:color var(--oc-transition); outline:none; box-sizing:border-box; font-family:var(--oc-font); text-align:right; direction:inherit; }
.oc-input::placeholder { color:#a0a9ba; }
.oc-input.oc-error { color:var(--oc-danger); }
.oc-input[dir="ltr"] { text-align:left; direction:ltr; padding-right:44px; padding-left:44px; }

/* Toggle password */
.oc-toggle-pass {
    position:absolute !important;
    left:10px;
    top:50%;
    transform:translateY(-50%);
    background:none !important;
    border:none;
    cursor:pointer;
    padding:4px;
    color:var(--oc-text);
    color: var(--oc-text) !important;
    display:flex;
    align-items:center;
    justify-content:center;
    width:30px;
    height:30px;
    z-index:5;
    direction: ltr;
}

.oc-toggle-pass svg {
    width:18px;
    height:18px;
    pointer-events:none;
}

.oc-toggle-pass .eye-show { display:block; }
.oc-toggle-pass .eye-hide { display:none; }

.oc-toggle-pass.oc-password-visible .eye-show { display:none; }
.oc-toggle-pass.oc-password-visible .eye-hide { display:block; }

/* Password strength */
.oc-password-strength { height:4px; border-radius:2px; margin-top:6px; transition:all var(--oc-transition); }
.oc-password-strength.weak   { background:var(--oc-danger); width:33%; }
.oc-password-strength.medium { background:var(--oc-warning); width:66%; }
.oc-password-strength.strong { background:var(--oc-success); width:100%; }

/* Form footer */
.oc-form-footer { display:flex; justify-content:space-between; align-items:center; margin-bottom:16px; font-size:.85rem; }
.oc-checkbox-label { display:flex; align-items:center; gap:6px; cursor:pointer; color:var(--oc-text); }
.oc-link { color:var(--oc-primary); text-decoration:none; font-size:.85rem; }
.oc-link:hover { text-decoration:underline; }

/* Button */
.oc-btn { display:flex; justify-content:center; align-items:center; gap:8px; width:100%; padding:12px; border:none; border-radius:48px !important; font-size:1rem; font-weight:600; cursor:pointer; transition:background var(--oc-transition), transform var(--oc-transition); font-family:var(--oc-font); }
.oc-btn-primary { background:var(--oc-primary); color:#fff; }
.oc-btn-primary:hover { background:var(--oc-primary-dark); }
.oc-btn-primary:active { transform:scale(.98); }
.oc-btn-primary:disabled { opacity:.7; cursor:not-allowed; }

/* Loader */
.oc-btn-loader { width:18px; height:18px; border:2px solid rgba(255,255,255,.4); border-top-color:#fff; border-radius:50%; animation:oc-spin .7s linear infinite; }

/* Alert */
.oc-alert { padding:10px 14px; border-radius:8px; font-size:.9rem; margin-bottom:16px; }
.oc-alert-success,
.oc-alert-error,
.oc-alert-danger {
    direction: rtl;
    border-radius: 10px;
    padding: 10px 14px;
    margin-bottom: 16px;
    font-size: 0.92rem;
    line-height: 1.45;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
    display: block;
}

.oc-alert-success {
    background-color: #ebfff2 !important;
    color: #0f5c2a !important;
    border: 1px solid #a8e7b2 !important;
}

.oc-alert-error {
    background-color: #fff1f3 !important;
    color: #8a1a2f !important;
    border: 1px solid #f5b3bf !important;
}

.oc-alert-danger {
    background-color: #fff1f3 !important;
    color: #8a1a2f !important;
    border: 1px solid #f4a5b1 !important;
}

body.oc-auth-replace-all .woocommerce-message,
body.oc-auth-replace-all .woocommerce-info {
    border-radius: 8px;
    margin-bottom: 14px;
}

/* جلوگیری از نمایش فرم‌های پیش‌فرض ووکامرس/وودمارت هنگام جایگزینی */
body.oc-auth-replace-all .woocommerce-form-login,
body.oc-auth-replace-all .woocommerce-form-register,
body.oc-auth-replace-all .u-column1,
body.oc-auth-replace-all .u-column2,
body.oc-auth-replace-all .col2-set,
body.oc-auth-replace-all .woocommerce-notices-wrapper + form {
    display: none !important;
}

body.oc-auth-replace-all .oc-auth-sidebar form {
    margin: 0;
}

/* Switch form */
.oc-switch-form { text-align:center; font-size:.85rem; color:var(--oc-text-light); margin-top:16px; }
.oc-switch-form .oc-link { margin-right:4px; }

/* ===== Admin Styles ===== */
.oc-admin-wrap { max-width:700px; direction:rtl; }
.oc-auth-logo-setting { display:flex; flex-direction:column; gap:8px; }
.oc-auth-logo-preview { max-width:180px; max-height:80px; width:auto; height:auto; display:block; margin-bottom:8px; }
.oc-admin-header { display:flex; align-items:center; gap:12px; margin-bottom:24px; }
.oc-admin-version { background:var(--oc-primary); color:#fff; padding:2px 10px; border-radius:20px; font-size:.8rem; }
.oc-admin-card { background:#fff; border:1px solid var(--oc-border); border-radius:var(--oc-radius); padding:24px; margin-bottom:20px; }
.oc-admin-card h2 { margin-top:0; font-size:1rem; color:var(--oc-text); border-bottom:1px solid var(--oc-border); padding-bottom:12px; }
.oc-btn-save { background:var(--oc-primary) !important; color:#fff !important; border-color:var(--oc-primary-dark) !important; }

/* Toggle switch */
.oc-toggle { position:relative; display:inline-block; width:48px; height:26px; }
.oc-toggle input { opacity:0; width:0; height:0; }
.oc-toggle-slider { position:absolute; inset:0; background:#ccc; border-radius:26px; cursor:pointer; transition:var(--oc-transition); }
.oc-toggle-slider:before { content:''; position:absolute; width:20px; height:20px; right:3px; bottom:3px; background:#fff; border-radius:50%; transition:var(--oc-transition); }
.oc-toggle input:checked + .oc-toggle-slider { background:var(--oc-primary); }
.oc-toggle input:checked + .oc-toggle-slider:before { transform:translateX(-22px); }

/* Tabs (WoodMart popup) */
.oc-auth-tabs .oc-auth-tab-nav { display:flex; border-bottom:2px solid var(--oc-border); margin-bottom:20px; }
.oc-tab-btn { flex:1; padding:10px; background:none; border:none; border-bottom:2px solid transparent; margin-bottom:-2px; cursor:pointer; font-size:.95rem; color:var(--oc-text-light); transition:all var(--oc-transition); }
.oc-tab-btn.active { color:var(--oc-primary); border-bottom-color:var(--oc-primary); font-weight:600; }
.oc-tab-content { display:none; }
.oc-tab-content.active { display:block; }

/* WoodMart sidebar/popup form container */
.oc-auth-sidebar {
    width: 100%;
    font-family: var(--oc-font);
    color: var(--oc-text);
}

.oc-auth-sidebar .oc-auth-wrap {
    padding: 0;
    align-items: flex-start;
    min-height: auto;
    gap: 0;
}

.oc-auth-sidebar .oc-auth-card {
    width: 100%;
    max-width: none;
    padding: 18px 16px;
    border: 1px solid var(--oc-border);
    box-shadow: none;
    border-radius: 12px;
    background: #fff;
}

.oc-auth-sidebar .oc-auth-tabs {
    width: 100%;
    --oc-sidebar-padding: 16px;
}

.oc-auth-sidebar .oc-auth-tab-nav {
    display: flex;
    gap: 8px;
    border: 1px solid var(--oc-border);
    border-bottom: 0;
    border-radius: 12px 12px 0 0;
    margin: 0;
    background: #fff;
    padding: 6px;
}

.oc-auth-sidebar .oc-tab-btn {
    border: 1px solid transparent;
    border-radius: 8px;
    margin: 0;
    min-height: 38px;
    color: #4b5568;
}

.oc-auth-sidebar .oc-tab-btn.active {
    border-color: #ececff;
    background: #f8f9ff;
    color: var(--oc-primary);
}

.oc-auth-sidebar .oc-tab-content {
    background: transparent;
    border: 1px solid var(--oc-border);
    border-top: 0;
    border-radius: 0 0 12px 12px;
    background: transparent;
    padding: 18px var(--oc-sidebar-padding);
}

.oc-auth-sidebar .oc-tab-content .oc-auth-card {
    padding: 0;
    border: none;
    background: transparent;
}

/* حذف فرم‌های قدیمی ووکامرس/وودمارت که ممکنه داخل پاپ‌آپ باقی بمانند */
.oc-auth-woodmart-popup .woocommerce-form-login,
.oc-auth-woodmart-popup .woocommerce-form-register,
.oc-auth-woodmart-popup .u-column1,
.oc-auth-woodmart-popup .u-column2,
.oc-auth-woodmart-popup .col2-set,
.oc-auth-woodmart-popup .oc-login-wrapper,
.oc-auth-woodmart-popup .oc-register-wrapper,
.oc-auth-woodmart-form .woocommerce-form-login,
.oc-auth-woodmart-form .woocommerce-form-register,
.oc-auth-woodmart-form .u-column1,
.oc-auth-woodmart-form .u-column2,
.oc-auth-woodmart-form .col2-set {
    display: none !important;
}

/* کلاس‌های معمول ووودمارت که روی popup/سایدبار قدیمی ظاهر می‌خورد */
.oc-auth-woodmart-popup [class*='wd-login'],
.oc-auth-sidebar [class*='wd-login'],
.oc-auth-woodmart-popup [class*='login-form'],
.oc-auth-sidebar [class*='login-form'],
.oc-auth-woodmart-popup [class*='register-form'],
.oc-auth-woodmart-popup form#loginform,
.oc-auth-woodmart-popup form[name='loginform'],
.oc-auth-woodmart-popup form#registerform,
.oc-auth-woodmart-popup form[name='registerform'],
.oc-auth-woodmart-popup form.woocommerce-form,
.oc-auth-woodmart-popup form[action*='wp-login.php'],
.oc-auth-sidebar form#loginform,
.oc-auth-sidebar form[name='loginform'],
.oc-auth-sidebar form#registerform,
.oc-auth-sidebar form[name='registerform'],
.oc-auth-sidebar form[action*='wp-login.php'],
.oc-auth-sidebar [class*='register-form'] {
    display: none !important;
}

.oc-admin-shortcode {
    background: #f7f8fd;
    border: 1px dashed #d7def0;
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 13px;
    direction: ltr;
    overflow: auto;
}

/* ظاهر بهتر در سایدبار و پاپ‌آپ */
.oc-auth-woodmart-popup,
.oc-auth-woodmart-form {
    direction: rtl;
}

.oc-auth-woodmart-popup .oc-auth-tabs,
.oc-auth-woodmart-form .oc-auth-wrap {
    direction: rtl;
}

.oc-auth-woodmart-popup .oc-auth-tab-nav {
    padding: 4px;
}

.oc-auth-woodmart-popup .oc-tab-btn {
    border-radius: 10px 10px 0 0;
}

.oc-auth-woodmart-popup .oc-tab-content {
    border-top: 1px solid var(--oc-border);
    border-radius: 0 0 12px 12px;
    overflow: visible;
}

.oc-auth-woodmart-popup-wrap {
    width: min(440px, 100%);
    max-height: min(88vh, 780px);
    overflow-y: auto;
    overscroll-behavior: contain;
}

/* Force auth shortcode */
.oc-auth-force-block {
    border: 1px solid var(--oc-border);
    background: #fff;
    border-radius: 12px;
    padding: 16px;
    margin: 16px 0;
    text-align: center;
}

.oc-auth-force-message {
    margin: 0 0 14px;
    color: var(--oc-text);
    font-size: .95rem;
    line-height: 1.6;
}

.oc-auth-force-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.oc-auth-force-actions .oc-btn {
    width: auto;
    min-width: 130px;
}

.oc-auth-back-home-link {
    display: inline-flex;
    align-items: center;
    color: var(--oc-text-light);
    text-decoration: none;
    font-size: .85rem;
}

.oc-auth-back-home-link:hover {
    color: var(--oc-primary);
    text-decoration: underline;
}

.oc-auth-woodmart-popup .oc-auth-card,
.oc-auth-sidebar .oc-auth-card {
    box-shadow: none;
}

body.oc-auth-force-checkout-login .woocommerce-checkout .woocommerce-form-login,
body.oc-auth-force-checkout-login .woocommerce-checkout .woocommerce-form-register,
body.oc-auth-force-checkout-login .woocommerce-checkout .create-account {
    display: none !important;
}

/* Spinner */
@keyframes oc-spin {
    to { transform:rotate(360deg); }
}

/* Responsive */
@media (max-width: 768px) {
    .oc-auth-wrap { padding:14px 10px; align-items:flex-start; }
    .oc-auth-card { width:100%; max-width:100%; padding:28px 16px; border-radius:14px; margin-top:8px; }
    .oc-auth-logo img { max-width:150px; }
    .oc-auth-title { margin-top:0; }
    .oc-auth-sidebar .oc-tab-content { padding: 16px 12px; }
    .oc-auth-sidebar .oc-auth-wrap { padding: 0; }
    .oc-auth-sidebar .oc-input-wrap { border-radius: 9px; }
}

@media (max-width: 420px) {
    .oc-auth-card { padding:22px 14px; }
    .oc-auth-logo { margin-bottom:16px; }
    .oc-auth-title { font-size:1.05rem; }
    .oc-input { font-size:.92rem; padding:12px 38px 12px 34px; }
    .oc-btn { padding:11px; font-size:.95rem; }
    .oc-auth-sidebar .oc-tab-content { padding: 12px; }
}
