/**
 * Hello Plataforma · Header Component
 *
 * Estilos del header sticky para fan y creadora.
 * Se cargan desde functions.php cuando hay header presente.
 */


/* ============================================================
   HEADER BASE
   ============================================================ */

.hp-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.85);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 0.5px solid var(--hp-border-subtle);
  transition: background-color var(--hp-duration-normal) var(--hp-ease),
              border-color var(--hp-duration-normal) var(--hp-ease),
              box-shadow var(--hp-duration-normal) var(--hp-ease);
}

/* Cuando hay scroll: sombra sutil + borde más visible */
.hp-header.is-scrolled {
  background: rgba(255, 255, 255, 0.95);
  border-bottom-color: var(--hp-border-purple);
  box-shadow: 0 2px 12px -4px rgba(105, 73, 158, 0.08);
}

.hp-header-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  max-width: 100%;
  min-height: 56px;
}


/* ============================================================
   BOTÓN BACK
   ============================================================ */

.hp-header-back {
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border-radius: 8px;
  transition: background-color var(--hp-duration-normal) var(--hp-ease);
}

.hp-header-back:hover {
  background: var(--hp-bg-card);
}

.hp-header-back i {
  font-size: 22px;
  color: var(--hp-text-primary);
}


/* ============================================================
   CREATOR INFO (lado izquierdo)
   ============================================================ */

.hp-header-creator {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}

.hp-header-creator-info {
  min-width: 0;
  flex: 1;
}

.hp-header-creator-name {
  font-family: var(--hp-font-base);
  font-size: 14px;
  font-weight: 600;
  color: var(--hp-text-primary);
  margin: 0;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hp-header-creator-status {
  font-family: var(--hp-font-base);
  font-size: 11px;
  margin: 1px 0 0;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hp-header-status-online {
  color: var(--hp-green-success);
}

.hp-header-status-recent {
  color: var(--hp-text-secondary);
}

.hp-header-status-offline {
  color: var(--hp-text-tertiary);
}


/* ============================================================
   GREETING (creadora)
   ============================================================ */

.hp-header-greeting {
  flex: 1;
  min-width: 0;
}

.hp-header-greeting .hp-tag {
  margin: 0;
  display: block;
}

.hp-header-greeting-name {
  font-family: var(--hp-font-base);
  font-size: 18px;
  font-weight: 700;
  color: var(--hp-text-primary);
  margin: 2px 0 0;
  letter-spacing: -0.4px;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}


/* ============================================================
   TITLE (cuando se muestra título de pantalla)
   ============================================================ */

.hp-header-title,
.hp-header-title-creator {
  font-family: var(--hp-font-base);
  font-size: 14px;
  font-weight: 600;
  color: var(--hp-text-primary);
  margin: 0;
  flex: 1;
  text-align: center;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}


/* ============================================================
   ACCIONES (lado derecho)
   ============================================================ */

.hp-header-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.hp-header-action {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: none;
  background: var(--hp-bg-card);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: background-color var(--hp-duration-normal) var(--hp-ease),
              transform var(--hp-duration-fast) var(--hp-ease);
}

.hp-header-action:hover {
  background: var(--hp-border-subtle);
}

.hp-header-action:active {
  transform: scale(0.95);
}

.hp-header-action i {
  font-size: 18px;
  color: var(--hp-text-primary);
}


/* ============================================================
   BADGE DE NOTIFICACIONES
   ============================================================ */

.hp-header-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 8px;
  background: var(--hp-gradient-purple-button);
  color: #FFFFFF;
  font-family: var(--hp-font-base);
  font-size: 9px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  letter-spacing: 0;
  border: 1.5px solid var(--hp-bg-primary);
  font-feature-settings: 'tnum' 1, 'lnum' 1;
  box-shadow: 0 1px 3px rgba(105, 73, 158, 0.30);
}


/* ============================================================
   RESPONSIVE
   ============================================================ */

/* Tablet */
@media (min-width: 768px) {
  .hp-header-inner {
    padding: 14px 24px;
    max-width: 720px;
    margin: 0 auto;
  }
}

/* Desktop */
@media (min-width: 1024px) {
  .hp-header-inner {
    max-width: 960px;
  }
}


/* ============================================================
   PADDING-TOP DEL BODY PARA COMPENSAR HEADER STICKY
   Solo cuando el header está visible
   ============================================================ */

body.hp-has-sticky-header {
  /* No padding-top adicional porque el header es sticky desde el inicio,
     no fixed. Esto permite que el contenido empiece debajo naturalmente. */
}


/* ============================================================
   ELEMENTOR COMPATIBILITY
   Override de algunos estilos default de Hello Elementor
   ============================================================ */

/* Si Elementor mete su header genérico, lo escondemos cuando
   estamos usando el nuestro */
.hp-using-custom-header .site-header,
.hp-using-custom-header .elementor-location-header {
  display: none;
}
