/* NdA — Perfil (companion public view) · Design System v2
   -------------------------------------------------------------------------
   Re-skin of the mock "perfil" screen: sticky cover photo, name + meta,
   "Conversar" / "Favoritar" actions, bio, tags, and the period plan cards.
   Use ONLY the --v2-* tokens from theme-v2.css; never hardcode hex. The page
   sits inside .nda-shell so the floating bottom nav never covers content.
   ------------------------------------------------------------------------- */

/* ── Shared v2 button primitive ─────────────────────────────────────────────
   Token-only, defined once. Pill-leaning, weight 700. Primary = accent fill
   with white text; secondary = surface with a hairline. */
.nda-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 20px;
  border: 1px solid transparent;
  border-radius: 14px;
  font-family: var(--v2-font-body);
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  transition: background 150ms ease, border-color 150ms ease,
    transform 120ms ease, box-shadow 150ms ease;
}

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

.nda-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--v2-accent-soft);
}

.nda-btn--primary {
  background: var(--v2-accent);
  color: #fff;
  box-shadow: 0 12px 26px -16px var(--v2-shadow);
}

.nda-btn--primary:hover {
  background: var(--v2-accent-strong);
}

.nda-btn--secondary {
  background: var(--v2-surface);
  color: var(--v2-text);
  border-color: var(--v2-border);
}

.nda-btn--secondary:hover {
  background: var(--v2-surface2);
}

/* ── Page frame ─────────────────────────────────────────────────────────────
   Narrow editorial column, centered. No own bottom bar — the shell already
   reserves room for the floating pill nav. */
.nda-profile {
  max-width: 640px;
  margin: 0 auto;
  padding: 14px 16px 8px;
}

.nda-profile__loading {
  padding-top: 8px;
}

/* ── The sheet (stacked sections) ───────────────────────────────────────────*/
.nda-profile__sheet {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

/* ── Hero / cover ───────────────────────────────────────────────────────────
   Sticky so the face stays in view while the plans scroll past. The sticky
   top clears the app's sticky .nda-header. A soft scrim anchors the overlaid
   name + meta against any photo. */
.nda-profile__cover {
  position: sticky;
  top: 12px;
  z-index: 1;
  position: relative; /* allow absolutely-positioned children */
  aspect-ratio: 4 / 5;
  width: 100%;
  max-height: 62vh;
  overflow: hidden;
  border-radius: 22px;
  border: 1px solid var(--v2-border);
  background: var(--v2-surface2);
  box-shadow: 0 18px 44px -28px var(--v2-shadow);
  isolation: isolate;
}

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

.nda-profile__cover-img--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(160deg, var(--v2-accent-soft), var(--v2-surface2));
}

.nda-profile__cover-initial {
  font-family: var(--v2-font-title);
  font-size: 88px;
  line-height: 1;
  color: var(--v2-accent);
  opacity: 0.85;
}

/* Bottom-anchored scrim so the white caption stays legible over ANY photo.
   This dark gradient + the white caption below are theme-independent on
   purpose: they sit over the (theme-agnostic) cover photo, not over an app
   surface, so they must NOT follow --v2 light/dark tokens. */
.nda-profile__cover-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(20, 8, 12, 0.74) 0%,
    rgba(20, 8, 12, 0.34) 32%,
    rgba(20, 8, 12, 0) 58%
  );
  pointer-events: none;
}

.nda-profile__badges {
  position: absolute;
  top: 12px;
  left: 12px;
  display: flex;
  gap: 6px;
  z-index: 2;
}

.nda-profile__badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: var(--v2-radius-pill);
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  background: var(--v2-surface);
  color: var(--v2-text);
  border: 1px solid var(--v2-border);
  box-shadow: 0 8px 20px -14px var(--v2-shadow);
}

.nda-profile__badge--new {
  background: var(--v2-accent);
  color: #fff;
  border-color: transparent;
}

.nda-profile__badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--v2-accent);
}

.nda-profile__cover-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  padding: 18px 18px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.nda-profile__name {
  margin: 0;
  font-family: var(--v2-font-title);
  font-weight: 400;
  font-size: 34px;
  line-height: 1.05;
  color: #fff;
}

.nda-profile__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 12px;
  color: rgba(255, 255, 255, 0.92);
  font-size: 14px;
}

.nda-profile__city {
  font-weight: 600;
}

.nda-profile__rating {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.nda-profile__stars {
  color: var(--v2-gold);
  font-size: 14px;
  letter-spacing: 1px;
  line-height: 1;
}

.nda-profile__stars-empty {
  opacity: 0.4;
}

.nda-profile__rating-num {
  font-weight: 700;
}

.nda-profile__rating-count {
  color: rgba(255, 255, 255, 0.75);
  font-size: 13px;
}

/* ── Primary action bar ─────────────────────────────────────────────────────
   Conversar (primary, grows) + Favoritar (square-ish secondary toggle). */
.nda-profile__actions {
  display: flex;
  gap: 10px;
}

.nda-profile__action-chat {
  flex: 1 1 auto;
}

.nda-profile__action-glyph {
  font-size: 16px;
  line-height: 1;
}

.nda-profile__fav {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 18px;
  border-radius: 14px;
  background: var(--v2-surface);
  border: 1px solid var(--v2-border);
  color: var(--v2-text);
  font-family: var(--v2-font-body);
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  transition: background 150ms ease, border-color 150ms ease,
    color 150ms ease, transform 120ms ease;
}

.nda-profile__fav:hover {
  background: var(--v2-surface2);
}

.nda-profile__fav:active {
  transform: translateY(1px);
}

.nda-profile__fav:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--v2-accent-soft);
}

.nda-profile__fav-glyph {
  font-size: 17px;
  line-height: 1;
  color: var(--v2-accent);
}

.nda-profile__fav--on {
  background: var(--v2-accent-soft);
  border-color: var(--v2-accent);
  color: var(--v2-accent-strong);
}

.nda-profile__fav--on .nda-profile__fav-glyph {
  color: var(--v2-accent-strong);
}

/* ── Interest / tag chips ───────────────────────────────────────────────────*/
.nda-profile__chips {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.nda-profile__chip {
  padding: 7px 13px;
  border-radius: var(--v2-radius-pill);
  background: var(--v2-surface2);
  border: 1px solid var(--v2-border);
  color: var(--v2-text);
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
}

/* ── Generic sections (bio, plans, video, …) ────────────────────────────────*/
.nda-profile__section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.nda-profile__section-title {
  margin: 0;
  font-family: var(--v2-font-title);
  font-weight: 400;
  font-size: 24px;
  line-height: 1.1;
  color: var(--v2-text);
}

.nda-profile__section-hint {
  margin: -4px 0 0;
  font-size: 14px;
  color: var(--v2-soft);
}

.nda-profile__bio {
  margin: 0;
  font-size: 15.5px;
  line-height: 1.65;
  color: var(--v2-text);
}

.nda-profile__video {
  width: 100%;
  border-radius: 18px;
  border: 1px solid var(--v2-border);
  background: var(--v2-surface2);
  display: block;
}

/* ── Period plan cards ──────────────────────────────────────────────────────*/
.nda-plans {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.nda-plan {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px;
  background: var(--v2-surface);
  border: 1px solid var(--v2-border);
  border-radius: 20px;
  box-shadow: 0 14px 36px -28px var(--v2-shadow);
}

.nda-plan__head {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nda-plan__label {
  font-family: var(--v2-font-title);
  font-weight: 400;
  font-size: 22px;
  line-height: 1.1;
  color: var(--v2-text);
}

.nda-plan__tagline {
  font-size: 13.5px;
  color: var(--v2-soft);
}

.nda-plan__price {
  display: flex;
  align-items: baseline;
  gap: 4px;
  color: var(--v2-text);
}

.nda-plan__price-cur {
  font-size: 15px;
  font-weight: 700;
  color: var(--v2-soft);
}

.nda-plan__price-val {
  font-size: 27px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.nda-plan__desc {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  color: var(--v2-soft);
}

.nda-plan__cta {
  width: 100%;
  margin-top: 2px;
}

/* On wider viewports, lay the plans out two-up. */
@media (min-width: 560px) {
  .nda-plans {
    grid-template-columns: 1fr 1fr;
  }
}

/* ── Error / empty state ────────────────────────────────────────────────────*/
.nda-profile__error {
  margin-top: 28px;
  padding: 40px 24px;
  text-align: center;
  background: var(--v2-surface);
  border: 1px solid var(--v2-border);
  border-radius: 22px;
  box-shadow: 0 14px 36px -28px var(--v2-shadow);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.nda-profile__error-glyph {
  font-size: 40px;
  line-height: 1;
}

.nda-profile__error-title {
  margin: 6px 0 0;
  font-family: var(--v2-font-title);
  font-weight: 400;
  font-size: 24px;
  color: var(--v2-text);
}

.nda-profile__error-text {
  margin: 0 0 8px;
  max-width: 320px;
  font-size: 14.5px;
  color: var(--v2-soft);
}

/* ═══════════════════════════════════════════════════════════════════════════
   Own-profile editor (/profile) — lighter v2 token pass only. Structure and
   logic are untouched; this just rehomes colors, fonts, inputs, and buttons
   onto the v2 token surface so the editor visually belongs to DS v2.
   ═══════════════════════════════════════════════════════════════════════════ */
.page-profile {
  max-width: 760px;
  margin: 0 auto;
  padding: 20px 18px 8px;
}

/* Heading uses the shared .nda-page__title primitive (theme-v2.css); we only
   ensure the editor containers inherit v2 text/font. */
.profile-companion,
.profile-client {
  color: var(--v2-text);
  font-family: var(--v2-font-body);
}

.profile-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 8px;
}

.profile-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.profile-label {
  font-size: 14px;
  font-weight: 700;
  color: var(--v2-text);
}

.profile-hint {
  margin: 0;
  font-size: 13px;
  color: var(--v2-soft);
}

.profile-input {
  width: 100%;
  box-sizing: border-box;
  padding: 12px 14px;
  font-family: var(--v2-font-body);
  font-size: 15px;
  color: var(--v2-text);
  background: var(--v2-surface2);
  border: 1px solid var(--v2-border);
  border-radius: 12px;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.profile-input::placeholder {
  color: var(--v2-soft);
}

.profile-input:focus {
  outline: none;
  border-color: var(--v2-accent);
  box-shadow: 0 0 0 3px var(--v2-accent-soft);
}

.profile-input--desc {
  margin-top: 8px;
  resize: vertical;
  min-height: 64px;
}

.bio-counter {
  align-self: flex-end;
  font-size: 12px;
  color: var(--v2-soft);
}

.bio-counter--warn {
  color: var(--v2-accent);
  font-weight: 700;
}

.profile-section-title {
  margin: 8px 0 0;
  font-family: var(--v2-font-title);
  font-weight: 400;
  font-size: 22px;
  color: var(--v2-text);
}

.profile-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 600;
  color: var(--v2-text);
  cursor: pointer;
}

.profile-toggle input {
  width: 18px;
  height: 18px;
  accent-color: var(--v2-accent);
}

/* Locked payout block */
.payout-locked {
  padding: 16px;
  background: var(--v2-surface);
  border: 1px solid var(--v2-border);
  border-radius: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.payout-locked h3 {
  margin: 0;
  font-family: var(--v2-font-title);
  font-weight: 400;
  font-size: 20px;
  color: var(--v2-text);
}

.payout-field {
  margin: 0;
  font-size: 14px;
  color: var(--v2-text);
  word-break: break-all;
}

.payout-field strong {
  color: var(--v2-soft);
  font-weight: 700;
}

/* Save / feedback */
.profile-save-btn {
  align-self: flex-start;
  padding: 13px 22px;
  background: var(--v2-accent);
  color: #fff;
  border: none;
  border-radius: 14px;
  font-family: var(--v2-font-body);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 12px 26px -16px var(--v2-shadow);
  transition: background 150ms ease, transform 120ms ease;
}

.profile-save-btn:hover:not(:disabled) {
  background: var(--v2-accent-strong);
}

.profile-save-btn:active:not(:disabled) {
  transform: translateY(1px);
}

.profile-save-btn:disabled {
  opacity: 0.6;
  cursor: default;
}

.profile-save-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--v2-accent-soft);
}

.profile-error {
  margin: 0;
  padding: 10px 14px;
  font-size: 14px;
  color: var(--v2-accent-strong);
  background: var(--v2-accent-soft);
  border: 1px solid var(--v2-border);
  border-radius: 12px;
}

.profile-success {
  margin: 0;
  padding: 10px 14px;
  font-size: 14px;
  font-weight: 600;
  color: var(--v2-text);
  background: var(--v2-surface2);
  border: 1px solid var(--v2-border);
  border-radius: 12px;
}

/* Shared buttons inside the editor (outline / passkey) → v2 tokens */
.profile-companion .btn--outline,
.profile-client .btn--outline {
  align-self: flex-start;
  padding: 11px 18px;
  background: var(--v2-surface);
  color: var(--v2-text);
  border: 1px solid var(--v2-border);
  border-radius: 14px;
  font-family: var(--v2-font-body);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background 150ms ease;
}

.profile-companion .btn--outline:hover,
.profile-client .btn--outline:hover {
  background: var(--v2-surface2);
}

.profile-companion .btn--passkey,
.profile-client .btn--passkey {
  align-self: flex-start;
  padding: 12px 18px;
  background: var(--v2-accent);
  color: #fff;
  border: none;
  border-radius: 14px;
  font-family: var(--v2-font-body);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background 150ms ease;
}

.profile-companion .btn--passkey:hover:not(:disabled),
.profile-client .btn--passkey:hover:not(:disabled) {
  background: var(--v2-accent-strong);
}

.profile-companion .btn--passkey:disabled,
.profile-client .btn--passkey:disabled {
  opacity: 0.6;
  cursor: default;
}

/* Info / security blocks */
.profile-info,
.profile-security,
.security-passkey,
.security-password {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.profile-info {
  padding: 16px;
  background: var(--v2-surface);
  border: 1px solid var(--v2-border);
  border-radius: 18px;
  margin-top: 8px;
}

.profile-info p {
  margin: 0;
  font-size: 15px;
  color: var(--v2-text);
}

.profile-info strong {
  color: var(--v2-soft);
  font-weight: 700;
}

.profile-security {
  margin-top: 22px;
  gap: 14px;
}

.profile-security > h2 {
  margin: 0;
  font-family: var(--v2-font-title);
  font-weight: 400;
  font-size: 24px;
  color: var(--v2-text);
}

.security-hint {
  margin: 0;
  font-size: 14px;
  color: var(--v2-soft);
}

.security-status--ok {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: var(--v2-accent);
}

.security-message {
  margin: 0;
  font-size: 14px;
  color: var(--v2-soft);
}

/* ── Tabbed profile editor ───────────────────────────────────────────────────
   The pill tab bar + panel reuse the .nda-account__* classes (account.css), so
   the profile editor matches the Conta screen. These two wrappers only space the
   stacked sub-components inside the Mídia and Conta panels. */
.profile-midia-panel,
.profile-conta-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
