:root {
  --pcl-primary: #1f5f9b;
  --pcl-primary-700: #174a78;
  --pcl-bg: #ffffff;
  --pcl-soft: #f1f5f9;
  --pcl-text: #0f172a;
  --pcl-muted: #64748b;
  --pcl-border: rgba(15, 23, 42, 0.10);
  --pcl-radius: 22px;
  --pcl-shadow: 0 18px 50px rgba(2, 8, 23, 0.12);
  --pcl-ring: 0 0 0 4px rgba(31, 95, 155, 0.18);
}

/* Bulletproof box-sizing inside plugin UI */
.pcl-card,
.pcl-card * {
  box-sizing: border-box;
}

/* Avoid theme overrides */
.pcl-card input,
.pcl-card select,
.pcl-card button {
  font: inherit;
}

/* CARD */
.pcl-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--pcl-radius);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(241, 245, 249, 0.55));
  border: 1px solid var(--pcl-border);
  box-shadow: var(--pcl-shadow);
  padding: 18px;
  color: var(--pcl-text);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif;
  line-height: 1.35;
}

.pcl-card::before {
  content: "";
  position: absolute;
  top: -180px;
  right: -220px;
  width: 420px;
  height: 420px;
  background: radial-gradient(circle at 30% 30%, rgba(var(--pcl-primary-rgb, 31, 95, 155), 0.18), rgba(var(--pcl-primary-rgb, 31, 95, 155), 0) 62%);
  pointer-events: none;
}

/* HEADER */
.pcl-card__head {
  position: relative;
  padding-bottom: 12px;
  z-index: 1;
}

.pcl-card__title {
  font-size: 20px;
  font-weight: 900;
  letter-spacing: -0.01em;
  color: var(--pcl-text);
}

.pcl-card__sub {
  margin-top: 6px;
  font-size: 13px;
  color: var(--pcl-muted);
}

/* CHIP */
.pcl-chip {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(var(--pcl-primary-rgb, 31, 95, 155), 0.18);
  background: rgba(var(--pcl-primary-rgb, 31, 95, 155), 0.08);
  color: var(--pcl-primary);
  font-weight: 800;
  font-size: 12px;
  white-space: nowrap;
}

.pcl-chip--urgent {
  position: absolute;
  top: 0;
  right: 0;
}

/* FORM */
.pcl-form {
  display: grid;
  gap: 14px;
  margin-top: 14px;
  position: relative;
  z-index: 1;
}

/* PROGRESS */
.pcl-progress {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 2px 2px 0;
}

.pcl-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: rgba(100, 116, 139, 0.25);
}

.pcl-dot.is-active {
  background: var(--pcl-primary);
}

.pcl-dot.is-done {
  background: rgba(22, 163, 74, 0.85);
}

.pcl-line {
  height: 2px;
  flex: 1 1 auto;
  background: rgba(15, 23, 42, 0.10);
}

.pcl-progress__text {
  margin-left: 4px;
  font-size: 12px;
  font-weight: 800;
  color: rgba(15, 23, 42, 0.70);
  white-space: nowrap;
}

/* FIELD */
.pcl-field {
  display: grid;
  gap: 6px;
}

.pcl-label {
  font-size: 11px;
  font-weight: 800;
  color: rgba(15, 23, 42, 0.72);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.pcl-req {
  color: #dc2626;
}

.pcl-help {
  font-size: 12px;
  color: var(--pcl-muted);
}

.pcl-error {
  font-size: 12px;
  font-weight: 900;
  color: #dc2626;
}

/* INPUTS */
.pcl-input {
  width: 100%;
  height: 54px;
  display: block;
  -webkit-appearance: none;
  appearance: none;
  border-radius: 20px;
  border: 1px solid var(--pcl-border);
  background: var(--pcl-soft);
  padding: 0 14px;
  font-size: 15px;
  outline: none;
  transition: box-shadow 140ms ease, border-color 140ms ease, background 140ms ease;
}

.pcl-card select.pcl-input {
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20'%3E%3Cpath fill='%2364748b' d='M5.7 7.3a1 1 0 0 1 1.4 0L10 10.2l2.9-2.9a1 1 0 1 1 1.4 1.4l-3.6 3.6a1 1 0 0 1-1.4 0L5.7 8.7a1 1 0 0 1 0-1.4Z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 18px 18px;
  padding-right: 44px;
}

.pcl-card select.pcl-input::-ms-expand {
  display: none;
}

.pcl-card ::placeholder {
  color: rgba(100, 116, 139, 0.95);
}

.pcl-input:hover {
  border-color: rgba(var(--pcl-primary-rgb, 31, 95, 155), 0.25);
}

.pcl-input:focus,
.pcl-input:focus-visible {
  border-color: rgba(var(--pcl-primary-rgb, 31, 95, 155), 0.55);
  background: #fff;
  box-shadow: var(--pcl-ring);
}

.pcl-input.is-invalid {
  border-color: rgba(220, 38, 38, 0.55);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.12);
}

/* Prefix inside phone input */
.pcl-inputWrap {
  position: relative !important;
  display: block;
  width: 100%;
}

.pcl-prefix {
  position: absolute !important;
  left: 14px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  height: 34px;
  display: inline-flex !important;
  align-items: center;
  padding-right: 10px;
  border-right: 1px solid rgba(15, 23, 42, 0.10);
  color: rgba(15, 23, 42, 0.82);
  font-weight: 900;
  font-size: 14px;
  white-space: nowrap;
  pointer-events: none;
}

.pcl-input--phone {
  padding-left: 72px;
}

/* GRID */
.pcl-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr 1fr;
}

/* ACTIONS */
.pcl-actions {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 12px;
}

/* BUTTONS */
.pcl-btn {
  cursor: pointer;
  width: 100%;
  height: 54px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-decoration: none;
  white-space: nowrap;
  -webkit-appearance: none;
  appearance: none;
  border-radius: 20px;
  border: 1px solid var(--pcl-border);
  background: #fff;
  color: var(--pcl-text);
  padding: 0 16px;
  font-weight: 900;
  font-size: 15px;
  line-height: 1;
  transition: transform 140ms ease, box-shadow 140ms ease, filter 140ms ease, background 140ms ease;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.pcl-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(2, 8, 23, 0.10);
}

.pcl-btn--primary {
  border: 1px solid rgba(var(--pcl-primary-rgb, 31, 95, 155), 0.18);
  background: linear-gradient(180deg, var(--pcl-primary), var(--pcl-primary-700));
  color: #fff;
  box-shadow: 0 16px 34px rgba(var(--pcl-primary-rgb, 31, 95, 155), 0.25);
}

.pcl-btn--primary:hover {
  filter: brightness(1.03);
}

.pcl-btn:disabled,
.pcl-btn[disabled] {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* TRUST */
.pcl-trust {
  margin-top: 6px;
  padding: 12px;
  border-radius: 18px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: rgba(241, 245, 249, 0.85);
}

.pcl-trust__row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  font-size: 12px;
  font-weight: 900;
  color: rgba(15, 23, 42, 0.78);
}

.pcl-trust__item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.pcl-trust__muted {
  margin-top: 8px;
  font-weight: 600;
  color: rgba(100, 116, 139, 0.95);
}

.pcl-trust__dot {
  opacity: 0.55;
}

.pcl-trust--compact {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 10px;
}

.pcl-ico {
  width: 16px;
  height: 16px;
  display: inline-block;
  color: rgba(var(--pcl-primary-rgb, 31, 95, 155), 0.90);
  flex: 0 0 16px;
  line-height: 0;
}

.pcl-ico svg {
  width: 16px !important;
  height: 16px !important;
  display: block;
  max-width: none !important;
  max-height: none !important;
}

/* SUCCESS */
.pcl-success {
  margin-top: 10px;
  position: relative;
  padding: 14px 14px 14px 44px;
  border-radius: 18px;
  border: 1px solid rgba(22, 163, 74, 0.20);
  background: rgba(34, 197, 94, 0.08);
  color: #166534;
  font-weight: 900;
}

.pcl-success::before {
  content: "✓";
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: rgba(22, 163, 74, 0.18);
  color: #166534;
  display: grid;
  place-items: center;
  font-weight: 950;
}

/* Honeypot */
.pcl-hp {
  position: absolute !important;
  left: -9999px !important;
  top: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
}

/* MOBILE */
@media (max-width: 640px) {
  .pcl-grid {
    grid-template-columns: 1fr;
  }
  .pcl-actions {
    grid-template-columns: 1fr;
  }
  .pcl-chip--urgent {
    position: static;
    margin-top: 10px;
  }
}
