/* ============================================
   Wallet Section Styles - Mobile First
   Note: CSS Variables are defined in assets/css/variable.css
   Note: Reset and base styles are in assets/css/global.css
   ============================================ */

/* ============================================
   BASE STYLES - MOBILE (320px+)
   ============================================ */

/* اشتراکات: ویژگی‌های عددی برای ستون‌های تاریخ و مبلغ */
.transactions-table-ws td:first-child,
.transaction-amount-ws {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

.transaction-section-ws {
  background-color: var(--color-bg-card);
  border-radius: var(--radius-lg);
  /* padding: var(--spacing-xl); */
  margin-bottom: var(--spacing-xl);
}

/* Section title header — mobile layout only (desktop: see dashboard.css) */

.section-title-ws {
  font-size: var(--font-size-xl);
  font-weight: 700;
  color: var(--color-text-primary);
  margin: 0;
  text-align: right;
}

.section-title-rules-wrapper-ws {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: var(--spacing-md);
}

/* Tabs - Mobile First */
.tab-container-ws {
  position: relative;
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  padding: 2px;
  background-color: var(--color-bg-lighter);
  border-radius: var(--radius-default);
  margin-bottom: var(--spacing-xl);
  width: 100%;
}

.indicator-ws {
  content: "";
  width: calc(50% - 2px);
  height: 36px;
  background: var(--color-bg-card);
  position: absolute;
  top: 2px;
  right: 2px;
  z-index: 9;
  border: 1px solid var(--color-border-light);
  box-shadow: var(--shadow-card);
  border-radius: var(--radius-default);
  transition: var(--transition-fast);
}

.tab-ws {
  width: calc(50% - 2px);
  height: 36px;
  position: absolute;
  z-index: 99;
  outline: none;
  opacity: 0;
  cursor: pointer;
}

.tab-ws--1 {
  right: 2px;
}

.tab-ws--2 {
  right: calc(50% + 2px);
}

.tab_label-ws {
  width: calc(50% - 2px);
  height: 36px;
  position: relative;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  font-size: 14px;
  font-weight: 500;
  opacity: 0.6;
  cursor: pointer;
  color: var(--color-text-primary);
  transition: var(--transition-fast);
  font-family:
    "iranyekan",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    "Roboto",
    "Oxygen",
    "Ubuntu",
    "Cantarell",
    "Fira Sans",
    "Droid Sans",
    "Helvetica Neue",
    "Arial",
    sans-serif;
}

.tab-ws:checked ~ .tab_label-ws {
  opacity: 1;
  font-weight: 600;
  color: var(--color-text-primary);
}

.tab-ws--1:checked ~ .indicator-ws {
  right: 2px;
}

.tab-ws--2:checked ~ .indicator-ws {
  right: calc(50% + 2px);
}

/* Tabs Wrapper - Mobile: Full Width */
.tabs-rules-wrapper-ws {
  margin-bottom: var(--spacing-xl);
}

.tabs-rules-wrapper .tab-container-ws {
  margin-bottom: 0;
  display: flex;
  align-items: center;
  height: 40px;
  box-sizing: border-box;
}

/* Rules Link - Mobile: Auto Width */
.rules-link-ws {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  padding: var(--spacing-sm) var(--spacing-md);
  background: transparent;
  border: none;
  border-radius: var(--radius-default);
  font-size: 14px;
  font-weight: 500;
  color: #ffc107;
  cursor: pointer;
  transition: var(--transition-fast);
  font-family:
    "iranyekan",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    "Roboto",
    "Oxygen",
    "Ubuntu",
    "Cantarell",
    "Fira Sans",
    "Droid Sans",
    "Helvetica Neue",
    "Arial",
    sans-serif;
  white-space: nowrap;
  height: 40px;
  box-sizing: border-box;
  min-height: 44px;
  /* Touch target */
  flex-shrink: 0;
}

.rules-link-ws:hover {
  background-color: rgba(255, 193, 7, 0.1);
}

.rules-link-ws:focus-visible {
  outline: 2px solid #ffc107;
  outline-offset: 2px;
  border-radius: var(--radius-default);
}

.rules-link-ws svg {
  width: 20px;
  height: 20px;
  stroke: #ffc107;
  flex-shrink: 0;
}

.rules-link-text-ws {
  color: #ffc107;
}

/* Rules text styles are now in global.css */

.deposit-section-ws,
.deposit-submit-ws,
.withdrawal-section-ws {
  width: 100%;
}

.deposit-form-container-ws,
.withdrawal-form-container-ws {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-lg);
}

/* Form Row - Mobile: Row (for amount input and max button) */
.form-row-ws {
  display: flex;
  flex-direction: row;
  gap: var(--spacing-sm);
  align-items: flex-end;
}

.form-row-ws .input-group-ws {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
}

.input-group-ws {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
  min-width: 0;
}

.wallet-manual-iban-hint {
  margin: 0 0 var(--spacing-sm);
  padding: var(--spacing-sm) var(--spacing-md);
  font-size: 13px;
  line-height: 1.6;
  color: var(--color-text-secondary);
  background: var(--color-bg-secondary, #f5f7fa);
  border-radius: var(--radius-card);
  text-align: right;
  margin-top: 3px;
}

#manualIbanStep[hidden],
#addCardManualIbanHint[hidden] {
  display: none !important;
}

.iban-input-wrap-ws {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-card);
  background-color: var(--color-bg-card);
  box-sizing: border-box;
  transition: var(--transition-fast);
}

.iban-input-wrap-ws:focus-within {
  border-color: var(--color-border-focus);
  box-shadow: var(--shadow-input-focus);
}

.iban-input-prefix-ws {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  padding: 0 12px;
  font-size: 15px;
  font-weight: 600;
  color: var(--color-text-primary);
  background-color: var(--color-bg-light, #f0f2f5);
  border-right: 1px solid var(--color-border-light);
  user-select: none;
}

.iban-input-wrap-ws .iban-digits-input-ws {
  flex: 1;
  width: 0;
  min-width: 0;
  border: none;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
}

.iban-input-wrap-ws .iban-digits-input-ws:focus {
  border: none;
  box-shadow: none;
  outline: none;
}

.input-label-ws {
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text-secondary);
  text-align: right;
}

.amount-input-ws {
  width: 100%;
  padding: 10px var(--spacing-md);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-card);
  font-size: 15px;
  font-weight: var(--font-weight-medium);
  font-family: inherit;
  direction: rtl;
  text-align: right;
  transition: var(--transition-fast);
  background-color: var(--color-bg-card);
  color: var(--color-text-primary);
  min-height: 44px;
  /* Touch target */
  box-sizing: border-box;
}

.card-input-ws {
  width: 100%;
  padding: 12px var(--spacing-md);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-card);
  font-size: 15px;
  font-weight: var(--font-weight-medium);
  font-family: inherit;
  direction: ltr;
  text-align: left;
  transition: var(--transition-fast);
  background-color: var(--color-bg-card);
  color: var(--color-text-primary);
  min-height: 44px;
  /* Touch target */
  box-sizing: border-box;
}

/* Amount Input Wrapper - for currency label */
.amount-input-wrapper-ws {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

/* Amount inputs in wrapper - LTR direction for number input */
.amount-input-wrapper-ws .amount-input-ws {
  direction: ltr;
  text-align: left;
  padding-left: 60px;
  /* Space for currency label "تومان" on the left */
  padding-right: var(--spacing-md);
  flex: 1;
}

/* Currency label (تومان) */
.amount-currency-ws {
  position: absolute;
  left: var(--spacing-md);
  top: 50%;
  transform: translateY(-50%);
  font-size: var(--font-size-base);
  font-weight: 500;
  color: var(--color-text-secondary);
  pointer-events: none;
  user-select: none;
  white-space: nowrap;
  z-index: 1;
}

.amount-input-ws:focus,
.card-input-ws:focus {
  outline: none;
  border-color: var(--color-border-focus);
  box-shadow: var(--shadow-input-focus);
}

.amount-input-ws::placeholder {
  color: var(--color-text-muted);
  text-align: right;
  opacity: 1;
}

.card-input-ws::placeholder {
  color: var(--color-text-muted);
  text-align: left;
  opacity: 1;
}

.max-amount-btn-ws {
  flex-shrink: 0;
  padding: 12px var(--spacing-md);
  background-color: var(--color-bg-light);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-card);
  font-size: 12px;
  font-weight: 500;
  color: var(--color-text-primary);
  cursor: pointer;
  transition: var(--transition-fast);
  white-space: nowrap;
  font-family: inherit;
  min-height: 44px;
  /* Touch target */
  min-width: 90px;
  box-sizing: border-box;
  position: relative;
  align-self: flex-end;
}

/* Mobile: Show shorter text, hide original */
.max-amount-btn-ws {
  font-size: 0;
  /* Hide original text */
}

.max-amount-btn-ws::before {
  content: attr(data-mobile-text);
  font-size: 12px;
}

.max-amount-btn-ws:hover {
  background-color: var(--color-bg-lighter);
  border-color: var(--color-primary-blue);
  color: var(--color-primary-blue);
}

/* Form Actions - Mobile: Column */
.form-actions-ws {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
  margin-top: var(--spacing-xs);
}

.add-card-btn-ws {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-sm);
  padding: var(--spacing-sm) var(--spacing-md);
  background-color: var(--color-bg-card);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-card);
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text-primary);
  cursor: pointer;
  transition: var(--transition-fast);
  font-family: inherit;
  white-space: nowrap;
  flex-shrink: 0;
  min-height: 36px;
  /* Touch target */
  box-sizing: border-box;
}

.add-card-btn-ws:hover {
  background-color: var(--color-bg-light);
  border-color: var(--color-primary-blue);
  color: var(--color-primary-blue);
}

.add-card-btn-ws:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(28, 36, 116, 0.08);
}

.add-card-btn-ws svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  flex-shrink: 0;
}

.deposit-btn-ws,
.withdraw-btn-ws {
  width: 100%;
  padding: 14px var(--spacing-xl);
  background-color: var(--color-primary-blue);
  color: var(--color-text-white);
  border: none;
  border-radius: var(--radius-card);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
  font-family: inherit;
  min-height: 44px;
  /* Touch target */
  box-sizing: border-box;
}

.deposit-btn-ws:hover,
.withdraw-btn-ws:hover {
  background-color: var(--color-primary-blue-hover);
}

.deposit-btn-ws:active,
.withdraw-btn-ws:active {
  background-color: var(--color-primary-blue-active);
}

/* Modal styles are now in global.css */

/* لیست تراکنش‌های اخیر Section */
.transactions-list-section-ws {
  width: 100%;
  margin-top: var(--spacing-4xl);
}

#transactionsListTitle-ws {
  margin: var(--spacing-xl) 0 var(--spacing-xl) 0;
}

.transactions-container-ws {
  width: 100%;
}

.transactions-table-wrapper-ws {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.transactions-table-ws {
  width: 100%;
  min-width: 600px;
  /* Minimum width for table */
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-card);
  overflow: hidden;
  background-color: #ffffff;
}

.transactions-table-ws thead {
  background-color: #ffffff;
}

.transactions-table-ws th {
  padding: var(--spacing-md) var(--spacing-sm);
  text-align: center;
  font-weight: 600;
  color: var(--color-text-primary);
  border-bottom: 2px solid var(--color-border-light);
  white-space: nowrap;
  font-size: 13px;
}

.transactions-table-ws td {
  padding: var(--spacing-md) var(--spacing-sm);
  text-align: center;
  color: var(--color-text-primary);
  border-bottom: 1px solid var(--color-border-lighter);
  font-variant-numeric: tabular-nums;
  vertical-align: middle;
  height: 50px;
  font-size: 13px;
}

.transactions-table-ws tbody tr:hover {
  background-color: var(--color-bg-light);
}

.transactions-table-ws tbody tr:last-child td {
  border-bottom: none;
}

.status-badge-ws {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
}

.status-success-ws {
  background: #f0f6fc;
  color: #2271b1;
  border: 1px solid #72aee6;
}

.status-processing-ws,
.status-pending-ws {
  color: #996800;
  background: #fcf9e8;
  border: 1px solid rgba(219, 166, 23, 0.4);
}

.status-canceled-ws,
.status-failed-ws {
  color: #d63638;
  background: #fcf0f1;
  border: 1px solid rgba(214, 54, 56, 0.4);
}

.transaction-type-ws {
  font-weight: 500;
}

/* برای ستون مبلغ در جدول تراکنش‌ها */
.transaction-amount-ws {
  /* اشتراکات: font-variant-numeric و font-feature-settings در تعریف مشترک با td:first-child */
  /* استایل‌های مشترک با تعریف اول (کامنت شده) */
  font-weight: 600;
  direction: rtl;
  display: flex;
  flex-direction: row-reverse;
  gap: 4px;

  /* استایل‌های مخصوص سلول جدول */
  text-align: center;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  width: 100%;
}

.empty-state-ws {
  text-align: center;
  padding: 40px var(--spacing-lg);
  color: var(--color-text-muted);
  font-size: 14px;
}

/* Error Messages */
.error-message-ws {
  display: block;
  margin-top: 6px;
  font-size: 11px;
  color: var(--color-status-error);
  font-weight: 500;
  min-height: 18px;
}

.error-message-ws:empty {
  display: none;
}

.input-group-ws input:invalid:not(:placeholder-shown) + .error-message-ws {
  display: block;
}

/* Loading Indicators */
.loading-spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #ffffff;
  animation: spin 0.8s linear infinite;
  margin-left: 8px;
  vertical-align: middle;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.button-loading {
  position: relative;
  color: transparent !important;
  pointer-events: none;
}

.button-loading::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #ffffff;
  animation: spin 0.8s linear infinite;
}

/* Bank Card Display - Mobile */
.bank-cards-container-ws {
  margin-bottom: var(--spacing-lg);
}

.bank-cards-header-ws {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-md);
}

.bank-cards-title-ws {
  font-size: 16px;
  font-weight: 700;
  color: var(--color-text-primary);
  line-height: 1.4;
  flex: 1;
  min-width: 0;
}

.bank-cards-list-ws {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
}

.bank-card-item-ws {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  padding: var(--spacing-md);
  background-color: var(--color-bg-card);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-card);
  cursor: pointer;
  transition: var(--transition-fast);
  position: relative;
  overflow: hidden;
  gap: var(--spacing-md);
}

.bank-card-item-ws::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 3px;
  height: 100%;
  background-color: transparent;
  transition: var(--transition-fast);
}

.bank-card-item-ws:hover {
  border-color: var(--color-primary-blue);
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-1px);
}

.bank-card-item-ws:hover::before {
  background-color: var(--color-primary-blue);
}

.bank-card-item-ws.selected {
  border-color: var(--color-primary-blue);
  background-color: #ffffff;
  box-shadow: 0 0 0 1px rgba(28, 36, 116, 0.1);
}

.bank-card-item-ws.selected::before {
  background-color: var(--color-primary-blue);
}

.bank-card-item-ws.selected:hover {
  border-color: var(--color-primary-blue);
  box-shadow: 0 0 0 1px rgba(28, 36, 116, 0.12);
}

.bank-card-item-ws.selected:hover::before {
  background-color: var(--color-primary-blue);
}

.bank-card-item-ws:focus-visible {
  outline: none;
  box-shadow: var(--shadow-input-focus);
}

.bank-card-info-ws {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  flex: 1;
  min-width: 0;
}

.bank-card-icon-ws {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  /* background-color: var(--color-bg-lighter); */
  border-radius: var(--radius-default);
  flex-shrink: 0;
  overflow: hidden;
  position: relative;
}

.bank-card-icon-ws svg {
  width: 24px;
  height: 24px;
}

.bank-logo-img-ws {
  width: 100%;
  height: 100%;
  background-size: cover;
  padding: 4px;
}

.bank-card-details-ws {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-xs);
  min-width: 0;
  flex: 1;
}

.bank-card-number-wrapper-ws {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  direction: rtl;
  flex-direction: row;
  min-height: 24px;
}

.bank-card-selected-badge-ws {
  display: none;
  /* Hidden on mobile */
  padding: 4px var(--spacing-sm);
  background-color: rgba(180, 150, 89, 0.12);
  color: var(--color-secondary-gold);
  font-size: 11px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes fadeOut {
  from {
    opacity: 1;
  }

  to {
    opacity: 0;
  }
}

.bank-card-number-ws {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text-primary);
  font-family:
    "iranyekan",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    "Roboto",
    "Oxygen",
    "Ubuntu",
    "Cantarell",
    "Fira Sans",
    "Droid Sans",
    "Helvetica Neue",
    "Arial",
    sans-serif;
  letter-spacing: 1px;
  line-height: 1.4;
  direction: ltr;
  text-align: right;
  word-break: break-all;
}

.bank-card-name-ws {
  font-size: 11px;
  font-weight: 500;
  color: var(--color-text-secondary);
  line-height: 1.4;
}

.bank-card-actions-ws {
  display: flex;
  gap: var(--spacing-sm);
  flex-shrink: 0;
}

.bank-card-remove-btn-ws {
  padding: var(--spacing-xs) var(--spacing-sm);
  background-color: transparent;
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-md);
  color: var(--color-status-error);
  font-size: 11px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: var(--transition-fast);
  white-space: nowrap;
  outline: none;
  min-height: 36px;
  /* Touch target */
  min-width: 60px;
  box-sizing: border-box;
}

.bank-card-remove-btn-ws:hover {
  background-color: var(--color-status-error-bg);
  border-color: var(--color-status-error);
}

.bank-card-remove-btn-ws:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(211, 47, 47, 0.1);
}

.bank-card-remove-btn-ws:active {
  transform: scale(0.98);
}

.no-cards-message-ws {
  text-align: center;
  padding: var(--spacing-2xl);
  color: var(--color-text-muted);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.5;
}

/* ============================================
   Deposit Methods Grid
   ============================================ */

.deposit-methods-ws {
  margin: var(--spacing-xl) 0px;
}

.deposit-methods-ws .section-title-ts {
  margin-top: 0;
  margin-bottom: var(--spacing-md);
}

.deposit-method-card-ws.is-selected {
  border-color: var(--color-primary-blue);
  background-color: #ffffff;
  box-shadow: 0 0 0 1px rgba(28, 36, 116, 0.1);
  opacity: 1;
}

.deposit-method-card-ws.is-selected::before {
  background-color: var(--color-primary-blue);
}

.deposit-method-card-ws.is-selected:hover {
  border-color: var(--color-primary-blue);
  box-shadow: 0 0 0 1px rgba(28, 36, 116, 0.12);
}

.deposit-method-card-ws.is-selected:hover::before {
  background-color: var(--color-primary-blue);
}

.deposit-method-card-ws.is-unavailable {
  opacity: 0.42;
  pointer-events: none;
  cursor: not-allowed;
  filter: grayscale(0.15);
  transition: none;
}

.deposit-method-card-ws.is-unavailable::before {
  opacity: 0;
}

.deposit-method-card-ws.is-unavailable .deposit-method-card-ws__time-badge {
  background-color: rgba(100, 100, 100, 0.12);
  color: var(--color-text-secondary, #646970);
}

.deposit-method-card-ws.is-unavailable .deposit-method-card-ws__time-icon {
  display: none;
}

.deposit-method-card-ws.is-unavailable .deposit-method-card-ws__time-text {
  white-space: normal;
  text-overflow: unset;
  overflow: visible;
  font-size: 10px;
  font-weight: 600;
}

.deposit-methods-grid-ws:has(.deposit-method-card-ws.is-selected)
  .deposit-method-card-ws:not(.is-selected):not(.is-unavailable) {
  opacity: 0.6;
}

.deposit-methods-grid-ws:has(.deposit-method-card-ws.is-selected)
  .deposit-method-card-ws:not(.is-selected):not(.is-unavailable):hover,
.deposit-methods-grid-ws:has(.deposit-method-card-ws.is-selected)
  .deposit-method-card-ws:not(.is-selected):not(.is-unavailable):focus-visible {
  opacity: 1;
}

.deposit-method-card-ws.is-selected .deposit-method-card-ws__nav-arrow::before {
  transform: translate(-50%, -50%) rotate(0deg);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12' fill='none'%3E%3Cpath d='M2 4L6 8L10 4' stroke='%231c2474' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.deposit-method-rules-ws {
  margin-bottom: var(--spacing-lg);
  padding: var(--spacing-md);
  background-color: rgba(28, 36, 116, 0.04);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-card);
}

/* Native anchor scroll for deposit method selection */
html:has(.ayarka-endpoint-section[data-endpoint="wallet"]:not([hidden])) {
  scroll-behavior: smooth;
  scroll-padding-top: 5.5rem;
}

.deposit-method-rules-scroll-anchor {
  display: block;
  height: 0;
  overflow: hidden;
  scroll-margin-top: 5.5rem;
}

a.deposit-method-card-ws {
  text-decoration: none;
  color: inherit;
}

.deposit-method-rules-ws__body {
  overflow: hidden;
}

.deposit-method-rules-ws__body.is-exiting {
  animation: depositRulesFadeOut 320ms ease forwards;
}

.deposit-method-rules-ws__body.is-entering {
  animation: depositRulesFadeIn 320ms ease forwards;
}

.deposit-method-rules-ws.deposit-method-rules-ws--animating {
  pointer-events: none;
}

@keyframes depositRulesFadeOut {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(-10px);
  }
}

@keyframes depositRulesFadeIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.deposit-method-rules-ws__title {
  margin-top: 0;
  margin-bottom: var(--spacing-sm);
}

.deposit-method-rules-ws__list {
  margin: 0;
  padding: 0 var(--spacing-lg) 0 0;
  list-style: disc;
}

.deposit-method-rules-ws__list li {
  margin-bottom: var(--spacing-sm);
  line-height: 1.7;
  color: var(--color-text-primary);
}

.deposit-method-rules-ws__list li:last-child {
  margin-bottom: 0;
}

.wallet-rules-sections__heading {
  font-size: var(--font-size-base);
  font-weight: 700;
  color: var(--color-text-primary);
  margin: var(--spacing-md) 0 var(--spacing-sm);
  text-align: right;
}

.wallet-rules-sections__heading:first-child {
  margin-top: 0;
}

.wallet-rules-sections .deposit-method-rules-ws__list {
  margin-bottom: var(--spacing-sm);
}

.wallet-rules-sections .deposit-method-rules-ws__list:last-child {
  margin-bottom: 0;
}

.deposit-methods-grid-ws {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--spacing-md);
  align-items: stretch;
}

.deposit-methods-ws .section-title-ts,
.deposit-method-rules-ws .section-title-ts {
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-bold);
  color: var(--color-text-primary);
  text-align: right;
}

.deposit-method-card-ws {
  display: grid;
  grid-template-rows: auto auto 1fr;
  width: 100%;
  height: 100%;
  min-height: 108px;
  margin: 0;
  padding: var(--spacing-md);
  background-color: var(--color-bg-card);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-card);
  cursor: pointer;
  transition: var(--transition-fast);
  font-family: inherit;
  text-align: right;
  box-sizing: border-box;
  appearance: none;
  -webkit-appearance: none;
  gap: 0;
  position: relative;
  overflow: hidden;
}

.deposit-method-card-ws::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 3px;
  height: 100%;
  background-color: transparent;
  transition: var(--transition-fast);
}

.deposit-method-card-ws:hover::before {
  background-color: var(--color-primary-blue);
}

.deposit-method-card-ws--no-time {
  grid-template-rows: auto 1fr;
}

.deposit-method-card-ws:hover {
  border-color: var(--color-primary-blue);
  box-shadow: var(--shadow-input-focus);
}

.deposit-method-card-ws:focus-visible {
  outline: none;
  border-color: var(--color-border-focus);
  box-shadow: var(--shadow-input-focus);
}

.deposit-method-card-ws__row {
  display: flex;
  align-items: center;
  min-width: 0;
  width: 100%;
}

.deposit-method-card-ws__row--head {
  justify-content: flex-start;
  align-items: flex-start;
  gap: var(--spacing-sm);
  padding-bottom: 2px;
}

.deposit-method-card-ws__row--time {
  justify-content: flex-start;
  align-self: start;
  padding-bottom: 2px;
}

.deposit-method-card-ws__row--limit {
  align-self: end;
  margin-top: 0;
  padding-top: 0;
  justify-content: flex-start;
}

.deposit-method-card-ws__limit {
  font-size: 12px;
  font-weight: 500;
  color: var(--color-text-secondary);
  line-height: 1.5;
}

.deposit-method-card-ws__limit--inline {
  display: none;
}

.deposit-method-card-ws__title-group {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: var(--spacing-xs);
  flex: 1;
  min-width: 0;
}

.deposit-method-card-ws__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  margin-top: 1px;
  color: var(--color-text-primary);
}

.deposit-method-card-ws__icon svg {
  width: 22px;
  height: 22px;
}

.deposit-method-card-ws__name {
  flex: 1;
  min-width: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text-primary);
  line-height: 1.45;
  white-space: normal;
  overflow: visible;
  text-overflow: unset;
  word-break: break-word;
  overflow-wrap: anywhere;
}

/* فلش ناوبری */
.deposit-method-card-ws__nav-arrow {
  display: block;
  position: relative;
  flex-shrink: 0;
  width: 20px;
  height: 20px;
}

.deposit-method-card-ws__nav-arrow::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 12px;
  height: 12px;
  transform: translate(-50%, -50%) rotate(90deg);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12' fill='none'%3E%3Cpath d='M2 4L6 8L10 4' stroke='%23666666' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  transition:
    background-image var(--transition-fast),
    transform var(--transition-fast);
}

.deposit-method-card-ws:hover .deposit-method-card-ws__nav-arrow::before,
.deposit-method-card-ws:focus-visible .deposit-method-card-ws__nav-arrow::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12' fill='none'%3E%3Cpath d='M2 4L6 8L10 4' stroke='%231c2474' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

/* غیرفعال: بدون انیمیشن/هاور (بعد از قوانین hover پایه تا specificity برنده شود) */
.deposit-method-card-ws.is-unavailable,
.deposit-method-card-ws.is-unavailable:hover,
.deposit-method-card-ws.is-unavailable:focus,
.deposit-method-card-ws.is-unavailable:focus-visible {
  pointer-events: none;
  cursor: not-allowed;
  transition: none;
  transform: none;
  border-color: var(--color-border-light);
  box-shadow: none;
  opacity: 0.42;
  filter: grayscale(0.15);
}

.deposit-method-card-ws.is-unavailable::before,
.deposit-method-card-ws.is-unavailable:hover::before,
.deposit-method-card-ws.is-unavailable:focus-visible::before {
  background-color: transparent;
  opacity: 0;
  transition: none;
}

.deposit-method-card-ws.is-unavailable .deposit-method-card-ws__nav-arrow::before,
.deposit-method-card-ws.is-unavailable:hover .deposit-method-card-ws__nav-arrow::before,
.deposit-method-card-ws.is-unavailable:focus-visible .deposit-method-card-ws__nav-arrow::before {
  transform: translate(-50%, -50%) rotate(90deg);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12' fill='none'%3E%3Cpath d='M2 4L6 8L10 4' stroke='%23666666' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  transition: none;
}

.deposit-method-card-ws__time-badge {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 6px;
  padding: 4px;
  border-radius: var(--radius-md);
  background-color: rgba(28, 36, 116, 0.08);
  color: var(--color-primary-blue);
  max-width: 100%;
}

.deposit-method-card-ws__time-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--color-primary-blue);
}

.deposit-method-card-ws__time-icon svg {
  width: 14px;
  height: 14px;
}

.deposit-method-card-ws__time-text {
  font-size: 11px;
  font-weight: 600;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.recent-tx-table {
  width: 100%;
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-default);
}

.tx-status-badge {
  padding: 5px 10px;
  border-radius: var(--radius-card);
}

.withdraw-rules-ws__list .status-badge-ws {
  display: inline-flex;
  vertical-align: middle;
  margin: 0 2px;
}

/* Wallet transactions table card */
.wallet-tx-card.requests-table-card {
  background-color: var(--color-bg-card);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-card);
  margin-top: var(--spacing-xl);
  margin-bottom: var(--spacing-xl);
  padding: var(--spacing-xl);
  box-sizing: border-box;
}

.wallet-tx-card .table-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--spacing-md);
}

.wallet-tx-card .tabs-rules-wrapper-ws {
  margin-bottom: var(--spacing-lg);
}

.wallet-tx-card .tabs-rules-wrapper-ws .tab-container-ws {
  margin-bottom: 0;
}

.wallet-tx-card .recent-tx-table-wrap,
.wallet-tx-card .table-wrapper {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.wallet-tx-card .recent-tx-table-wrap.is-empty table,
.wallet-tx-card .table-wrapper.is-empty table {
  display: none;
}

.wallet-tx-card .delivery-requests-table,
.wallet-tx-card .recent-tx-table,
.wallet-tx-card .wallet-tx-table {
  width: 100%;
  min-width: 640px;
  display: table;
  table-layout: auto;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-card);
  overflow: hidden;
  background-color: var(--color-bg-card);
}

.wallet-tx-card .delivery-requests-table thead,
.wallet-tx-card .recent-tx-table thead {
  display: table-header-group;
  background-color: var(--color-bg-card);
}

.wallet-tx-card .delivery-requests-table tbody,
.wallet-tx-card .recent-tx-table tbody {
  display: table-row-group;
}

.wallet-tx-card .delivery-requests-table tr,
.wallet-tx-card .recent-tx-table tr {
  display: table-row;
}

.wallet-tx-card .delivery-requests-table th,
.wallet-tx-card .recent-tx-table th {
  display: table-cell;
  padding: var(--spacing-md) var(--spacing-sm);
  text-align: center;
  font-weight: 600;
  color: var(--color-text-primary);
  border-bottom: 2px solid var(--color-border-light);
  white-space: nowrap;
  font-size: 15px;
  vertical-align: middle;
}

.wallet-tx-card .delivery-requests-table td,
.wallet-tx-card .recent-tx-table td {
  font-size: 13px;
}

.wallet-tx-card .ayarka-tx-date-cell {
  display: inline-flex;
  flex-direction: row-reverse;
  align-items: center;
  justify-content: center;
  gap: 2px;
  white-space: nowrap;
}

.wallet-tx-card .delivery-requests-table td,
.wallet-tx-card .recent-tx-table td {
  display: table-cell;
  padding: var(--spacing-md) var(--spacing-sm);
  text-align: center;
  color: var(--color-text-primary);
  border-bottom: 1px solid var(--color-border-lighter);
  font-variant-numeric: tabular-nums;
  vertical-align: middle;
  font-size: 13px;
  font-weight: var(--font-weight-medium);
}

.wallet-tx-card .delivery-requests-table tbody tr:hover,
.wallet-tx-card .recent-tx-table tbody tr:hover {
  background-color: var(--color-bg-light);
}

.wallet-tx-card .delivery-requests-table tbody tr:last-child td,
.wallet-tx-card .recent-tx-table tbody tr:last-child td {
  border-bottom: none;
}

.wallet-tx-card .empty-state {
  text-align: center;
  padding: 48px var(--spacing-xl);
  color: var(--color-text-muted);
  font-size: 15px;
}

.wallet-tx-card .empty-state p {
  margin: 0;
}

.wallet-tx-card .table-title {
  font-size: var(--font-size-xl);
  font-weight: 700;
  margin: 0;
  color: var(--color-text-primary);
}

.wallet-tx-card .delivery-requests-table td .wallet-tx-cancel-btn {
  background-color: var(--color-bg-light);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-default);
  color: var(--color-error, #d63638);
  cursor: pointer;
  font-family: inherit;
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  min-height: 32px;
  padding: 4px 8px;
  transition: var(--transition-fast);
  white-space: nowrap;
}

.wallet-tx-card .delivery-requests-table td .wallet-tx-cancel-btn:hover {
  background-color: rgba(214, 54, 56, 0.06);
  border-color: var(--color-error, #d63638);
  color: var(--color-error, #d63638);
}

.wallet-tx-card .delivery-requests-table td .wallet-tx-cancel-btn:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

/* Table pagination — aligned with .woocommerce-pagination */
.wallet-tx-card .ayarka-table-pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: var(--spacing-xs);
  margin-top: var(--spacing-2xl);
  padding: var(--spacing-sm) 0;
  width: 100%;
}

.wallet-tx-card .ayarka-table-pagination__btn {
  align-items: center;
  background-color: var(--color-bg-card, #fff);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-default);
  color: var(--color-text-primary);
  cursor: pointer;
  display: inline-flex;
  font-family: inherit;
  font-size: var(--font-size-sm);
  font-variant-numeric: tabular-nums;
  font-weight: var(--font-weight-medium);
  justify-content: center;
  min-width: 40px;
  padding: var(--spacing-sm) var(--spacing-md);
  text-align: center;
  transition: var(--transition-all);
}

.wallet-tx-card .ayarka-table-pagination__btn:hover:not(.is-active) {
  background-color: var(--color-primary-blue);
  border-color: var(--color-primary-blue);
  color: var(--color-text-white);
}

.wallet-tx-card .ayarka-table-pagination__btn.is-active {
  background-color: var(--color-primary-blue);
  border-color: var(--color-primary-blue);
  color: var(--color-text-white);
  cursor: default;
  font-weight: var(--font-weight-semibold);
}

.wallet-tx-card .ayarka-table-pagination__ellipsis {
  color: var(--color-text-secondary);
  font-family: inherit;
  font-size: var(--font-size-sm);
  padding: 0 var(--spacing-xs);
}

@media (max-width: 1024px) {
  .recent-tx-table-wrap {
    overflow-x: auto;
  }
}
/* Deposit method cards — tablet/desktop (mobile-first base above) */
@media (min-width: 769px) {
  .deposit-method-card-ws__row--head {
    justify-content: space-between;
    align-items: center;
  }

  .deposit-method-card-ws__title-group {
    align-items: center;
  }

  .deposit-method-card-ws__icon {
    margin-top: 0;
  }

  .deposit-method-card-ws__name {
    flex: initial;
    line-height: 1.4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    word-break: normal;
    overflow-wrap: normal;
  }

  .deposit-method-card-ws__time-badge {
    padding: 4px 10px;
    border-radius: var(--radius-default);
  }
}

/* ============================================
   TABLET ENHANCEMENT (579px+)
   ============================================ */

@media (min-width: 579px) {
  .max-amount-btn-ws::before {
    content: attr(data-desktop-text);
    font-size: 14px;
  }

  .section-title-ws {
    font-size: var(--font-size-h3);
  }
  .amount-input-ws {
    padding: 12px var(--spacing-md);
  }

  .page-container-ws {
    width: 100%;
    margin: 0 auto;
    /* padding: var(--spacing-lg); */
  }

  .deposit-methods-grid-ws {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  /* .page-container styles are now in global.css */

  /* Show selected badge on tablet and desktop */
  .bank-card-selected-badge-ws {
    display: inline-block;
  }

  .transaction-section-ws {
    padding: var(--spacing-4xl);
    margin-bottom: var(--spacing-2xl);
    border: 1px solid #e0e3e5;
    margin: 12px;
  }
  #walletTxWithdrawPane {
    margin: 12px;
  }

  /* Tabs - Tablet: Fixed Width */
  .tab-container-ws {
    width: fit-content;
  }

  .indicator-ws {
    width: 120px;
  }

  .tab-ws {
    width: 120px;
  }

  .tab-ws--2 {
    right: calc(120px + 2px);
  }

  .tab_label-ws {
    width: 120px;
    font-size: 15px;
  }

  .tab-ws--2:checked ~ .indicator-ws {
    right: calc(120px + 2px);
  }

  .tabs-rules-wrapper .tab-container-ws {
    margin-bottom: 0;
  }

  /* Rules Link - Tablet: Auto Width */
  .rules-link-ws {
    padding: var(--spacing-sm) var(--spacing-md);
    font-size: 15px;
  }

  /* Rules text responsive styles are now in global.css */

  .input-label-ws {
    font-size: 14px;
  }

  .amount-input,
  .card-input {
    padding: 13px var(--spacing-lg);
    font-size: 15px;
  }

  #depositAmount-ws {
    padding-left: 65px;
  }

  .amount-currency-ws {
    font-size: 15px;
    left: var(--spacing-lg);
  }

  .max-amount-btn-ws {
    width: auto;
    padding: 13px var(--spacing-lg);
  }

  .max-amount-btn-ws::before {
    font-size: 14px;
  }

  /* Form Row - Tablet: Row */
  .form-row-ws {
    flex-direction: row;
    align-items: flex-end;
    gap: var(--spacing-md);
  }

  .form-actions-ws {
    flex-direction: row;
  }

  .add-card-btn-ws {
    width: auto;
    font-size: 14px;
  }

  .deposit-btn,
  .withdraw-btn {
    width: auto;
    flex: 1;
    font-size: 16px;
  }

  /* Modal responsive styles are now in global.css */

  .transactions-table-ws {
    font-size: 14px;
  }

  .transactions-table-ws th {
    padding: var(--spacing-lg) var(--spacing-md);
    font-size: 14px;
  }

  .transactions-table-ws td {
    padding: var(--spacing-lg) var(--spacing-md);
    font-size: 14px;
    height: 55px;
  }

  .status-badge-ws {
    padding: 4px 11px;
    font-size: 13px;
  }

  .empty-state-ws {
    padding: 50px var(--spacing-xl);
    font-size: 15px;
  }

  .error-message-ws {
    font-size: 12px;
  }

  .bank-cards-header-ws {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: var(--spacing-md);
  }

  .bank-cards-title-ws {
    font-size: 17px;
    flex: 1;
    min-width: 0;
  }

  .bank-card-item-ws {
    flex-direction: row;
    align-items: center;
    padding: var(--spacing-lg);
  }

  .bank-card-icon-ws {
    width: 44px;
    height: 44px;
  }

  .bank-card-number-ws {
    font-size: 14px;
  }

  .bank-card-name-ws {
    font-size: 12px;
  }

  .bank-card-actions-ws {
    width: auto;
    margin-top: 0;
  }

  .bank-card-remove-btn-ws {
    width: auto;
    padding: var(--spacing-sm) var(--spacing-md);
    font-size: 12px;
  }
}

/* ============================================
   DESKTOP ENHANCEMENT (1024px+)
   ============================================ */

@media (min-width: 1024px) {
  /* .page-container styles are now in global.css */

  .deposit-methods-grid-ws {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--spacing-lg);
  }

  .deposit-method-card-ws {
    padding: var(--spacing-lg);
    grid-template-rows: minmax(40px, auto) minmax(28px, auto);
    min-height: 88px;
  }

  .deposit-method-card-ws--no-time {
    grid-template-rows: minmax(44px, auto);
    min-height: 64px;
  }

  .deposit-method-card-ws__row--limit {
    display: none;
  }

  .deposit-method-card-ws__row--head {
    padding-bottom: 0;
  }

  .deposit-method-card-ws__limit--inline {
    display: inline;
    margin-inline-start: var(--spacing-sm);
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
    flex: 1 1 auto;
  }

  .deposit-method-card-ws__name {
    font-size: 15px;
    flex-shrink: 0;
  }

  .deposit-method-card-ws__time-text {
    font-size: 12px;
  }

  .transaction-section {
    padding: var(--spacing-3xl);
  }

  .tab_label-ws {
    font-size: 16px;
  }

  .rules-link-ws {
    font-size: 16px;
  }

  /* Rules text responsive styles are now in global.css */

  .input-label-ws {
    font-size: 14px;
  }

  .amount-input,
  .card-input {
    padding: 14px 18px;
    font-size: 16px;
  }

  #depositAmount-ws {
    padding-left: 70px;
  }

  .amount-currency-ws {
    font-size: 16px;
    left: 18px;
  }

  .max-amount-btn-ws {
    padding: 13px 20px;
    font-size: 14px;
  }

  .add-card-btn-ws {
    font-size: 14px;
  }

  .deposit-btn,
  .withdraw-btn {
    font-size: 16px;
  }

  /* Modal responsive styles are now in global.css */

  .transactions-table-ws {
    font-size: 14px;
  }

  .transactions-table-ws th {
    padding: 16px var(--spacing-lg);
    font-size: 14px;
  }

  .transactions-table-ws td {
    padding: 16px var(--spacing-lg);
    font-size: 14px;
    height: 60px;
  }

  .status-badge-ws {
    padding: 4px 12px;
    font-size: 12px;
  }

  .empty-state-ws {
    padding: 60px var(--spacing-xl);
    font-size: 16px;
  }

  .error-message-ws {
    font-size: 12px;
  }

  .bank-cards-title-ws {
    font-size: 18px;
  }

  .bank-card-icon-ws {
    width: 48px;
    height: 48px;
  }

  .bank-card-number-ws {
    font-size: var(--font-size-bank-card-number);
  }

  .bank-card-name-ws {
    font-size: var(--font-size-bank-card-name);
  }
}
