/* Public link pages (/e/{slug}) and the demo on /Enlaces. Standalone on purpose: the public
   page doesn't load Bootstrap or site.css, so it stays tiny and fast on mobile data. */

.pv-lp {
  --lp-bg: #15532d;
  --lp-text: #ffffff;
  --lp-muted: rgba(255, 255, 255, 0.78);
  --lp-btn-bg: #faf9f5;
  --lp-btn-text: #15532d;
  --lp-btn-hover: #ffffff;
  --lp-avatar-bg: #e3a72e;
  --lp-avatar-text: #1c1c1a;

  margin: 0;
  min-height: 100vh;
  background: var(--lp-bg);
  color: var(--lp-text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  display: flex;
  flex-direction: column;
}

.pv-lp.tema-claro {
  --lp-bg: #faf9f5;
  --lp-text: #1c1c1a;
  --lp-muted: #6b6b63;
  --lp-btn-bg: #ffffff;
  --lp-btn-text: #1c1c1a;
  --lp-btn-hover: #f1efe8;
  --lp-avatar-bg: #15532d;
  --lp-avatar-text: #ffffff;
}

.pv-lp.tema-oscuro {
  --lp-bg: #161816;
  --lp-text: #f2f2ee;
  --lp-muted: #a9aaa3;
  --lp-btn-bg: #262926;
  --lp-btn-text: #f2f2ee;
  --lp-btn-hover: #313531;
  --lp-avatar-bg: #3f9a60;
  --lp-avatar-text: #ffffff;
}

.pv-lp.tema-arena {
  --lp-bg: #efe3cc;
  --lp-text: #3b2f1e;
  --lp-muted: #74644c;
  --lp-btn-bg: #3b2f1e;
  --lp-btn-text: #fbf6ec;
  --lp-btn-hover: #544430;
  --lp-avatar-bg: #c9772b;
  --lp-avatar-text: #ffffff;
}

.pv-lp-inner {
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  padding: 48px 16px 24px;
  box-sizing: border-box;
  text-align: center;
  flex: 1;
}

.pv-lp-avatar {
  width: 88px;
  height: 88px;
  margin: 0 auto 16px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--lp-avatar-bg);
  color: var(--lp-avatar-text);
  font-size: 2.4rem;
  font-weight: 700;
}

img.pv-lp-avatar {
  display: block;
  object-fit: cover;
  background: #ffffff;
}

.pv-lp-title {
  font-size: 1.35rem;
  font-weight: 700;
  margin: 0 0 6px;
  overflow-wrap: anywhere;
}

.pv-lp-bio {
  color: var(--lp-muted);
  margin: 0 0 28px;
  font-size: 0.95rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.pv-lp-link {
  display: block;
  padding: 15px 18px;
  margin-bottom: 12px;
  border-radius: 12px;
  background: var(--lp-btn-bg);
  color: var(--lp-btn-text);
  text-decoration: none;
  font-weight: 600;
  overflow-wrap: anywhere;
  transition: background-color 0.15s, transform 0.15s;
}

/* Label stays centered; the platform icon sits at the left edge of the button. */
.pv-lp-link {
  position: relative;
  padding-left: 48px;
  padding-right: 48px;
}

.pv-lp-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  width: 22px;
  height: 22px;
  margin-top: -11px;
  fill: currentColor;
}

.pv-lp-icon .trazo {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.pv-lp-link:hover,
.pv-lp-link:focus-visible {
  background: var(--lp-btn-hover);
  transform: translateY(-1px);
}

@media (prefers-reduced-motion: reduce) {
  .pv-lp-link { transition: none; }
  .pv-lp-link:hover, .pv-lp-link:focus-visible { transform: none; }
}

.pv-lp-footer {
  text-align: center;
  padding: 16px 16px 28px;
  font-size: 0.8rem;
  line-height: 1.9;
}

.pv-lp-footer a {
  color: var(--lp-muted);
}

.pv-lp-report {
  opacity: 0.75;
}

/* Scaled-down demo on the /Enlaces landing */
.pv-lp-demo {
  max-width: 320px;
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid #e5e2da;
}

.pv-lp-demo .pv-lp {
  min-height: 0;
}

.pv-lp-demo .pv-lp-inner {
  padding: 32px 20px 20px;
}

.pv-lp-demo .pv-lp-avatar {
  width: 64px;
  height: 64px;
  font-size: 1.7rem;
}

.pv-lp-demo .pv-lp-bio {
  margin-bottom: 20px;
}

.pv-lp-demo .pv-lp-link {
  padding: 11px 42px;
  margin-bottom: 10px;
  font-size: 0.9rem;
}

/* Theme swatches in the editor */
.pv-theme-options {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.pv-theme-options label {
  cursor: pointer;
  text-align: center;
  font-size: 0.8rem;
}

.pv-theme-options input {
  position: absolute;
  opacity: 0;
}

.pv-theme-swatch {
  display: block;
  width: 56px;
  height: 40px;
  border-radius: 8px;
  border: 2px solid #e5e2da;
  margin: 0 auto 4px;
  min-height: 0;
  background: var(--lp-bg);
  position: relative;
}

.pv-theme-swatch::after {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  top: 15px;
  height: 8px;
  border-radius: 3px;
  background: var(--lp-btn-bg);
}

.pv-theme-options input:checked + .pv-theme-swatch {
  border-color: #15532d;
  box-shadow: 0 0 0 2px #15532d;
}

.pv-theme-options input:focus-visible + .pv-theme-swatch {
  outline: 2px solid #e3a72e;
  outline-offset: 2px;
}

.pv-logo-prev {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid #e5e2da;
}

.pv-logo-vacio {
  display: grid;
  place-items: center;
  background: #f1efe8;
  color: #6b6b63;
  font-weight: 700;
}

.pv-logo-vacio[hidden],
.pv-logo-prev[hidden] {
  display: none;
}

/* Editor on mobile: fixed bottom bar (preview + save) and full-screen preview */
.pv-editbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1020;
  display: flex;
  gap: 8px;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  background: #ffffff;
  border-top: 1px solid #e5e2da;
}

.pv-editbar .btn {
  flex: 1;
}

@media (max-width: 991.98px) {
  body:has(.pv-editbar) {
    padding-bottom: 72px;
  }
}

.pv-preview-modal {
  position: fixed;
  inset: 0;
  z-index: 1050;
  overflow-y: auto;
  background: #faf9f5;
}

.pv-preview-modal[hidden] {
  display: none;
}

.pv-preview-modal .pv-lp {
  min-height: 100vh;
}

.pv-preview-cerrar {
  position: fixed;
  top: 12px;
  right: 12px;
  z-index: 1;
}

.pv-link-row {
  padding-bottom: 8px;
  border-bottom: 1px solid #e5e2da;
}
