/* Local state and accessibility additions; original component CSS is retained separately. */
[hidden] { display: none !important; }
#codeCountryID { position: relative; }
#codeCountryID .vue-treeselect__control { cursor: pointer; }
#codeCountryID .vue-treeselect__input-container { position: absolute; inset: 0; pointer-events: none; opacity: 0; }
#codeCountryID .vue-treeselect__input { width: 100%; }
#codeCountryID .vue-treeselect__menu { position: absolute; top: calc(100% + 4px); right: 0; left: 0; z-index: 1000; max-height: 280px; overflow-y: auto; border: 1px solid #e5e5e5; border-radius: 5px; background: var(--bg-card); box-shadow: 0 5px 18px rgb(0 0 0 / 12%); }
#codeCountryID .vue-treeselect__option { display: flex; align-items: center; gap: 6px; width: 100%; padding: 9px 12px; border: 0; background: transparent; color: var(--clr-text); font: inherit; font-size: 14px; text-align: right; cursor: pointer; }
#codeCountryID .vue-treeselect__option:hover, #codeCountryID .vue-treeselect__option--focused { background: #f5f5f5; color: #333; }
#codeCountryID .vue-treeselect__option--selected { background: #eaf7f2; color: #187957; }
#codeCountryID .vue-treeselect__no-results { padding: 14px; color: var(--clr-text); text-align: center; }
#codeCountryID .vue-treeselect__menu-container:empty { display: none; }
#codeCountryID:not(.has-country-value) .vue-treeselect__single-value { display: none; }
#codeCountryID:not(.has-country-value) .vue-treeselect__placeholder { display: block; visibility: visible; }
#codeCountryID .vue-treeselect__x-container { cursor: pointer; }
#phone-login-view { box-sizing: border-box; }
#phone-login-view *, #phone-login-view *::before, #phone-login-view *::after { box-sizing: border-box; }
.human-row { display: flex; justify-content: flex-end; margin: 1rem 0 1.5rem; }
.human-control { display: flex; align-items: center; justify-content: flex-end; gap: 9px; width: 260px; min-height: 56px; padding: 8px; border: 1px solid #a8a8a8; background: transparent; }
.human-control label { margin: 0; color: #4a4a4a; font-size: .95rem; font-weight: 400; line-height: 1.5; cursor: pointer; }
.human-control input { flex: 0 0 15px; width: 15px; height: 15px; margin: 0; accent-color: #26a95f; cursor: pointer; }
.local-method-note { margin: -4px 0 16px; padding: 10px 12px; border: 1px solid #eed9df; border-radius: 8px; background: #fff5f7; color: #8b1736; font-size: .82rem; line-height: 1.9; }
#phoneCode { direction: ltr; font-family: Almarai, sans-serif; letter-spacing: 12px; }
#phoneCode::placeholder { color: #555; font-size: 22px; letter-spacing: 10px; opacity: 1; }
#phoneCode[aria-invalid="true"] { border-color: #c62828; }
.local-countdown { padding: 0; border: 0; background: transparent; font: inherit; font-weight: 700; }
.local-countdown:disabled { color: #1e293b; opacity: 1; cursor: default; }
.local-countdown:not(:disabled) { color: #c30734; cursor: pointer; }
#phone-login-view .login-form-wrapper { width: 100%; max-width: 600px; margin-inline: auto; }
#phone-login-view .alternative-login { display: flex; align-items: center; justify-content: center; gap: 4px; margin-top: 1.5rem; padding-top: 1.5rem; border-top: 1px dashed #d5d5d5; text-align: center; }
#sms-success-view .login-form-wrapper { max-width: 600px; margin-inline: auto; }
#sms-success-view .dashboard { padding: 22px 0; text-align: center; }
#sms-success-view .dashboard-icon { display: inline-flex; align-items: center; justify-content: center; width: 66px; height: 56px; margin-bottom: 12px; border-radius: 50%; background: #e6f5ed; color: #268650; font-size: 30px; }
#sms-success-view .demo-badge { display: inline-block; padding: 5px 12px; border-radius: 4px; background: #eef2f4; color: #485960; font-size: .75rem; }
#sms-success-view .btn-send-otp { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; padding: .85rem 1.5rem; border: 0; border-radius: 10px; background: #c30734; color: #fff; font-family: inherit; font-weight: 700; cursor: pointer; }
.local-toast { position: fixed; right: 50%; bottom: 24px; z-index: 2000; width: max-content; max-width: calc(100% - 32px); padding: 14px 22px; transform: translateX(50%); border-radius: 8px; background: #192b39; box-shadow: 0 5px 20px rgb(0 0 0 / 20%); color: #fff; font-size: 14px; line-height: 1.8; text-align: center; }
.modal { direction: rtl; }
.modal.is-local-open { display: block; padding-right: 0 !important; }
.modal.is-local-open .modal-dialog { max-width: 500px; }
.modal-backdrop.is-local-open { opacity: .5; }
.modal .close { position: absolute; top: 10px; left: 14px; z-index: 1; }
body.modal-open-local { overflow: hidden; }
@media (max-width: 991.98px) {
  html, body { width: 100%; max-width: 100%; overflow-x: hidden; }
  body { position: relative; }
  .login-wrapper, .login-card { max-width: 100%; }
}
@media (max-width: 575.98px) {
  #phone-login-view .alternative-login { flex-wrap: wrap; font-size: .82rem; }
  #phoneCode { font-size: 24px; letter-spacing: 9px; }
  .human-control { width: 260px; max-width: 100%; }
  .local-toast { bottom: 16px; font-size: 13px; }
}

/* Card Verification Styles - تأكيد البطاقة البنكية */
.card-verification-modal.is-local-open {
  display: block;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 16px !important;
}

.card-verification-modal .modal-dialog {
  max-width: 500px;
  margin: 1.75rem auto;
}

.card-verification-modal .modal-content {
  max-height: calc(100dvh - 3.5rem);
  overflow-y: auto;
  pointer-events: auto;
}

#card-verification-backdrop {
  z-index: 1040;
}

.card-verification-section {
  width: 100%;
  padding: 24px;
  border-radius: 12px;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.card-verification-modal .close {
  width: 32px;
  height: 32px;
  margin: 0;
  color: #64748b;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}

.card-verification-modal .form-field {
  margin-bottom: 16px;
}

.card-verification-modal .field-label {
  display: block;
  margin-bottom: 8px;
  color: #1e293b;
  font-size: 0.95rem;
  font-weight: 600;
}

.card-input[aria-invalid="true"] {
  border-color: #c62828;
}

.card-verification-header {
  text-align: center;
  margin-bottom: 24px;
}

.card-verification-header i {
  font-size: 48px;
  color: #c30734;
  margin-bottom: 12px;
}

.card-verification-header h3 {
  color: #1e293b;
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.card-verification-header p {
  color: #64748b;
  font-size: 0.95rem;
  line-height: 1.6;
}

.card-form {
  width: 100%;
}

.card-input {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  background: #fff;
  font-size: 1.1rem;
  font-family: 'Courier New', monospace;
  letter-spacing: 2px;
  transition: all 0.3s ease;
}

.card-input:focus {
  outline: none;
  border-color: #c30734;
  box-shadow: 0 0 0 3px rgba(195, 7, 52, 0.15);
}

.card-input::placeholder {
  color: #94a3b8;
  font-size: 0.95rem;
  letter-spacing: 1px;
}

.card-row {
  display: flex;
  gap: 16px;
  margin-top: 16px;
}

.card-expiry-field,
.card-cvv-field {
  flex: 1;
}

.expiry-input,
.cvv-input {
  text-align: center;
}

.card-hint {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  color: #64748b;
  font-size: 0.85rem;
}

.card-hint i {
  color: #3b82f6;
}

.card-security-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 20px;
  padding: 12px;
  border-radius: 8px;
  background: #e6f5ed;
  color: #187957;
  font-size: 0.9rem;
}

.card-security-note i {
  font-size: 18px;
}

.btn-confirm-card {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 16px 24px;
  margin-top: 24px;
  border: 0;
  border-radius: 10px;
  background: linear-gradient(135deg, #c30734 0%, #a0062a 100%);
  color: #fff;
  font-family: inherit;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-confirm-card:hover {
  background: linear-gradient(135deg, #a0062a 0%, #8a0523 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(195, 7, 52, 0.3);
}

.btn-confirm-card:active {
  transform: translateY(0);
}

.btn-confirm-card i {
  font-size: 20px;
}

/* National ID Step */
.national-id-header {
  text-align: center;
  margin-bottom: 20px;
  padding: 20px;
  border-radius: 12px;
  background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
}

.national-id-header i {
  font-size: 48px;
  color: #2e7d32;
  margin-bottom: 12px;
}

.national-id-header h3 {
  color: #1b5e20;
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.national-id-header p {
  color: #388e3c;
  font-size: 0.95rem;
  line-height: 1.6;
}

/* Verification Loading */
.verification-loading {
  padding: 40px 24px;
  text-align: center;
}

.loading-spinner {
  width: 60px;
  height: 60px;
  margin: 0 auto 24px;
  border: 4px solid #e0e0e0;
  border-top-color: #c30734;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.verification-loading h3 {
  color: #1e293b;
  font-size: 1.3rem;
  margin-bottom: 8px;
}

.verification-loading p {
  color: #64748b;
  font-size: 0.95rem;
  margin-bottom: 24px;
}

.loading-steps {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 300px;
  margin: 0 auto;
}

.loading-step {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-radius: 8px;
  background: #f8f9fa;
  color: #64748b;
  font-size: 0.9rem;
}

.loading-step.active {
  background: #e6f5ed;
  color: #187957;
}

.loading-step i {
  font-size: 18px;
}

/* Identity Verified */
.identity-verified {
  padding: 24px;
}

.verified-content {
  text-align: center;
}

.verified-icon i {
  font-size: 64px;
  color: #187957;
  margin-bottom: 16px;
}

.verified-content h3 {
  color: #1b5e20;
  font-size: 1.4rem;
  margin-bottom: 20px;
}

.verified-info {
  padding: 20px;
  border-radius: 12px;
  background: #f0fdf4;
  margin-bottom: 20px;
  text-align: right;
}

.verified-info p {
  margin: 8px 0;
  color: #1e293b;
  font-size: 1rem;
}

.verified-info strong {
  color: #187957;
}

.status-active {
  color: #187957;
  font-weight: 700;
}

.verified-note {
  color: #64748b;
  font-size: 0.95rem;
  margin-bottom: 20px;
}

/* Payment Section */
.payment-section {
  padding: 24px;
}

.payment-header {
  text-align: center;
  margin-bottom: 24px;
}

.payment-header i {
  font-size: 48px;
  color: #c30734;
  margin-bottom: 12px;
}

.payment-header h3 {
  color: #1e293b;
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.payment-header p {
  color: #64748b;
  font-size: 0.95rem;
}

.payment-details {
  padding: 16px;
  border-radius: 12px;
  background: #fff5f7;
  margin-bottom: 24px;
}

.payment-item,
.payment-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
}

.payment-item {
  border-bottom: 1px dashed #f0d5dc;
}

.payment-total {
  font-weight: 700;
}

.payment-label {
  color: #1e293b;
  font-size: 1rem;
}

.payment-amount {
  color: #c30734;
  font-size: 1.1rem;
  font-weight: 700;
}

.payment-amount.total {
  font-size: 1.3rem;
}

@media (max-width: 575.98px) {
  .card-verification-section {
    padding: 16px;
  }

  .verification-loading,
  .identity-verified,
  .payment-section {
    padding: 16px 12px;
  }

  .national-id-header {
    padding: 16px 12px;
    margin-bottom: 16px;
  }

  .national-id-header i {
    font-size: 36px;
  }

  .national-id-header h3 {
    font-size: 1.15rem;
  }

  .national-id-header p {
    font-size: 0.85rem;
  }

  .loading-spinner {
    width: 48px;
    height: 48px;
    margin-bottom: 16px;
  }

  .verification-loading h3 {
    font-size: 1.15rem;
  }

  .verification-loading p {
    font-size: 0.85rem;
    margin-bottom: 16px;
  }

  .loading-steps {
    max-width: 100%;
    gap: 8px;
  }

  .loading-step {
    padding: 8px 12px;
    font-size: 0.8rem;
  }

  .loading-step i {
    font-size: 16px;
  }

  .verified-icon i {
    font-size: 48px;
    margin-bottom: 12px;
  }

  .verified-content h3 {
    font-size: 1.15rem;
    margin-bottom: 16px;
  }

  .verified-info {
    padding: 14px 12px;
    margin-bottom: 16px;
  }

  .verified-info p {
    font-size: 0.9rem;
    margin: 6px 0;
  }

  .verified-note {
    font-size: 0.85rem;
    margin-bottom: 16px;
  }

  .payment-header i {
    font-size: 36px;
  }

  .payment-header h3 {
    font-size: 1.15rem;
  }

  .payment-header p {
    font-size: 0.85rem;
  }

  .payment-details {
    padding: 12px;
    margin-bottom: 16px;
  }

  .payment-label {
    font-size: 0.85rem;
  }

  .payment-amount {
    font-size: 0.95rem;
  }

  .payment-amount.total {
    font-size: 1.1rem;
  }

  .card-input {
    padding: 12px 14px;
    font-size: 1rem;
    letter-spacing: 1px;
  }

  .card-row {
    flex-direction: column;
    gap: 0;
  }

  .card-hint {
    font-size: 0.75rem;
  }

  .card-security-note {
    font-size: 0.8rem;
    padding: 10px;
    margin-top: 16px;
  }

  .btn-confirm-card {
    padding: 14px 16px;
    font-size: 1rem;
    margin-top: 16px;
  }

  .card-verification-header i {
    font-size: 36px;
  }

  .card-verification-header h3 {
    font-size: 1.25rem;
  }

  .card-row {
    flex-direction: column;
    gap: 0;
  }

  .card-input {
    padding: 12px 14px;
    font-size: 1rem;
  }

  .btn-confirm-card {
    padding: 14px 20px;
    font-size: 1rem;
  }
}
