.wcbccard-fields {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 480px;
}

.wcbccard-secure-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 8px;
  padding: 8px 12px;
  margin-bottom: 0;
  font-size: 13px;
  font-weight: 600;
  color: #166534;
  line-height: 1.4;
}

.wcbccard-secure-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: #22c55e;
}

.wcbccard-fields .form-row {
  margin-bottom: 0 !important;
}

.wcbccard-fields label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: #1a1a2e;
  margin-bottom: 4px;
}

.wcbccard-fields .input-text,
.wcbccard-fields select {
  width: 100%;
  height: 44px;
  padding: 0 12px;
  border: 1.5px solid #d1d5db;
  border-radius: 8px;
  font-size: 14px;
  color: #1a1a2e;
  background: #fff;
  transition: border-color .2s, box-shadow .2s;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

.wcbccard-fields .input-text:focus,
.wcbccard-fields select:focus {
  border-color: var(--obp-green, #25d366);
  box-shadow: 0 0 0 3px rgba(37, 211, 102, .15);
}

.wcbccard-fields .input-text::placeholder {
  color: #9ca3af;
  font-weight: 400;
}

/* ── Card preview ────────────────────────────── */
.wcbccard-card-frame {
  display: flex;
  justify-content: center;
}

.wcbccard-card-preview {
  width: 100%;
  max-width: 340px;
  aspect-ratio: 1.586 / 1;
  border-radius: 12px;
  background: linear-gradient(135deg, #1a1a2e 0%, #2d2b55 50%, #1a1a2e 100%);
  color: #fff;
  padding: 20px;
  padding-top: 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .18);
  font-family: 'Courier New', Courier, monospace;
}

.wcbccard-card-preview::before {
  content: '';
  position: absolute;
  top: -30%;
  right: -20%;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .06);
}

.wcbccard-card-preview__brand {
  position: absolute;
  top: 12px;
  right: 16px;
  width: 40px;
  height: 26px;
}

.wcbccard-card-preview__brand svg {
  width: 100%;
  height: 100%;
  border-radius: 4px;
}

.wcbccard-card-preview__number {
  font-size: 15px;
  letter-spacing: 2px;
  line-height: 1;
  margin-top: auto;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .3);
  padding-top: 18px;
}

.wcbccard-card-preview__bottom {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-top: 12px;
}

.wcbccard-card-preview__name {
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wcbccard-card-preview__expiry {
  font-size: 12px;
  letter-spacing: 1px;
}

/* ── Input with brand icon ────────────────────── */
.wcbccard-number-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.wcbccard-number-wrap .input-text {
  padding-right: 40px !important;
}

.wcbccard-brand-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 22px;
  flex-shrink: 0;
  border-radius: 3px;
  overflow: hidden;
  vertical-align: middle;
}

.wcbccard-brand-icon:empty {
  display: none;
}

.wcbccard-brand-icon svg {
  width: 100%;
  height: 100%;
  border-radius: 3px;
}

.wcbccard-number-status {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  z-index: 2;
  pointer-events: none;
  display: none;
  border-radius: 50%;
  font-size: 12px;
  line-height: 18px;
  text-align: center;
  font-weight: 700;
}

.wcbccard-number-status--valid {
  display: block;
  background: #22c55e;
  color: #fff;
}

.wcbccard-number-status--valid::after {
  content: '\2713';
}

.wcbccard-number-status--invalid {
  display: block;
  background: #ef4444;
  color: #fff;
}

.wcbccard-number-status--invalid::after {
  content: '\2717';
}

.wcbccard-fields .input-text.wcbccard-error {
  border-color: #ef4444 !important;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, .15) !important;
}

.wcbccard-fields .input-text.wcbccard-valid {
  border-color: #22c55e !important;
}

/* ── Field groups ────────────────────────────── */
.wcbccard-field-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.wcbccard-field-group--row {
  flex-direction: row;
  gap: 12px;
}

.wcbccard-field-group--row .form-row-first,
.wcbccard-field-group--row .form-row-last {
  flex: 1;
}

.wcbccard-row {
  display: flex;
  gap: 12px;
}

.wcbccard-row .form-row-first,
.wcbccard-row .form-row-last {
  flex: 1;
  float: none !important;
  width: auto !important;
}

.wcbccard-row::after {
  content: '';
  display: table;
  clear: both;
}

.form-row-first { float: left; width: 48%; }
.form-row-last { float: right; width: 48%; }

/* ── Feedback ────────────────────────────────── */
.wcbccard-feedback {
  font-size: 13px;
  font-weight: 600;
  color: #0d1b4b;
  min-height: 20px;
}

/* ── Installments (product page) ─────────────── */
.wcbccard-single-installments,
.wcbccard-loop-installments {
  color: #0d1b4b;
  font-size: 13px;
  font-weight: 600;
  margin-top: 8px;
}

.wcbccard-help-box {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

/* ── Mobile responsive ────────────────────────── */
@media (max-width: 480px) {
  .wcbccard-card-preview {
    padding: 16px;
    border-radius: 10px;
  }
  .wcbccard-card-preview__number {
    font-size: 13px;
    letter-spacing: 1.5px;
    padding-top: 14px;
  }
  .wcbccard-card-preview__name {
    font-size: 10px;
    max-width: 130px;
  }
  .wcbccard-card-preview__expiry {
    font-size: 11px;
  }
  .wcbccard-card-preview__brand {
    width: 36px;
    height: 24px;
    top: 12px;
    right: 14px;
  }
  .wcbccard-fields .input-text,
  .wcbccard-fields select {
    height: 42px;
    font-size: 16px;
  }
  .form-row-first,
  .form-row-last {
    float: none;
    width: 100%;
  }
  .wcbccard-field-group--row {
    flex-direction: column;
    gap: 0;
  }

  .wcbccard-row {
    flex-direction: column;
    gap: 0;
  }

  .wcbccard-row .form-row-first,
  .wcbccard-row .form-row-last {
    width: 100% !important;
  }

  .wcbccard-secure-badge {
    font-size: 12px;
    padding: 6px 10px;
  }
}