﻿.ds-cards-wrap,
.ds-card-add-wrap {
  width: 100%;
}

.ds-cards-head,
.ds-card-add-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.ds-cards-title {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: #222;
}

.ds-cards-add-btn,
.ds-cards-back-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid #f2c6d8;
  color: #1b8772;
  background: #fff;
  text-decoration: none;
  font-weight: 600;
}

.ds-cards-add-btn:hover,
.ds-cards-back-btn:hover {
  border-color: #1b8772;
}

.ds-cards-empty,
.ds-cards-msg {
  padding: 16px;
  border: 1px solid #eee;
  border-radius: 12px;
  background: #fafafa;
  color: #444;
}

.ds-cards-wrap .woocommerce-message,
.ds-cards-wrap .woocommerce-info,
.ds-cards-wrap .woocommerce-error,
.ds-card-add-wrap .woocommerce-message,
.ds-card-add-wrap .woocommerce-info,
.ds-card-add-wrap .woocommerce-error,
.ds-sub-payment-wrap .woocommerce-message,
.ds-sub-payment-wrap .woocommerce-info,
.ds-sub-payment-wrap .woocommerce-error {
  margin: 20px 0;
  padding: 14px 46px 14px 16px;
  border: 1px solid #b7e6c6;
  border-left: 4px solid #46b46f;
  border-radius: 12px;
  background: #eaf8ef;
  color: #1f6b4f;
  position: relative;
  list-style: none;
}

.ds-cards-wrap .woocommerce-error,
.ds-card-add-wrap .woocommerce-error,
.ds-sub-payment-wrap .woocommerce-error {
  border-color: #f2c6d8;
  border-left-color: #1b8772;
  background: #fff1f7;
  color: #8a1f4a;
}

.ds-cards-wrap .woocommerce-message a,
.ds-cards-wrap .woocommerce-info a,
.ds-cards-wrap .woocommerce-error a,
.ds-card-add-wrap .woocommerce-message a,
.ds-card-add-wrap .woocommerce-info a,
.ds-card-add-wrap .woocommerce-error a,
.ds-sub-payment-wrap .woocommerce-message a,
.ds-sub-payment-wrap .woocommerce-info a,
.ds-sub-payment-wrap .woocommerce-error a {
  color: #1a7f55;
  font-weight: 600;
  text-decoration: underline;
}

.ds-cards-wrap .woocommerce-error a,
.ds-card-add-wrap .woocommerce-error a,
.ds-sub-payment-wrap .woocommerce-error a {
  color: #b02262;
}

.ds-cards-wrap .woocommerce-message li,
.ds-cards-wrap .woocommerce-info li,
.ds-cards-wrap .woocommerce-error li,
.ds-card-add-wrap .woocommerce-message li,
.ds-card-add-wrap .woocommerce-info li,
.ds-card-add-wrap .woocommerce-error li,
.ds-sub-payment-wrap .woocommerce-message li,
.ds-sub-payment-wrap .woocommerce-info li,
.ds-sub-payment-wrap .woocommerce-error li {
  margin: 0;
}

.ds-notice-close {
  position: absolute;
  top: 8px;
  right: 10px;
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  opacity: 0.65;
  padding: 0;
}

.ds-notice-close:hover {
  opacity: 1;
}

.ds-cards-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.ds-card-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border: 1px solid #f2c6d8;
  border-radius: 22px;
  padding: 16px 18px;
  background: #fff;
}

.ds-card-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.woocommerce-message:focus-visible {
  outline: none;
}

.ds-card-brand {
  min-width: 72px;
  min-height: 48px;
  border-radius: 10px;
  padding: 0px 8px;
  border: 1px solid #eceef2;
  background: #f6f7fa;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  color: #2f3f8f;
  text-transform: uppercase;
}

.ds-brand-mastercard {
  color: #f26a1b;
}

.ds-brand-amex {
  color: #1173c6;
}

.ds-card-meta {
  min-width: 0;
}

.ds-card-line1 {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  line-height: 1.3;
}

.ds-card-line1 strong {
  font-size: 18px;
  color: #2a2a2a;
}

.ds-card-badge-default {
  background: #ffe7f2;
  color: #1b8772;
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 700;
}

.ds-card-line2 {
  margin-top: 4px;
  color: #6f7988;
  font-size: 14px;
}

.ds-card-line2 .dot {
  margin: 0 8px;
}

.ds-card-right {
  display: flex;
  align-items: center;
  gap: 18px;
}

.ds-card-default-col {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-right: 18px;
  border-right: 1px solid #eceef2;
}

.ds-card-default-label {
  font-size: 14px;
  color: #596273;
  font-weight: 600;
}

.ds-card-default-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid #f2c6d8;
  background: #fff;
  color: #1b8772;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
}

.ds-card-default-btn:hover {
  border-color: #1b8772;
}

.ds-card-default-current {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid #f0f2f6;
  background: #f7f8fb;
  color: #7a8595;
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
}

.ds-card-switch {
  width: 52px;
  height: 30px;
  border-radius: 999px;
  background: #d8dbe2;
  display: inline-flex;
  align-items: center;
  padding: 3px;
  text-decoration: none;
}

.ds-card-switch .ds-card-switch-dot {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.2s ease;
}

.ds-card-switch.is-on {
  background: #1b8772;
}

.ds-card-switch.is-on .ds-card-switch-dot {
  transform: translateX(22px);
}

.ds-card-switch.is-disabled {
  opacity: 0.6;
}

.ds-card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ds-card-action-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid #d9dee7;
  background: #fff;
  color: #5a6372;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-size: 16px;
  padding: 0;
}

.ds-card-action-btn svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.ds-card-action-btn:hover {
  border-color: #1b8772;
  color: #1b8772;
}

.ds-card-action-btn.is-disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.ds-card-add-subtitle {
  margin: 0 0 16px;
  color: #666;
}

/* Hard hide any legacy header block that might still exist in cached templates. */
.ds-card-add-head,
.ds-card-add-subtitle {
  display: none !important;
}

.ds-card-add-form #add_payment_method {
  border: 1px solid #f2c6d8;
  border-radius: 18px;
  padding: 18px;
  background: #fff;
}

.ds-card-add-form .woocommerce-PaymentMethods {
  margin: 0;
  padding: 0;
  list-style: none;
}

.ds-card-add-form .woocommerce-PaymentMethods li {
  border: 1px solid #eceef2;
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 10px;
}

.ds-card-add-form .woocommerce-SavedPaymentMethods-saveNew {
  display: none !important;
}

.ds-card-add-extra {
  margin: 10px 0 14px;
  display: flex;
  align-items: center;
}

.ds-card-add-default-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  color: #333;
}

.ds-sub-payment-wrap {
  width: 100%;
  background: #fff;
  border: 1px solid #f2c6d8;
  border-radius: 12px;
  padding: 14px;
}

.ds-sub-payment-current,
.ds-sub-payment-none {
  margin: 0 0 12px;
  color: #3f4652;
  font-size: 14px;
  line-height: 1.4;
}

.ds-sub-payment-set-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 8px 16px;
  border: 1px solid #1b8772;
  border-radius: 10px;
  background: #1b8772;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.ds-sub-payment-set-btn:hover {
  opacity: 0.9;
}

.ds-sub-payment-modal[hidden] {
  display: none !important;
}

.ds-sub-payment-modal {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.ds-sub-payment-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
}

.ds-sub-payment-modal-dialog {
  position: relative;
  width: min(560px, 100%);
  max-height: calc(100vh - 32px);
  overflow: auto;
  background: #fff;
  border-radius: 14px;
  border: 1px solid #f2c6d8;
  padding: 18px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
}

.ds-sub-payment-modal-close {
  position: absolute;
  top: 8px;
  right: 8px;
  border: 0;
  background: transparent;
  color: #6f7988;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.ds-sub-payment-modal-title {
  margin: 0 0 14px;
  font-size: 18px;
  font-weight: 700;
  color: #222;
}

.ds-sub-payment-modal-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ds-sub-payment-modal-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid #eceef2;
  border-radius: 10px;
  padding: 10px 12px;
}

.ds-sub-payment-modal-item.is-current {
  border-color: #f2c6d8;
  background: #fff7fb;
}

.ds-sub-payment-modal-item-label {
  font-size: 14px;
  color: #303947;
}

.ds-sub-payment-current-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid #f0f2f6;
  background: #f7f8fb;
  color: #697386;
  font-size: 12px;
  font-weight: 600;
}

.ds-sub-payment-apply-btn,
.ds-sub-payment-add-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid #1b8772;
  background: #1b8772;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

.ds-sub-payment-apply-btn:hover,
.ds-sub-payment-add-btn:hover {
  opacity: 0.9;
}

.ds-sub-payment-add-btn {
  margin-top: 14px;
}

body.ds-sub-payment-modal-open {
  overflow: hidden;
}

@media (max-width: 960px) {
  .ds-card-item {
    flex-direction: column;
    align-items: flex-start;
  }

  .ds-card-right {
    width: 100%;
    justify-content: space-between;
  }

  .ds-card-default-col {
    border-right: 0;
    padding-right: 0;
  }
}

@media (max-width: 640px) {
  .ds-cards-head,
  .ds-card-add-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .ds-card-brand {
    min-width: 64px;
    min-height: 42px;
    font-size: 13px;
    padding: 0px 5px !important;
  }

  .ds-card-line1 strong {
    font-size: 18px;
  }

  .ds-card-line2 {
    font-size: 14px;
  }

  .ds-card-default-label {
    font-size: 14px;
  }
}

