
/*
 * WooCommerce checkout error notices are hidden by default so the internal
 * "CFP_PP_REQUIRED::{...}" marker text can never paint on screen, even for
 * a single frame, while the JS below decides what to do with it. partial-payment.js
 * immediately (synchronously, before the next paint) adds the
 * .cfp-pp-notice-ok class to any notice that ISN'T our marker, so genuine
 * WooCommerce/plugin errors still appear right away - only our own marker
 * notice stays hidden forever, replaced by the popup instead.
 */
.woocommerce-error,
.wc-block-components-notice-banner.is-error {
  visibility: hidden;
}
.woocommerce-error.cfp-pp-notice-ok,
.wc-block-components-notice-banner.is-error.cfp-pp-notice-ok {
  visibility: visible;
}

.cfp-pp-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(17, 12, 34, 0.55);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
  animation: cfpPpFadeIn 0.2s ease-out;
}

@keyframes cfpPpFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes cfpPpPopIn {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.cfp-pp-modal-box {
  background: #fff;
  border-radius: 20px;
  max-width: 480px !important;
  width: 100%;
  max-height: 90vh;
  padding: 34px 30px 30px;
  position: relative;
  box-shadow:
    0 24px 70px rgba(20, 10, 50, 0.28),
    0 4px 14px rgba(20, 10, 50, 0.1),
    0 0 0 1px rgba(85, 29, 255, 0.06);
  text-align: center;
  font-family: inherit;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  animation: cfpPpPopIn 0.25s cubic-bezier(0.2, 0.9, 0.3, 1.2);
}

.cfp-pp-modal-scroll {
  overflow-y: auto;
}

.cfp-pp-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f3f0fa;
  border: none;
  border-radius: 50%;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  color: #6b7280;
  padding: 0;
  margin: 0;
  box-sizing: border-box;
  font-family: inherit;
  -webkit-appearance: none;
  appearance: none;
  z-index: 2;
  transition:
    background 0.15s,
    color 0.15s,
    transform 0.15s;
}
.cfp-pp-modal-close:hover {
  background: #ece4fb;
  color: #551dff;
  transform: rotate(90deg);
}

.cfp-pp-icon-halo {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 2px 0 18px;
}

.cfp-pp-sparkle {
  position: absolute;
  top: 8px;
  color: #c7aef5;
  font-size: 15px;
  line-height: 1;
  pointer-events: none;
}
.cfp-pp-sparkle-left {
  left: calc(50% - 62px);
  top: 18px;
  font-size: 11px;
}
.cfp-pp-sparkle-right {
  right: calc(50% - 62px);
  top: 4px;
}

.cfp-pp-modal-icon {
  position: relative;
  width: 78px;
  height: 78px;
  border-radius: 50%;
  background: radial-gradient(
    circle at 50% 50%,
    rgba(127, 32, 226, 0.16) 0%,
    rgba(127, 32, 226, 0.16) 62%,
    rgba(127, 32, 226, 0) 72%
  );
  display: flex;
  align-items: center;
  justify-content: center;
}
.cfp-pp-modal-icon::before {
  content: "";
  position: absolute;
  inset: 13px;
  border-radius: 50%;
  background: linear-gradient(145deg, #9d4fe8 0%, #7f20e2 100%);
  box-shadow: 0 12px 26px rgba(127, 32, 226, 0.35);
}
.cfp-pp-modal-icon img {
  position: relative;
  z-index: 1;
  width: 26px;
  height: 26px;
  filter: brightness(0) invert(1);
}

.cfp-pp-modal-title {
  font-size: 20px;
  font-weight: 700;
  margin: 4px 0 8px;
  color: #16121f;
  letter-spacing: -0.2px;
  text-align: center;
  padding-right: 22px;
}

.cfp-pp-modal-message {
  font-size: 14px;
  line-height: 1.6;
  color: #5b5566;
  margin: 0 0 20px;
  text-align: center;
}
.cfp-pp-amount-highlight {
  color: #7f20e2;
  font-weight: 700;
}

.cfp-pp-modal-status {
  font-size: 13px;
  min-height: 18px;
  margin: 0 0 14px;
  font-weight: 500;
  text-align: left;
}

.cfp-pp-modal-btn {
  display: block;
  width: 100%;
  padding: 14px 16px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 14px;
  border: none;
  cursor: pointer;
  color: #fff;
  box-sizing: border-box;
  transition:
    opacity 0.15s,
    transform 0.12s,
    box-shadow 0.15s,
    background 0.15s;
}
.cfp-pp-modal-btn:disabled {
  opacity: 0.6;
  cursor: default;
  transform: none !important;
}

.cfp-pp-btn-primary {
  background: linear-gradient(245deg, #d324a8 -67.04%, #551dff 129.05%);
  box-shadow: 0 10px 24px rgba(85, 29, 255, 0.3);
}
.cfp-pp-btn-primary:hover:not(:disabled) {
  box-shadow: 0 12px 30px rgba(85, 29, 255, 0.4);
  transform: translateY(-1px);
}
.cfp-pp-btn-primary:active:not(:disabled) {
  transform: translateY(0) scale(0.99);
  box-shadow: 0 6px 16px rgba(85, 29, 255, 0.28);
}


.cfp-pp-label {
  font-size: 12px;
  font-weight: 600;
  color: #837c92;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin: 0 0 10px;
  text-align: left;
}

.cfp-pp-divider-label {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 16px;
}
.cfp-pp-divider-line {
  flex: 1 1 auto;
  height: 1px;
  background: #e6e0f2;
}
.cfp-pp-divider-text {
  flex: 0 0 auto;
  font-size: 12px;
  font-weight: 700;
  color: #7f20e2;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  white-space: nowrap;
}

.cfp-pp-method-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 0 0 18px;
}

.cfp-pp-method-btn {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
  border: 1.5px solid #ece7f5;
  background: #fff;
  border-radius: 16px;
  padding: 14px 26px 14px 12px;
  cursor: pointer;
  overflow: hidden;
  box-sizing: border-box;
  font-family: inherit;
  text-align: left;
  transition:
    border-color 0.18s,
    box-shadow 0.18s,
    transform 0.14s,
    background 0.18s;
}
.cfp-pp-method-btn:hover {
  border-color: var(--pp-brand-border, #c7b8f0);
  box-shadow: 0 12px 26px var(--pp-brand-shadow, rgba(85, 29, 255, 0.18));
  transform: translateY(-3px);
}
.cfp-pp-method-btn:active {
  transform: translateY(-1px) scale(0.98);
}

.cfp-pp-method-top {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cfp-pp-method-badge {
  width: 52px;
  height: 52px;
  border-radius: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--pp-brand-soft, #faf9fd);
  border: 1.5px solid var(--pp-brand-border, #ece7f5);
  padding: 10px;
  box-sizing: border-box;
  transition:
    background 0.18s,
    border-color 0.18s;
  flex-shrink: 0;
}
.cfp-pp-method-badge img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.cfp-pp-method-badge-grid {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--pp-brand-tint, #f3f0fa);
  border: none;
  padding: 9px;
}

.cfp-pp-method-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1 1 auto;
}

.cfp-pp-method-label {
  font-size: 13px;
  font-weight: 700;
  color: #16121f;
  letter-spacing: 0.1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cfp-pp-method-sub {
  font-size: 11px;
  font-weight: 500;
  color: #918aa0;
  letter-spacing: 0.1px;
  line-height: 1.3;
  overflow-wrap: break-word;
}

.cfp-pp-method-radio {
  position: absolute;
  top: 14px;
  right: 12px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid #d9d3e8;
  box-sizing: border-box;
  transition: border-color 0.18s;
}
.cfp-pp-method-btn:hover .cfp-pp-method-radio {
  border-color: var(--pp-brand, #7f20e2);
}

.cfp-pp-method-dial {
  display: block;
  width: 100%;
  text-align: center;
  padding: 8px 6px;
  border-radius: 10px;
  background: var(--pp-brand-tint, #f3f0fa);
  color: var(--pp-brand, #7f20e2);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.3px;
  box-sizing: border-box;
}


.cfp-pp-info-box {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: #f3e8fd;
  border-radius: 14px;
  padding: 14px;
  margin: 0 0 16px;
  text-align: left;
}
.cfp-pp-info-icon {
  width: 26px;
  height: 26px;
  flex-shrink: 0;
  color: #7f20e2;
  margin-top: 1px;
}
.cfp-pp-info-icon svg {
  width: 100%;
  height: 100%;
}
.cfp-pp-info-text {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.55;
  color: #4a3d63;
}

.cfp-pp-footer-divider {
  height: 1px;
  background: #efeaf7;
  margin: 0 0 14px;
}

.cfp-pp-footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.cfp-pp-footer-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 600;
  color: #6b647a;
}
.cfp-pp-footer-icon {
  width: 15px;
  height: 15px;
  color: #7f20e2;
  flex-shrink: 0;
  display: inline-flex;
}
.cfp-pp-footer-icon svg {
  width: 100%;
  height: 100%;
}


.cfp-pp-header-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 16px;
  padding-right: 22px;
  text-align: left;
}
.cfp-pp-header-row .cfp-pp-modal-title {
  margin: 0;
  padding-right: 0;
  text-align: left;
}

.cfp-pp-steps {
  list-style: decimal;
  padding-left: 20px;
  margin: 0 0 18px;
  text-align: left;
  background: #faf9fd;
  border-radius: 14px;
  padding: 16px 16px 16px 34px;
  color: #3d3750;
  font-size: 13.5px;
  line-height: 1.7;
}
.cfp-pp-steps li + li {
  margin-top: 4px;
}
.cfp-pp-step-highlight {
  color: #551dff;
  font-weight: 700;
  padding: 4px 20px 4px 20px;
  background: #f1d2ff;
  border-radius: 20px;
}

.cfp-pp-field-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #241a3d;
  margin: 0 0 6px;
  text-align: left;
}

.cfp-pp-input {
  width: 100%;
  box-sizing: border-box;
  padding: 13px 14px;
  font-size: 15px;
  font-weight: 500;
  color: #241a3d;
  border: 1.5px solid #e6e2f0;
  border-radius: 12px;
  margin-bottom: 12px;
  background: #faf9fd;
  transition:
    border-color 0.15s,
    box-shadow 0.15s,
    background 0.15s;
}
.cfp-pp-input:focus {
  outline: none;
  border-color: #a855f7;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(168, 85, 247, 0.14);
}

.cfp-pp-back-link {
  display: block;
  width: 100%;
  background: none;
  border: none;
  text-align: center;
  font-size: 12.5px;
  color: #837c92;
  margin-top: 14px;
  cursor: pointer;
  transition: color 0.15s;
}

.cfp-pp-success-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: #dcfce7;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cfp-pp-success-icon svg {
  width: 28px;
  height: 28px;
  color: #16a34a;
}

.cfp-pp-method-grid:hover button {
  background: transparent !important;
}
.cfp-pp-back-link {
  color: #9a21d0;
  background: transparent !important;
}
.cfp-pp-back-link:hover {
  color: #551dff;
  background: transparent !important;
}
