/* Circlo Iteration 4 - privacy system.
   ASCII-only source to avoid encoding regressions. */

.i4-privacy-button {
  width: 100%;
}

.i4-privacy-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100500;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(15, 23, 42, .68);
  backdrop-filter: blur(8px);
}

.i4-privacy-backdrop.hidden {
  display: none !important;
}

.i4-privacy-card {
  width: min(760px, 100%);
  max-height: calc(100vh - 40px);
  overflow: auto;
  box-sizing: border-box;
  border: 1px solid var(--border, rgba(127,127,127,.24));
  border-radius: 18px;
  background: var(--surface, #fff);
  color: var(--text, #0f172a);
  box-shadow: 0 28px 80px rgba(0,0,0,.3);
}

body.dark .i4-privacy-card {
  background: #111827;
  color: #e5e7eb;
}

.i4-privacy-head {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  padding: 20px 22px 16px;
  background: inherit;
  border-bottom: 1px solid var(--border, #e2e8f0);
}

.i4-privacy-head h2 {
  margin: 0 0 4px;
  font-size: 1.4rem;
}

.i4-privacy-head p {
  margin: 0;
  color: var(--muted, #64748b);
  line-height: 1.4;
}

.i4-close {
  width: 38px;
  height: 38px;
  min-width: 38px;
  border-radius: 50%;
  border: 1px solid var(--border, #cbd5e1);
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 1.25rem;
  cursor: pointer;
}

.i4-privacy-form {
  display: grid;
  gap: 18px;
  padding: 20px 22px 24px;
}

.i4-section {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 14px;
  background: var(--surface-2, #f8fafc);
}

.i4-section h3 {
  margin: 0;
  font-size: 1rem;
}

.i4-section > p {
  margin: -4px 0 0;
  color: var(--muted, #64748b);
  font-size: .84rem;
  line-height: 1.45;
}

.i4-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(210px, 290px);
  gap: 16px;
  align-items: center;
}

.i4-row label,
.i4-row .i4-label {
  min-width: 0;
}

.i4-row strong {
  display: block;
  margin-bottom: 3px;
  font-size: .92rem;
}

.i4-row small {
  display: block;
  color: var(--muted, #64748b);
  line-height: 1.35;
}

.i4-row select {
  width: 100%;
  min-height: 42px;
  box-sizing: border-box;
  border: 1px solid var(--border, #cbd5e1);
  border-radius: 10px;
  padding: 8px 10px;
  background: var(--surface, #fff);
  color: inherit;
  font: inherit;
}

body.dark .i4-row select {
  background: #0f172a;
}

.i4-check-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  line-height: 1.4;
}

.i4-check-row input {
  margin-top: 3px;
  flex: 0 0 auto;
}

.i4-warning {
  padding: 10px 12px;
  border-radius: 10px;
  background: #fef3c7;
  color: #92400e;
  font-size: .85rem;
  line-height: 1.45;
}

.i4-privacy-error,
.i4-privacy-success {
  padding: 10px 12px;
  border-radius: 10px;
  font-size: .88rem;
}

.i4-privacy-error {
  background: #fee2e2;
  color: #991b1b;
}

.i4-privacy-success {
  background: #dcfce7;
  color: #166534;
}

.i4-privacy-error.hidden,
.i4-privacy-success.hidden {
  display: none !important;
}

.i4-actions {
  position: sticky;
  bottom: 0;
  z-index: 2;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 8px;
  background: inherit;
}

.i4-locked-card {
  max-width: 720px;
  margin: 1rem auto;
  padding: 28px;
  text-align: center;
}

.i4-lock-icon {
  width: 54px;
  height: 54px;
  margin: 0 auto 12px;
  border: 2px solid var(--brand, #2563eb);
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--brand, #2563eb);
}

.i4-lock-icon svg {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.i4-locked-card h3 {
  margin: 0 0 8px;
}

.i4-locked-card p {
  margin: 0;
  color: var(--muted, #64748b);
  line-height: 1.5;
}

.i4-guest-page {
  min-height: 100vh;
  box-sizing: border-box;
  padding: 32px 18px;
  background: var(--bg, #f1f5f9);
  color: var(--text, #0f172a);
}

.i4-guest-shell {
  width: min(900px, 100%);
  margin: 0 auto;
}

.i4-guest-top {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-bottom: 18px;
}

.i4-guest-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.2rem;
}

.i4-guest-mark {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 5px solid #2563eb;
  box-sizing: border-box;
}

.i4-guest-actions {
  display: flex;
  gap: 8px;
}

.i4-guest-profile {
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid var(--border, #e2e8f0);
  background: var(--surface, #fff);
  box-shadow: 0 20px 60px rgba(15,23,42,.12);
}

.i4-guest-cover {
  height: 250px;
  background:
    radial-gradient(circle at 20% 20%, rgba(37,99,235,.24), transparent 35%),
    linear-gradient(135deg, rgba(37,99,235,.18), rgba(59,130,246,.04));
  overflow: hidden;
}

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

.i4-guest-main {
  padding: 0 24px 24px;
}

.i4-guest-avatar {
  width: 126px;
  height: 126px;
  margin-top: -63px;
  border-radius: 50%;
  border: 5px solid var(--surface, #fff);
  background: #dbeafe;
  object-fit: cover;
  box-sizing: border-box;
  box-shadow: 0 8px 24px rgba(15,23,42,.16);
}

.i4-guest-name {
  margin-top: 12px;
}

.i4-guest-name h1 {
  margin: 0;
  font-size: clamp(1.55rem, 4vw, 2.2rem);
}

.i4-guest-name p {
  margin: 4px 0 0;
  color: var(--muted, #64748b);
}

.i4-guest-bio {
  margin: 18px 0;
  line-height: 1.55;
  white-space: pre-wrap;
}

.i4-guest-about {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 10px;
  margin-top: 14px;
}

.i4-guest-about > div {
  padding: 12px;
  border-radius: 12px;
  background: var(--surface-2, #f8fafc);
  border: 1px solid var(--border, #e2e8f0);
}

.i4-guest-about small {
  display: block;
  margin-bottom: 3px;
  color: var(--muted, #64748b);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .03em;
}

.i4-guest-cta {
  margin-top: 20px;
  padding: 16px;
  border-radius: 12px;
  background: var(--brand-soft, #dbeafe);
  line-height: 1.5;
}

.i4-field-private {
  color: var(--muted, #64748b);
  font-style: italic;
}

.i4-privacy-inline {
  margin-top: 18px;
  padding: 14px;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 12px;
  background: var(--surface-2, #f8fafc);
}

.i4-privacy-inline h4 {
  margin: 0 0 6px;
}

.i4-privacy-inline p {
  margin: 0 0 10px;
  color: var(--muted, #64748b);
  line-height: 1.4;
}

@media (max-width: 680px) {
  .i4-privacy-backdrop {
    padding: 0;
    align-items: end;
  }

  .i4-privacy-card {
    max-height: 96vh;
    border-radius: 18px 18px 0 0;
  }

  .i4-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .i4-guest-cover {
    height: 180px;
  }

  .i4-guest-main {
    padding-inline: 16px;
  }

  .i4-guest-avatar {
    width: 104px;
    height: 104px;
    margin-top: -52px;
  }

  .i4-guest-about {
    grid-template-columns: 1fr;
  }
}
