/* PartnerUp — web-checkout account gate modal styling.
 * Reuses the early-access.html theme custom properties (--bg, --surface,
 * --border, --lime, --text, ...) since the modal renders on that same page.
 * Self-contained: no external fonts / CDN. */

body.pp-ca-open {
  overflow: hidden;
}

.pp-ca-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.72);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.pp-ca-overlay[hidden] {
  display: none;
}

.pp-ca-modal {
  position: relative;
  width: 100%;
  max-width: 420px;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  background: var(--bg-card, #0f1512);
  border: 1px solid var(--border, #2d3a33);
  border-radius: var(--radius, 16px);
  padding: 28px 24px 24px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.6), 0 0 40px rgba(132, 204, 22, 0.06);
  color: var(--text, #f1f5f9);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

.pp-ca-close {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  color: var(--text-muted, #94a3b8);
  font-size: 26px;
  line-height: 1;
  border-radius: 8px;
}
.pp-ca-close:hover {
  color: var(--text, #f1f5f9);
  background: var(--surface, #1a2420);
}

.pp-ca-title {
  margin: 0 24px 6px 0;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.25;
}
.pp-ca-sub {
  margin: 0 0 18px;
  font-size: 13.5px;
  color: var(--text-muted, #94a3b8);
  line-height: 1.5;
}

/* Tabs */
.pp-ca-tabs {
  display: flex;
  gap: 6px;
  padding: 4px;
  margin-bottom: 18px;
  background: var(--surface, #1a2420);
  border: 1px solid var(--border, #2d3a33);
  border-radius: var(--radius-sm, 10px);
}
.pp-ca-tab {
  flex: 1;
  padding: 9px 10px;
  border: none;
  background: transparent;
  color: var(--text-muted, #94a3b8);
  font-size: 14px;
  font-weight: 600;
  border-radius: 8px;
  transition: background 150ms ease, color 150ms ease;
}
.pp-ca-tab.is-active {
  background: var(--surface-raised, #243029);
  color: var(--text, #f1f5f9);
}

/* Fields */
.pp-ca-field {
  display: block;
  margin-bottom: 12px;
}
.pp-ca-field > span {
  display: block;
  margin-bottom: 6px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-muted, #94a3b8);
}
.pp-ca-field input {
  width: 100%;
  padding: 11px 12px;
  background: var(--surface, #1a2420);
  border: 1px solid var(--border, #2d3a33);
  border-radius: var(--radius-sm, 10px);
  color: var(--text, #f1f5f9);
  font-size: 15px;
  font-family: inherit;
}
.pp-ca-field input:focus {
  outline: none;
  border-color: var(--lime, #84cc16);
  background: var(--surface-raised, #243029);
}

/* Consent checkbox */
.pp-ca-consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 6px 0 16px;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--text-muted, #94a3b8);
}
.pp-ca-consent input {
  margin-top: 2px;
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  accent-color: var(--lime, #84cc16);
}
.pp-ca-consent a {
  color: var(--lime, #84cc16);
  text-decoration: underline;
}

/* Buttons */
.pp-ca-primary {
  width: 100%;
  padding: 12px 16px;
  margin-top: 4px;
  border: none;
  border-radius: var(--radius-sm, 10px);
  background: var(--lime, #84cc16);
  color: #000;
  font-size: 15px;
  font-weight: 700;
  font-family: inherit;
  transition: background 150ms ease, box-shadow 150ms ease;
}
.pp-ca-primary:hover:not(:disabled) {
  background: var(--lime-hi, #a3e635);
  box-shadow: 0 0 24px var(--lime-glow, rgba(132, 204, 22, 0.15));
}
.pp-ca-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.pp-ca-google {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 11px 16px;
  border: 1px solid var(--border-bright, #3d4f44);
  border-radius: var(--radius-sm, 10px);
  background: var(--surface, #1a2420);
  color: var(--text, #f1f5f9);
  font-size: 14.5px;
  font-weight: 600;
  font-family: inherit;
}
.pp-ca-google:hover:not(:disabled) {
  background: var(--surface-raised, #243029);
  border-color: var(--lime, #84cc16);
}
.pp-ca-google:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.pp-ca-g {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  color: #4285f4;
  font-weight: 800;
  font-size: 13px;
}

.pp-ca-apple {
  width: 100%;
  padding: 11px 16px;
  border: 1px solid var(--border-bright, #3d4f44);
  border-radius: var(--radius-sm, 10px);
  background: var(--surface, #1a2420);
  color: var(--text, #f1f5f9);
  font-family: inherit;
}

.pp-ca-link {
  display: inline-block;
  margin: 10px 0 0;
  padding: 4px 0;
  border: none;
  background: transparent;
  color: var(--text-muted, #94a3b8);
  font-size: 13px;
  font-family: inherit;
  text-decoration: underline;
}
.pp-ca-link:hover {
  color: var(--lime, #84cc16);
}

/* Divider */
.pp-ca-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 16px 0;
  color: var(--text-dim, #64748b);
  font-size: 12px;
}
.pp-ca-divider::before,
.pp-ca-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border, #2d3a33);
}

/* Continue view */
.pp-ca-asuser {
  margin: 4px 0 16px;
  font-size: 15px;
  color: var(--text, #f1f5f9);
}
.pp-ca-asuser strong {
  color: var(--lime, #84cc16);
  word-break: break-all;
}

/* Warning banner (already-subscribed) */
.pp-ca-warning {
  margin: 0 0 16px;
  padding: 11px 13px;
  border: 1px solid var(--warning, #fbbf24);
  border-radius: var(--radius-sm, 10px);
  background: rgba(251, 191, 36, 0.1);
  color: var(--warning, #fbbf24);
  font-size: 13px;
  line-height: 1.5;
}
.pp-ca-warning[hidden] {
  display: none;
}

/* Errors + notes */
.pp-ca-error {
  margin: 12px 0 0;
  font-size: 13px;
  color: var(--danger, #f87171);
  line-height: 1.5;
}
.pp-ca-note {
  margin: 12px 0 0;
  font-size: 13px;
  color: var(--lime, #84cc16);
  line-height: 1.5;
}
.pp-ca-error[hidden],
.pp-ca-note[hidden] {
  display: none;
}

/* Inline load-failure toast (created by the early-access inline handler when the
 * gstatic module graph fails to load — carries its own inline styles too, so it
 * shows even if this stylesheet was blocked). */
.pp-ca-loadfail {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  z-index: 1100;
  max-width: 92vw;
  padding: 12px 16px;
  background: var(--bg-card, #0f1512);
  border: 1px solid var(--danger, #f87171);
  border-radius: var(--radius-sm, 10px);
  color: var(--text, #f1f5f9);
  font-size: 13.5px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
}
