/* =============================================================
   WC Custom Checkout — Stylesheet
   ============================================================= */

/* ── Reset & variables ─────────────────────────────────────── */
.wccc-wrap *,
.wccc-wrap *::before,
.wccc-wrap *::after {
  box-sizing: border-box;
}

.wccc-wrap {
  --wccc-accent:       #8D3072;
  --wccc-accent-dark:  #7e2f89;
  --wccc-accent-light: #f3e8f6;
  --wccc-radius:       10px;
  --wccc-radius-sm:    6px;
  font-family: "Champagne & Limousines" !important;
  color: #1a1a1a;
}

/* ── Layout ─────────────────────────────────────────────────── */
.wccc-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  max-width: 100%;
  margin: 0 auto;
  padding: 24px 16px;
  align-items: start;
}

.wccc-layout.wccc-has-summary {
  grid-template-columns: 1fr 35%;
}

@media (max-width: 720px) {
  .wccc-layout.wccc-has-summary {
    grid-template-columns: 1fr;
  }

}

/* ── Errors banner ──────────────────────────────────────────── */
.wccc-errors {
  background: #fdf2f2;
  border: 1px solid #f5c6c6;
  border-left: 4px solid #e24b4a;
  border-radius: var(--wccc-radius-sm);
  padding: 14px 16px;
  margin-bottom: 16px;
  font-size: 14px;
  color: #7a1f1f;
}

.wccc-errors ul { margin: 6px 0 0 18px; }
.wccc-errors li { margin-bottom: 4px; }

/* ── Steps container ─────────────────────────────────────────── */
.wccc-steps {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* ── Individual step ─────────────────────────────────────────── */
.wccc-step {
  background: #D6D6D6B0;
  border: 1px solid #e0e0e0;
  border-radius: var(--wccc-radius);
  overflow: hidden;
  transition: border-color .2s;
}

.wccc-step.active {
  border-color: #d0bcd4;
}

/* ── Step header ─────────────────────────────────────────────── */
.wccc-step-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  cursor: pointer;
  user-select: none;
  outline: none;
}

.wccc-step-header:focus-visible {
  box-shadow: inset 0 0 0 2px var(--wccc-accent);
}

.wccc-step-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 20px;
  font-weight: 600;
  color: #444444;
}

/* ── Step number / check icon ──────────────────────────────── */
.wccc-step-icon {
  position: relative;
  width: 26px;
  height: 26px;
  flex-shrink: 0;
}

.wccc-step-num {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.wccc-check {
  position: absolute;
  inset: 0;
  width: 26px;
  height: 26px;
  color: var(--wccc-accent);
  opacity: 0;
  transition: opacity .2s;
}

/* Done state */
.wccc-step.done .wccc-step-num  { opacity: 0; }
.wccc-step.done .wccc-check     { opacity: 1; }

/* Locked (not done, not active) */
.wccc-step:not(.active):not(.done) .wccc-step-num {
  border-color: #c0c0c0;
  color: #888;
}

.wccc-step:not(.active):not(.done) .wccc-step-header-left {
  color: #888;
}

/* ── Step body ───────────────────────────────────────────────── */
.wccc-step-body {
  padding: 0 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* hidden attr toggled by JS */
.wccc-step-body[hidden] { display: none; }

/* ── Form fields ─────────────────────────────────────────────── */
.wccc-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

@media (max-width: 480px) {
  .wccc-row { grid-template-columns: 1fr; }
}

.wccc-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.wccc-field.wccc-full {
  grid-column: 1 / -1;
}

.wccc-field label {
  font-size: 16px;
  font-weight: 700;
  color: #444;
}

.wccc-field label abbr {
  text-decoration: none;
  color: var(--wccc-accent);
  margin-left: 2px;
}

.wccc-field input,
.wccc-field select {
  height: 38px;
  border: 1px solid #d0d0d0;
  border-radius: 25px;
  padding: 0 12px;
  font-size: 14px;
  color: #000;
  background: #fff;
  width: 100%;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
  -webkit-appearance: none;
  appearance: none;
}

.wccc-field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23888' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
}

.wccc-field input:focus,
.wccc-field select:focus {
  border-color: var(--wccc-accent);
  box-shadow: 0 0 0 3px rgba(156,59,168,.12);
}

.wccc-field input::placeholder { color: #bbb; }

/* ── Entrega note ─────────────────────────────────────────── */
.wccc-entrega-note {
  font-size: 12px;
  line-height: 1.5;
  color: #555;
  background: #f9f4fa;
  border-left: 3px solid var(--wccc-accent);
  border-radius: 0 var(--wccc-radius-sm) var(--wccc-radius-sm) 0;
  padding: 10px 12px;
}

/* ── Button ──────────────────────────────────────────────────── */
.wccc-btn {
  align-self: flex-start;
  padding: 10px 30px;
  background: var(--wccc-accent);
  color: #fff;
  border: none;
  border-radius: 24px;
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s, transform .1s, opacity .15s;
  margin-top: 4px;
  line-height: 1;
}

.wccc-btn:hover  { background: var(--wccc-accent-dark); }
.wccc-btn:active { transform: scale(.98); }
.wccc-btn:disabled {
  opacity: .6;
  cursor: not-allowed;
}

.wccc-pay-btn {
  width: 100%;
  padding: 13px;
  text-align: center;
  border-radius: 24px;
  font-size: 15px;
}

.wccc-no-gateways {
  font-size: 14px;
  color: #888;
  padding: 8px 0;
}

/* ── Payment methods ─────────────────────────────────────────── */
.wccc-payment-methods {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.wccc-pm {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border: 1px solid #e0e0e0;
  border-radius: var(--wccc-radius-sm);
  cursor: pointer;
  transition: border-color .15s, background .15s;
  background: #fff;
  outline: none;
}

.wccc-pm:hover {
  border-color: #c084c8;
  background: #fbf5fc;
}

.wccc-pm.selected {
  border: 1.5px solid var(--wccc-accent);
  background: var(--wccc-accent-light);
}

.wccc-pm:focus-visible {
  box-shadow: 0 0 0 3px rgba(156,59,168,.2);
}

.wccc-pm-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Radio button */
.wccc-radio {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1.5px solid #c0c0c0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: border-color .15s;
}

.wccc-pm.selected .wccc-radio { border-color: var(--wccc-accent); }

.wccc-radio-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--wccc-accent);
  opacity: 0;
  transition: opacity .15s;
}

.wccc-pm.selected .wccc-radio-dot { opacity: 1; }

.wccc-pm-label {
  font-size: 18px;
  font-weight: 500;
  color: #444444;
}

/* Logos */
.wccc-pm-logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.wccc-logo-paypal {
  font-size: 18px;
  font-weight: 800;
  font-style: italic;
  letter-spacing: -.5px;
  line-height: 1;
  font-family: Arial, Helvetica, sans-serif;
}
.wccc-logo-paypal em { color: #003087; font-style: normal; }
.wccc-logo-paypal span { color: #009cde; }

.wccc-logo-payu {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -.3px;
  line-height: 1;
  color: #0e4194;
  font-family: Arial, Helvetica, sans-serif;
}
.wccc-logo-payu span { color: #83c240; }
.wccc-logo-payu sup  { font-size: 10px; vertical-align: super; color: #83c240; }

.wccc-pm-label-logo {
  font-size: 12px;
  font-weight: 600;
  color: #555;
}

/* Gateway description */
.wccc-pm-desc {
  font-size: 12px;
  line-height: 1.5;
  color: #555;
  padding: 2px 16px 6px 44px;
  margin-top: -4px;
}

.wccc-pm-desc[hidden] { display: none; }

/* ── Summary sidebar ─────────────────────────────────────────── */
.wccc-summary {
  position: sticky;
  top: 20px;
}

.wccc-summary-inner {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: var(--wccc-radius);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.wccc-summary-title {
  font-size: 20px;
  font-family: "Champagne & Limousines" !important;
  font-weight: 700;
  color: #444;
  padding-bottom: 12px;
  border-bottom: 1px solid #ebebeb;
  margin: 0;
}

.wccc-items {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.wccc-item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.wccc-item-img {
  width: 54px;
  height: 54px;
  flex-shrink: 0;
  border-radius: var(--wccc-radius-sm);
  overflow: hidden;
  border: 1px solid #ebebeb;
  background: #f5f5f5;
}

.wccc-item-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.wccc-item-info { flex: 1; min-width: 0; }

.wccc-item-name {
  font-size: 16px;
  color: #444;
  line-height: 1.4;
}

.wccc-item-sub {
	width: 30%;
	border: 1px solid #8D3072;
	border-radius: 25px;
	display: flex;
	justify-content: center;
	align-items: center;
  font-size: 14px;
  color: #8D3072;
  margin-top: 2px;
}

.wccc-item-price {
  font-size: 14px;
  font-weight: 600;
	text-align: end;
  color: var(--wccc-accent);
  margin-top: 3px;
}

.wccc-subtotal {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: #666;
  padding-top: 6px;
  border-top: 1px dashed #e8e8e8;
}

.wccc-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid #ebebeb;
  padding-top: 12px;
  margin-top: 2px;
}

.wccc-total-label {
  font-size: 18px;
	font-weight: 700;
  color: #444444;
}

.wccc-total-val {
  font-size: 20px;
  font-weight: 700;
  color: #444444;
}

/* ── Spinner ─────────────────────────────────────────────────── */
.wccc-spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255,255,255,.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: wccc-spin .7s linear infinite;
  vertical-align: middle;
  margin-right: 6px;
}

.wccc-total-val .amount {
	color: #444 !important;
}

@keyframes wccc-spin { to { transform: rotate(360deg); } }
