/* ========= BASE / LAYOUT ========= */
.vp-dashboard-wrapper {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  background: #c2c2c2;
  padding: 20px;
  border-radius: 10px;
}

/* ========= SIDEBAR (ESCRITORIO) ========= */
.vp-tabs {
  display: flex;
  flex-direction: column;
  width: 220px;
  background: #1e1e1e;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.4);
  overflow: hidden;
}

.vp-tabs li {
  padding: 14px 18px;
  color: #ccc;
  cursor: pointer;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  transition: all 0.2s ease;
  background: transparent;
}

.vp-tabs li:hover {
  background: rgba(255,255,255,0.05);
  color: #fff;
}

.vp-tabs li.active {
  background: #1abc9c;
  color: #fff;
  font-weight: 600;
}

/* ========= CONTENIDO ========= */
.vp-content-area {
  flex: 1;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  padding: 20px;
}

/* Paneles */
.vp-tab-panel { display: none; }
.vp-tab-panel.is-active { display: block; }

/* ========= FORM / CONTROLES ========= */
.vp-tab input[type="text"],
.vp-tab input[type="url"] {
  display: block;
  width: 100%;
  max-width: 400px;
  margin: 10px 0 20px;
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 4px;
}

.vp-tab button {
  background: #1abc9c;
  color: #fff;
  border: none;
  padding: 10px 20px;
  border-radius: 4px;
  cursor: pointer;
}
.vp-tab button:hover { background: #16a085; }

/* 💫 Chips de categorías */
.vp-cat-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
  justify-content: center;
}
.vp-cat-chip {
  display: inline-block;
  padding: 10px 14px;
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 20px;
  background: #000;
  color: #ffffff;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.25s ease;
  user-select: none;
}
.vp-cat-chip:hover { background: #23232; }
.vp-cat-chip.active {
  background: linear-gradient(145deg, #1db954, #17a84b);
  border-color: #1db954;
  color: #fff;
  transform: scale(1.05);
  box-shadow: 0 0 12px rgba(29,185,84,0.5);
  font-weight: 500;
}
.vp-cat-chip:active { transform: scale(0.95); }
.vp-cat-limit-msg {
  margin-top: 10px;
  font-size: 14px;
  color: #aaa;
  text-align: center;
}

/* ========= BOTÓN HAMBURGUESA ========= */
.vp-menu-toggle {
  display: none;
  position: fixed;
  top: 15px;
  left: 15px;
  z-index: 2001;
  background: #1abc9c;
  color: #fff;
  border: none;
  padding: 10px 14px;
  font-size: 20px;
  border-radius: 4px;
  cursor: pointer;
}



/* ===== Campos, avatar y bio ===== */
#vp_short_bio {
  width: 100%;
  max-width: 480px;
  min-height: 80px;
  padding: 10px;
  font-size: 15px;
  border: 1px solid #ccc;
  border-radius: 6px;
  resize: vertical;
}
#vp_short_bio:focus {
  border-color: #1db954;
  box-shadow: 0 0 6px rgba(29,185,84,0.4);
  outline: none;
}
.vp-counter {
  display: block;
  margin-top: 5px;
  font-size: 13px;
  color: #aaa;
  text-align: right;
  max-width: 480px;
}

/* ===== País ===== */
.vp-field select[name="vp_country"] {
  display: block;
  width: 100%;
  max-width: 480px;
  padding: 8px 10px;
  margin-bottom: 18px;
  border: 1px solid #ccc;
  border-radius: 6px;
  background: #fff;
}

/* ===== Campos ===== */
.vp-field {
  display: block;
  width: 100%;
  max-width: 480px;
  margin-bottom: 18px;
}

/* ===== Categorías públicas ===== */
.vp-public-categories {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}
.vp-public-cat {
  background: #fff;
  color: #000;
  border-radius: 16px;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 500;
  border: 1px solid #ddd;
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

/* ===== Botón flotante ===== */
.vp-floating-btn {
  position: fixed !important;
  bottom: 20px; right: 20px;
  background: #1db954;
  color: #fff;
  font-weight: 600;
  padding: 14px 22px;
  border-radius: 50px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.25);
  text-decoration: none;
  font-size: 15px;
  z-index: 999999 !important;
  transition: all .3s ease;
  display: inline-block;
}
.vp-floating-btn:hover { background: #17a74a; transform: translateY(-3px); }

/* ===== Bio Section ===== */
.vp-bio-section {
  margin-top: 20px;
  padding: 16px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.vp-bio-section h2 { margin-bottom: 12px; font-size: 20px; color: #222; }

.vp-toggle-btn {
  flex: 1;
  padding: 12px 14px;
  border: 1px solid #ddd;
  background: #ffffff;
  color: #333;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.25s ease;
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.vp-toggle-btn.active {
  background: #1abc9c;
  color: #fff;
  border-color: #1abc9c;
}

/* ===== Vista previa YouTube / Spotify ===== */
.vp-preview iframe {
  width: 100%;
  max-width: 460px;
  height: 260px;
  border: none;
  border-radius: 10px;
  margin-top: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  animation: fadeIn 0.4s ease forwards;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ========= MÓVIL (≤ 768px) ========= */
@media (max-width: 768px) {
  .vp-menu-toggle { display: block; }

  html, body { overflow-x: hidden !important; }

  .vp-tabs {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    height: 100vh !important;
    width: 270px !important;            /* ancho fijo un poco mayor */
    max-width: 85vw !important;         /* seguridad en pantallas muy estrechas */
    background: #2c3e50 !important;
    transform: translateX(-140%) !important;  /* se va totalmente */
    transition: transform .35s ease !important;
    z-index: 10001 !important;
    padding-top: 60px !important;
    box-shadow: 2px 0 8px rgba(0,0,0,.3);
    overflow-y: auto !important;
    border-radius: 0 !important;        /* sin esquinas redondeadas que “delaten” borde */
  }

  .vp-tabs.active { transform: translateX(0) !important; }

  /* Overlay */
  .vp-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.6);
    z-index: 10000 !important;
    opacity: 0;
    transition: opacity .3s ease;
    pointer-events: none;
  }
  .vp-overlay.visible {
    display: block;
    opacity: .7;
    pointer-events: auto;
  }

  /* Evita mover el contenido al abrir */
  body.vp-menu-open { overflow: hidden !important; }
}


/* === FIX: Eliminar espacio transparente al abrir el menú === */
@media (max-width: 768px) {
  /* Asegura que el menú empiece pegado al borde izquierdo */
  .vp-tabs {
    transform: translateX(-140%) !important; /* cuando está cerrado */
    left: 0 !important;
    margin: 0 !important;
    padding-left: 0 !important; /* elimina cualquier sangría del <ul> */
  }

  /* Cuando el menú está abierto */
  .vp-tabs.active {
    transform: translateX(0%) !important; /* sin separación */
    left: 0 !important;
  }

  /* Refuerzo adicional */
  .vp-tabs li {
    margin: 0 !important;
    padding-left: 18px !important;
  }
}

/* === FIX: Scroll del contenido en móviles (dashboard bloqueado) === */
@media (max-width: 768px) {

  /* 1️⃣ Permitir que el contenido crezca en vertical */
  .vp-dashboard-wrapper {
    display: block !important;
    height: auto !important;
    overflow: visible !important;
    padding-bottom: 80px; /* espacio de seguridad para botones flotantes */
  }

  /* 2️⃣ Asegurar que el área de contenido pueda desplazarse */
  .vp-content-area {
    height: auto !important;
    overflow-y: visible !important;
    display: block !important;
  }

  /* 3️⃣ Eliminar restricciones heredadas de escritorio */
  html, body {
    height: auto !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }
}


/* === Arreglo de imagen de perfil en móviles === */
@media (max-width: 768px) {
  /* Contenedor principal del avatar + input */
  .vp-field > div[style*="display:flex"][style*="position:relative"] {
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px !important;
  }

  /* Cuadro que contiene la imagen */
  .vp-field > div[style*="display:flex"][style*="position:relative"] > div[style*="width:80px"][style*="height:80px"] {
    width: 120px !important;
    height: 120px !important;
    margin: 0 auto !important;
  }

  /* Imagen circular centrada */
  #vp-avatar-preview {
    width: 120px !important;
    height: 120px !important;
    object-fit: cover !important;
    border-radius: 50% !important;
    border: 2px solid #ddd !important;
    display: block !important;
    margin: 0 auto !important;
  }

  /* Input debajo, centrado */
  .vp-field > div[style*="flex-direction:column"][style*="gap:4px"] {
    align-items: center !important;
    text-align: center !important;
    width: 100% !important;
  }

  #vp_avatar {
    margin-top: 8px !important;
    display: inline-block !important;
    max-width: 90% !important;
  }

  /* Previene que la bandera se agrande */
  #vp_country_flag {
    width: auto !important;
    height: 1em !important;
    vertical-align: middle !important;
    margin-left: 6px !important;
  }
}

/* === Centrar botón "Seleccionar archivo" debajo del avatar (solo móvil) === */
@media (max-width: 768px) {
  #vp_avatar {
    display: block !important;
    margin: 8px auto 0 auto !important; /* ← centra horizontalmente */
    text-align: center !important;
  }

  /* Asegura que el contenedor de inputs también esté centrado */
  .vp-field > div[style*="flex-direction:column"][style*="gap:4px"] {
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
  }
}

/* ========= 🧩 Redes Sociales (inputs globales) ========= */

/* 🖥️ Escritorio: alineados a la izquierda, tamaño completo */
form input[type="url"][name^="vp_"] {
  display: block !important;
  width: 100% !important;
  max-width: 480px !important;
  margin: 10px 0 18px 0 !important; /* alineado con otros campos */
  padding: 10px 14px !important;
  border: 1px solid #ccc !important;
  border-radius: 6px !important;
  font-size: 15px !important;
  color: #333 !important;
  background: #fff !important;
  box-sizing: border-box !important;
}

/* 📱 Móviles: ocupan ancho total y centrados */
@media (max-width: 768px) {
  form input[type="url"][name^="vp_"] {
    width: 100% !important;
    max-width: 100% !important;
    font-size: 16px !important;
    padding: 12px 14px !important;
    margin: 10px auto 16px auto !important; /* centrado solo en móvil */
  }
}

/* ========= 🧭 Ajuste final del botón de menú móvil ========= */
.vp-menu-toggle {
  position: fixed;
  top: 15px;
  left: 15px;
  z-index: 10050 !important; /* 🔝 siempre sobre el sidebar y overlay */
  background: #1abc9c;
  color: #fff;
  border: none;
  padding: 10px 14px;
  font-size: 20px;
  border-radius: 4px;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,0.25);
  transition: background 0.3s ease;
}

.vp-menu-toggle:hover {
  background: #16a085;
}

/* Evita que los títulos queden tapados en móvil */
@media (max-width: 768px) {
  .vp-tab-content,
  .vp-content-area {
    position: relative;
    z-index: 1;
    padding-top: 60px !important; /* espacio seguro */
  }

  .vp-tabs {
    z-index: 10001 !important; /* Sidebar */
  }

  .vp-overlay {
    z-index: 10000 !important; /* Fondo oscuro */
  }
}

/* ========= 🎨 Títulos estilo 'Anton' unificados en Dashboard ========= */
.vp-dashboard-wrapper h2,
.vp-dashboard-wrapper .entry-content :where(h2) {
  font-size: 3.5rem !important;
  font-weight: 400 !important;
  font-family: 'Anton', sans-serif !important;
  line-height: 1.2em !important;
  text-transform: uppercase !important;
  color: #000 !important; /* Ajusta según fondo oscuro */
  margin-bottom: 20px !important;
  letter-spacing: 1px;
}

/* Para fondos claros (si cambias el esquema visual del dashboard) */
.vp-dashboard-wrapper.light h2,
.vp-dashboard-wrapper.light .entry-content :where(h2) {
  color: #000 !important;
}

/* ===== Corrección de alineación para pestaña Biografía ===== */
.vp-bio-section {
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  border-radius: 0 !important;
}

.vp-bio-section h2 {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

/* Ajusta el bloque de botones dentro */
.vp-media-selector {
  margin-top: 10px;
}

/* ============================================================
   ✅ Estilo refinado de pestaña Biografía (YouTube / Spotify)
   ============================================================ */

/* Contenedor de botones */
.vp-media-selector {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start; /* 👈 ahora a la izquierda en escritorio */
  gap: 10px;
  margin: 20px 0;
}

/* Botones */
.vp-toggle-btn {
  flex: none;                    /* evita que se estiren ni en alto ni ancho */
  width: auto;                   /* ancho natural */
  min-width: 180px;              /* tamaño visual estable */
  padding: 10px 16px;            /* altura normal */
  font-size: 15px;
  border: 1px solid #ccc;
  background: #fff;
  color: #333;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.25s ease;
  font-weight: 600;
  text-align: center;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  line-height: 1.3;
}

.vp-toggle-btn.active {
  background: #1abc9c;
  color: #fff;
  border-color: #1abc9c;
  transform: scale(1.02);
}

.vp-toggle-btn:hover {
  background: #16a085;
  color: #fff;
}

/* Campos YouTube / Spotify */
.vp-media-field {
  margin-top: 20px;
}

.vp-media-field label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
  color: #333;
}

.vp-media-field input[type="url"],
.vp-media-field textarea {
  display: block;
  width: 100%;
  max-width: 480px;
  padding: 10px 12px;
  font-size: 15px;
  border: 1px solid #ccc;
  border-radius: 6px;
  background: #fff;
  color: #000;
  box-sizing: border-box;
}

/* Efecto focus */
.vp-media-field input:focus,
.vp-media-field textarea:focus {
  border-color: #1abc9c;
  box-shadow: 0 0 5px rgba(26,188,156,0.3);
  outline: none;
}

/* Responsivo */
@media (max-width: 768px) {
  .vp-media-selector {
    flex-direction: column;
    align-items: center;
    justify-content: center; /* 👈 centrado solo en móvil */
  }

  .vp-toggle-btn {
    width: 100%;
    max-width: 480px;        /* evita que crezca más del necesario */
    padding: 12px 14px;
    font-size: 15px;
    border-radius: 6px;
  }

  .vp-media-field input[type="url"],
  .vp-media-field textarea {
    width: 100%;
    max-width: 100%;
  }
}

/* === Ajustes generales del editor de biografía (TinyMCE) === */
#wp-vp_bio_long-wrap .wp-editor-container {
  position: relative;
}

/* Placeholder general */
.vp-bio-placeholder-outer {
  position: absolute;
  top: 46px;
  left: 14px;
  right: 14px;
  color: rgba(0, 0, 0, 0.45);
  font-size: 15px;
  line-height: 1.6;
  pointer-events: none;
  user-select: none;
  font-style: italic;
  font-family: 'Helvetica Neue', Arial, sans-serif;
  z-index: 5;
  transition: opacity 0.25s ease;
}
.vp-bio-placeholder-outer.hidden {
  opacity: 0;
  visibility: hidden;
}

/* Contador */
#vp_bio_long_counter {
  display: block;
  text-align: right;
  margin-top: 6px;
  font-size: 13px;
  color: #999;
}

/* 🔧 Ajuste directo del iframe interno del editor */
#wp-vp_bio_long-wrap iframe {
  min-height: 250px !important; /* altura base */
  width: 100% !important;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

/* === Responsivo (móviles ≤ 768px) === */
@media (max-width: 768px) {
  #wp-vp_bio_long-wrap iframe {
    min-height: 250px !important; /* 🟢 altura real ampliada en móviles */
  }

  .vp-bio-placeholder-outer {
    top: 90px !important;
    font-size: 14px;
    line-height: 1.5;
  }
}

/* ===========================
   ✨ BIOGRAFÍA - Leer más con efecto suave tipo Instagram
=========================== */
.vp-public-bio {
  position: relative;
  max-height: 320px; /* Altura inicial visible */
  overflow: hidden;
  transition: max-height 0.6s ease-in-out;
}

/* 🔸 Efecto degradado borroso */
.vp-public-bio::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100px;
  background: linear-gradient(to bottom, rgba(18,18,18,0), rgba(18,18,18,0.92) 60%, rgba(18,18,18,1) 100%);
  backdrop-filter: blur(2px);
  pointer-events: none;
  transition: opacity 0.5s ease;
  opacity: 1;
}

/* 🔹 Al expandir, quitamos el degradado */
.vp-public-bio.expanded {
  max-height: 9999px;
  overflow: visible;
}

.vp-public-bio.expanded::after {
  opacity: 0;
}

/* 🔹 Botón Leer más / Cerrar */
.vp-readmore-btn {
  display: block;
  margin: 22px auto 0;
  background: #1abc9c;
  color: #fff;
  border: none;
  padding: 11px 26px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.vp-readmore-btn:hover {
  background: #16a085;
  transform: translateY(-1px);
}

/* 🔹 Responsivo: menor altura inicial en móviles */
@media (max-width: 768px) {
  .vp-public-bio {
    max-height: 220px;
  }

  .vp-public-bio::after {
    height: 80px;
    background: linear-gradient(to bottom, rgba(18,18,18,0), rgba(18,18,18,0.95) 60%, rgba(18,18,18,1) 100%);
  }
}

/* ===========================
/* ===========================
   🎨 Ajuste de espaciado + línea divisoria elegante
=========================== */
.vp-public-bio-section {
  margin-top: 24px !important;
  padding-top: 24px !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  position: relative;
}

/* 🔹 Línea divisoria superior */
.vp-public-bio-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 92%;
  height: 1px;
  background: linear-gradient(
    to right,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.25) 40%,
    rgba(255, 255, 255, 0.25) 60%,
    rgba(255, 255, 255, 0) 100%
  );
  opacity: 0.8;
}

/* 🔸 El título queda bien cerca del borde superior */
.vp-public-bio-section .vp-section-title {
  margin-top: 10px !important;
  margin-bottom: 18px !important;
  padding: 0 !important;
}

/* 🔸 Limpieza de margenes heredados */
.vp-public-bio-section > div {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

/* 🔹 Ajuste de espacio bajo las redes sociales */
.vp-social-links {
  margin-bottom: 10px !important;
  padding-bottom: 0 !important;
  text-align: center;
}

/* ===========================
   📱 Separación entre avatar y nombre — versión precisa
=========================== */
@media (max-width: 768px) {
  /* Contenedor del avatar */
  .vp-avatar {
    display: flex;
    justify-content: center;
    margin-bottom: 10px !important; /* 🔹 Espacio armonioso debajo de la imagen */
  }

  /* Imagen del avatar */
  #vp-avatar-preview {
    width: 120px !important;
    height: 120px !important;
    border-radius: 50%;
    border: 2px solid #ddd;
    object-fit: cover;
  }

  /* Bloque de nombre o alias del usuario (si existe) */
  .vp-user-info h1,
  .vp-user-info h2,
  .vp-display-name,
  .vp-username {
    margin-top: 0 !important;
    padding-top: 0 !important;
  }
}

/* ======== TÍTULO "Bio:" en Perfil Público ======== */
.vp-bio-label {
    margin: 0 0 14px 0;
    font-family: "Anton", sans-serif; /* si ya la usas para títulos */
    font-size: 1.6rem; /* Más presencia */
    font-weight: 400;
    color: #ffffff; /* Blanco pleno */
    text-align: left !important;
    letter-spacing: 0.5px;
    line-height: 1.2;
    display: inline-block;
    position: relative;
}

/* Barra inferior decorativa */
.vp-bio-label::after {
    content: "";
    display: block;
    width: 40px;
    height: 3px;
    background: linear-gradient(90deg, #1abc9c, transparent);
    margin-top: 4px;
    border-radius: 2px;
}

/* Blindaje: evitar centrado heredado de HTML pegado */
.vp-public-bio,
.vp-public-bio * {
    text-align: left !important;
}

/* Quitar el brillo solo en "Bio:" */
.vp-bio-label {
    text-shadow: none !important;
    -webkit-font-smoothing: antialiased; /* mejora contorno */
    -moz-osx-font-smoothing: grayscale;
}

