.wccw-auth-card{max-width:520px;margin:24px auto;padding:24px;border:1px solid #e5e7eb;border-radius:16px;background:#fff;box-shadow:0 8px 30px rgba(0,0,0,.06)}
.wccw-auth-card h3{margin:0 0 8px}.wccw-auth-card input{width:100%;margin:8px 0;padding:12px;border:1px solid #d1d5db;border-radius:10px}.wccw-auth-card .button{width:100%;margin-top:10px;padding:12px}
.wccw-message{margin-top:12px}.wccw-message.err,.wccw-instant-result.err{color:#b91c1c}.wccw-message.ok,.wccw-instant-result.ok{color:#15803d}.wccw-test-code{margin:10px 0;padding:10px;border-radius:10px;background:#fff7cc;color:#7c5f00;font-weight:700}
.wccw-wallet-summary{display:flex;flex-wrap:wrap;gap:12px;align-items:center;justify-content:space-between;margin:20px 0;padding:18px 22px;border-radius:16px;background:#e8fff0;border:1px solid #9ae6b4}.wccw-wallet-summary span{display:block;font-size:13px;color:#166534}.wccw-wallet-summary strong{display:block;font-size:26px;color:#0f8a3c}.wccw-wallet-meta{color:#14532d}
.wccw-table-wrap{overflow:auto}.wccw-dashboard-head{display:flex;justify-content:space-between;align-items:center;gap:10px}.wccw-instant-result{margin-top:12px;font-weight:700}

/* v0.2 - popup login independent from theme */
html.wccw-modal-open{overflow:hidden!important}
.wccw-auth-modal{display:none;position:fixed;inset:0;z-index:2147483000;align-items:center;justify-content:center;padding:18px}
.wccw-auth-modal.is-open{display:flex}
.wccw-auth-backdrop{position:absolute;inset:0;background:rgba(0,0,0,.58);backdrop-filter:blur(2px)}
.wccw-auth-dialog{position:relative;z-index:2;width:min(520px,calc(100vw - 28px));max-height:calc(100vh - 32px);overflow:auto;border-radius:18px;background:#fff;box-shadow:0 24px 80px rgba(0,0,0,.28)}
.wccw-auth-dialog .wccw-auth-card{margin:0;border:0;box-shadow:none;max-width:none;padding:28px}
.wccw-modal-close{position:absolute;top:10px;left:12px;z-index:4;width:34px;height:34px;border:0;border-radius:50%;background:#f1f3f5;color:#333;font-size:25px;line-height:30px;cursor:pointer}
.wccw-auth-card .button{cursor:pointer;background:#ef394e!important;color:#fff!important;border:0!important;border-radius:10px!important;min-height:46px}
.wccw-auth-card input{box-sizing:border-box;font-size:16px!important;direction:rtl}
.wccw-stage-code .wccw-code-input,.wccw-stage-otp .wccw-otp-input{direction:ltr;text-align:center;letter-spacing:2px}
body.wccw-front-gated #wccw-auth-modal .wccw-auth-backdrop{cursor:default}
@media(max-width:600px){.wccw-auth-modal{padding:10px}.wccw-auth-dialog{width:100%;border-radius:14px}.wccw-auth-dialog .wccw-auth-card{padding:22px 18px}}

/* v0.2.1 - OTP resend/countdown */
.wccw-otp-timers{display:flex;flex-wrap:wrap;justify-content:space-between;gap:8px;margin:8px 0 2px;font-size:13px;color:#6b7280}.wccw-expire-timer{color:#9a6700}.wccw-resend-timer{color:#4b5563}.wccw-resend-btn{width:100%;margin-top:8px;padding:10px 12px;border:1px solid #d1d5db;border-radius:10px;background:#fff;color:#374151;cursor:pointer}.wccw-resend-btn:disabled{opacity:.55;cursor:not-allowed}


/* v0.2.5 - header credit after phone + OTP success stays in popup */
#wccw-header-credit-source{display:none!important}
.wccw-header-credit{display:inline-flex!important;align-items:center;gap:6px;white-space:nowrap;padding:7px 10px;margin-inline:7px;border:1px solid #9ae6b4;border-radius:10px;background:#e8fff0;color:#166534!important;text-decoration:none!important;line-height:1.25;vertical-align:middle}
.wccw-header-credit span{font-size:11px;color:#166534}.wccw-header-credit strong{font-size:13px;color:#0f8a3c;font-weight:800}.wccw-header-credit .woocommerce-Price-amount{color:inherit!important}
.wccw-stage-success{text-align:center}.wccw-stage-success h3{margin-bottom:8px}.wccw-success-name{color:#374151;margin-bottom:14px}.wccw-success-balance{padding:18px;border:1px solid #9ae6b4;border-radius:14px;background:#e8fff0;margin:14px 0}.wccw-success-balance span{display:block;color:#166534;font-size:13px;margin-bottom:5px}.wccw-success-balance strong{display:block;color:#0f8a3c;font-size:28px}.wccw-enter-store{display:block;text-align:center;text-decoration:none!important}
.toolbar_mobile .wccw-credit-col{display:flex;align-items:center;justify-content:center}.toolbar_mobile .wccw-header-credit{flex-direction:column;gap:1px;margin:0;padding:4px 5px;min-width:62px;border-radius:8px}.toolbar_mobile .wccw-header-credit span{font-size:9px}.toolbar_mobile .wccw-header-credit strong{font-size:10px;max-width:78px;overflow:hidden;text-overflow:ellipsis}
@media(max-width:600px){.wccw-header-credit{padding:5px 7px;margin-inline:4px}.wccw-header-credit span{font-size:9px}.wccw-header-credit strong{font-size:11px}.wccw-success-balance strong{font-size:23px}}

/* v0.2.6 placement overrides: credit on visual right of phone */
.wccw-right-of-phone-credit{position:relative!important;z-index:20!important;align-self:center!important;flex:0 0 auto!important}
header .wccw-right-of-phone-credit,.mobile-header .wccw-right-of-phone-credit{display:inline-flex!important}
@media(max-width:768px){.wccw-right-of-phone-credit{padding:5px 7px!important;margin-inline:5px!important;max-width:125px}.wccw-right-of-phone-credit span{font-size:9px!important}.wccw-right-of-phone-credit strong{font-size:10px!important;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}}

/* v0.2.6 credit-limit notice: force user to handle the cart; no close control */
[data-wccw_credit_limit="1"] .close,[data-wccw_credit_limit="1"] .notice-close,[data-wccw_credit_limit="1"] .toast-close,[data-wccw_credit_limit="1"] [aria-label="Close"],[data-wccw_credit_limit="1"] [aria-label="بستن"]{display:none!important}


/* v0.3.6 — Theme-independent wallet tables.
   These selectors are intentionally scoped to the wallet dashboard. WooCommerce
   and custom theme table rules must not flatten or hide table cells. */
.wccw-dashboard{
  box-sizing:border-box;
  direction:rtl;
  width:100%;
  min-width:0;
}
.wccw-dashboard .wccw-dashboard-head{
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  flex-wrap:wrap;
  gap:10px 16px;
  margin:28px 0 10px;
}
.wccw-dashboard .wccw-dashboard-head h3,
.wccw-dashboard > h3{
  margin:24px 0 12px!important;
  padding:0!important;
  line-height:1.6!important;
  font-size:18px!important;
  font-weight:700!important;
}
.wccw-dashboard .wccw-dashboard-head h3{margin:0!important}
.wccw-dashboard .wccw-table-wrap{
  box-sizing:border-box;
  display:block!important;
  width:100%!important;
  max-width:100%;
  margin:10px 0 24px!important;
  padding:0!important;
  border:1px solid #dce4ec!important;
  border-radius:12px!important;
  background:#fff!important;
  overflow-x:auto!important;
  overflow-y:hidden!important;
  -webkit-overflow-scrolling:touch;
}
.wccw-dashboard .wccw-table-wrap > table.wccw-data-table{
  box-sizing:border-box!important;
  display:table!important;
  width:100%!important;
  min-width:640px!important;
  max-width:none!important;
  margin:0!important;
  padding:0!important;
  border:0!important;
  border-radius:0!important;
  border-collapse:separate!important;
  border-spacing:0!important;
  table-layout:auto!important;
  direction:rtl!important;
  background:#fff!important;
  color:#253344!important;
  text-align:right!important;
  font-size:13px!important;
  line-height:1.75!important;
}
.wccw-dashboard .wccw-table-wrap > table.wccw-orders-table{
  min-width:520px!important;
}
.wccw-dashboard .wccw-table-wrap > table.wccw-data-table thead{
  display:table-header-group!important;
  visibility:visible!important;
}
.wccw-dashboard .wccw-table-wrap > table.wccw-data-table tbody{
  display:table-row-group!important;
}
.wccw-dashboard .wccw-table-wrap > table.wccw-data-table tr{
  display:table-row!important;
  visibility:visible!important;
  float:none!important;
  width:auto!important;
  background:transparent!important;
}
.wccw-dashboard .wccw-table-wrap > table.wccw-data-table th,
.wccw-dashboard .wccw-table-wrap > table.wccw-data-table td{
  box-sizing:border-box!important;
  display:table-cell!important;
  visibility:visible!important;
  float:none!important;
  position:static!important;
  width:auto!important;
  height:auto!important;
  margin:0!important;
  padding:13px 15px!important;
  border:0!important;
  border-bottom:1px solid #e5eaf0!important;
  border-radius:0!important;
  vertical-align:middle!important;
  text-align:right!important;
  white-space:nowrap!important;
  overflow-wrap:normal!important;
  background:transparent!important;
  color:inherit!important;
  font-weight:400!important;
  font-size:inherit!important;
  line-height:inherit!important;
  text-transform:none!important;
}
.wccw-dashboard .wccw-table-wrap > table.wccw-data-table th{
  background:#f2f6fa!important;
  color:#24364b!important;
  font-weight:700!important;
  border-bottom:1px solid #dce4ec!important;
}
.wccw-dashboard .wccw-table-wrap > table.wccw-data-table th + th,
.wccw-dashboard .wccw-table-wrap > table.wccw-data-table td + td{
  border-right:1px solid #edf1f5!important;
}
.wccw-dashboard .wccw-table-wrap > table.wccw-data-table tbody tr:last-child td{
  border-bottom:0!important;
}
.wccw-dashboard .wccw-table-wrap > table.wccw-data-table tbody tr:nth-child(even){
  background:#fafcff!important;
}
.wccw-dashboard .wccw-table-wrap > table.wccw-data-table tbody tr:hover{
  background:#f2fbf5!important;
}
.wccw-dashboard .wccw-table-wrap > table.wccw-ledger-table td:nth-child(2){
  min-width:190px!important;
  max-width:360px;
  white-space:normal!important;
  overflow-wrap:anywhere!important;
}
.wccw-dashboard .wccw-table-wrap > table.wccw-data-table td a{
  color:#087b46!important;
  font-weight:700!important;
  text-decoration:none!important;
}
/* Defend against WooCommerce responsive-cell labels and theme pseudo-elements. */
.wccw-dashboard .wccw-table-wrap > table.wccw-data-table td::before,
.wccw-dashboard .wccw-table-wrap > table.wccw-data-table td::after{
  content:none!important;
  display:none!important;
}
@media (max-width:640px){
  .wccw-dashboard .wccw-table-wrap > table.wccw-data-table{
    font-size:12px!important;
  }
  .wccw-dashboard .wccw-table-wrap > table.wccw-data-table th,
  .wccw-dashboard .wccw-table-wrap > table.wccw-data-table td{
    padding:11px 12px!important;
  }
}
