/*
 * TPB Partner
 * Scoped under .tpbpt-card and #tpb-partner so theme/Elementor styles
 * cannot bleed in, and nothing leaks out.
 */

.tpbpt-card,
#tpb-partner {
  --tpbpt-ink: #0C3B4E;
  --tpbpt-text: #1A2B32;
  --tpbpt-muted: #6E7F86;
  --tpbpt-btn: #0B3F56;
  --tpbpt-btn-hover: #082E3F;
  --tpbpt-border: #C4D0D6;
  --tpbpt-border-focus: #0B3F56;
  --tpbpt-bg: #FFFFFF;
  --tpbpt-danger: #A63A2B;
  --tpbpt-font: "Inter", "Helvetica Neue", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.tpbpt-card,
.tpbpt-card *,
.tpbpt-card *::before,
.tpbpt-card *::after {
  box-sizing: border-box;
}

.tpbpt-card [hidden] {
  display: none !important;
}

.tpbpt-card {
  width: 100%;
  max-width: 620px;
  background: var(--tpbpt-bg);
  border-radius: 22px;
  padding: 32px;
  font-family: var(--tpbpt-font);
  color: var(--tpbpt-text);
  box-shadow: 0 20px 50px -18px rgba(11, 63, 86, 0.18);
  text-align: left;
  -webkit-font-smoothing: antialiased;
}

.tpbpt-title {
  margin: 0 0 22px;
  font-size: 26px;
  font-weight: 600;
  line-height: 1.25;
  color: var(--tpbpt-ink);
}

.tpbpt-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.tpbpt-field {
  margin-bottom: 16px;
}

.tpbpt-grid .tpbpt-field {
  margin-bottom: 0;
}

.tpbpt-field label {
  display: block;
  margin: 0 0 7px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--tpbpt-ink);
}

.tpbpt-opt-label {
  font-weight: 400;
  color: var(--tpbpt-muted);
}

.tpbpt-field input[type="text"],
.tpbpt-field input[type="email"],
.tpbpt-field input[type="tel"],
.tpbpt-field select,
.tpbpt-field textarea {
  width: 100%;
  font-family: inherit;
  font-size: 15px;
  color: var(--tpbpt-text);
  background: #FFFFFF;
  border: 1px solid var(--tpbpt-border);
  border-radius: 12px;
  padding: 12px 14px;
  outline: none;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.tpbpt-field input::placeholder,
.tpbpt-field textarea::placeholder {
  color: #8E9CA2;
}

.tpbpt-field input:focus,
.tpbpt-field select:focus,
.tpbpt-field textarea:focus {
  border-color: var(--tpbpt-border-focus);
  box-shadow: 0 0 0 3px rgba(11, 63, 86, 0.12);
}

.tpbpt-select-wrap {
  position: relative;
}

.tpbpt-select-wrap select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 38px;
  cursor: pointer;
}

.tpbpt-select-wrap::after {
  content: "";
  position: absolute;
  right: 15px;
  top: 50%;
  width: 8px;
  height: 8px;
  border-right: 1.8px solid var(--tpbpt-ink);
  border-bottom: 1.8px solid var(--tpbpt-ink);
  transform: translateY(-65%) rotate(45deg);
  pointer-events: none;
}

.tpbpt-field textarea {
  min-height: 90px;
  resize: vertical;
  line-height: 1.45;
}

.tpbpt-field--check {
  margin: 6px 0 20px;
}

.tpbpt-check {
  display: inline-flex !important;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  margin: 0 !important;
  font-size: 14px !important;
  font-weight: 400 !important;
  color: var(--tpbpt-ink) !important;
}

.tpbpt-check input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--tpbpt-btn);
  cursor: pointer;
  flex: 0 0 auto;
}

.tpbpt-error {
  display: none;
  margin: 6px 0 0;
  font-size: 12.5px;
  color: var(--tpbpt-danger);
}

.tpbpt-field.tpbpt-has-error input,
.tpbpt-field.tpbpt-has-error select,
.tpbpt-field.tpbpt-has-error textarea {
  border-color: var(--tpbpt-danger);
}

.tpbpt-field.tpbpt-has-error .tpbpt-error {
  display: block;
}

.tpbpt-hp {
  position: absolute !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}

.tpbpt-formerror {
  margin: 0 0 14px;
  padding: 10px 14px;
  border-radius: 10px;
  background: #FBEDEA;
  color: var(--tpbpt-danger);
  font-size: 13.5px;
  text-align: center;
}

.tpbpt-btn {
  width: 100%;
  height: 52px;
  padding: 0 24px;
  border: 0;
  border-radius: 999px;
  background: var(--tpbpt-btn);
  color: #FFFFFF;
  font-family: inherit;
  font-size: 15.5px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background 0.16s ease, transform 0.12s ease, opacity 0.16s ease;
}

.tpbpt-btn:hover {
  background: var(--tpbpt-btn-hover);
  color: #FFFFFF;
}

.tpbpt-btn:active {
  transform: translateY(1px);
}

.tpbpt-btn[disabled] {
  opacity: 0.65;
  cursor: default;
  transform: none;
}

.tpbpt-btn--ghost {
  background: transparent;
  color: var(--tpbpt-ink);
  border: 1px solid var(--tpbpt-border);
  margin-top: 20px;
}

.tpbpt-btn--ghost:hover {
  background: #F4F7F8;
  color: var(--tpbpt-ink);
}

.tpbpt-trigger {
  font-family: var(--tpbpt-font);
  font-size: 15px;
  font-weight: 600;
  padding: 13px 26px;
  border: 0;
  border-radius: 999px;
  background: #0B3F56;
  color: #FFFFFF;
  cursor: pointer;
}

/* Success state */
.tpbpt-success {
  text-align: center;
  padding: 18px 8px;
}

.tpbpt-success-badge {
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
}

.tpbpt-success-badge svg {
  width: 100%;
  height: 100%;
}

.tpbpt-success-badge circle {
  fill: #E6F2F0;
}

.tpbpt-success-badge path {
  fill: none;
  stroke: #0B3F56;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.tpbpt-success-copy {
  margin: 0;
  font-size: 15px;
  line-height: 1.55;
  color: var(--tpbpt-muted);
}

/* Modal overlay (used when opened via .tpb-partner-open or #tpb-partner) */
#tpb-partner.tpbpt-overlay {
  position: fixed;
  inset: 0;
  z-index: 999999;
  background: rgba(12, 26, 32, 0.58);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 16px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

#tpb-partner.tpbpt-overlay.tpbpt-is-open {
  opacity: 1;
  visibility: visible;
}

#tpb-partner .tpbpt-modal {
  position: relative;
  width: 100%;
  max-width: 620px;
  max-height: 92vh;
  overflow-y: auto;
  border-radius: 22px;
}

#tpb-partner .tpbpt-close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 2;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: rgba(12, 59, 78, 0.08);
  color: var(--tpbpt-ink);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
}

#tpb-partner .tpbpt-close:hover {
  background: rgba(12, 59, 78, 0.15);
}

@media (max-width: 560px) {
  .tpbpt-card {
    padding: 24px 18px;
    border-radius: 18px;
  }

  .tpbpt-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }
}