/* ===================================================================
   ParaMiWeb BuddyPress — Tooltips (addon)
   Se añade automáticamente desde buddypress-main.css
   =================================================================== */

.pmw-tooltip {
  position: fixed;
  z-index: 99999;
  background: var(--pmw-text, #1a2033);
  color: #fff;
  font-family: var(--pmw-font-body, 'DM Sans', sans-serif);
  font-size: 0.72rem;
  font-weight: 500;
  padding: 0.3rem 0.65rem;
  border-radius: var(--pmw-radius-sm, 0.375rem);
  pointer-events: none;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(0,0,0,.15);
  transform: translateY(0);
  transition: opacity 150ms ease, top 150ms ease;
}

.pmw-tooltip::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-bottom: none;
  border-top-color: var(--pmw-text, #1a2033);
}

/* Scroll reveal (clase añadida por JS) */
#buddypress ul.item-list li,
#buddypress .activity-item,
#bbpress-forums li.bbp-forum-info {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 300ms ease, transform 300ms ease;
}

#buddypress ul.item-list li.pmw-revealed,
#buddypress .activity-item.pmw-revealed,
#bbpress-forums li.bbp-forum-info.pmw-revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Grupo home layout */
.pmw-group-home {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: var(--pmw-gap-xl, 2rem);
  align-items: start;
}

.pmw-group-home__sidebar {
  position: sticky;
  top: var(--pmw-gap-xl, 2rem);
}

@media (max-width: 900px) {
  .pmw-group-home {
    grid-template-columns: 1fr;
  }
  .pmw-group-home__sidebar {
    position: static;
  }
}

/* ===================================================================
   SIDEBAR DE GRUPO
   =================================================================== */

.pmw-group-sidebar {
  display: flex;
  flex-direction: column;
  gap: var(--pmw-gap-md);
}

.pmw-sidebar-card {
  background: var(--pmw-surface);
  border: 1px solid var(--pmw-border);
  border-radius: var(--pmw-radius-lg);
  padding: var(--pmw-gap-lg);
  box-shadow: var(--pmw-shadow-sm);
}

.pmw-sidebar-card--action {
  text-align: center;
}

.pmw-sidebar-card--action .pmw-btn,
.pmw-sidebar-card--action a.button {
  width: 100%;
  justify-content: center;
}

.pmw-sidebar-title {
  font-family: var(--pmw-font-display);
  font-size: var(--pmw-text-sm);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--pmw-text-muted);
  margin: 0 0 var(--pmw-gap-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--pmw-gap-sm);
}

.pmw-sidebar-title__count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.4rem;
  height: 1.4rem;
  padding: 0 0.3rem;
  font-size: 0.65rem;
  font-weight: 700;
  background: var(--pmw-primary-light);
  color: var(--pmw-primary);
  border-radius: var(--pmw-radius-full);
}

.pmw-sidebar-text {
  font-size: var(--pmw-text-sm);
  line-height: 1.7;
  color: var(--pmw-text-muted);
  margin: 0;
}

.pmw-sidebar-avatars {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: var(--pmw-gap-md);
}

.pmw-sidebar-avatar-link {
  display: block;
  border-radius: var(--pmw-radius-md);
  overflow: hidden;
  transition: transform var(--pmw-duration) var(--pmw-ease);
}

.pmw-sidebar-avatar-link:hover {
  transform: scale(1.1);
}

.pmw-sidebar-avatar {
  width: 40px !important;
  height: 40px !important;
  object-fit: cover;
  display: block;
}

.pmw-sidebar-avatar--sm {
  width: 32px !important;
  height: 32px !important;
  border-radius: var(--pmw-radius-sm);
}

.pmw-sidebar-link {
  font-size: var(--pmw-text-xs);
  font-weight: 600;
  color: var(--pmw-primary);
  text-decoration: none;
}

.pmw-sidebar-link:hover {
  text-decoration: underline;
}

.pmw-sidebar-members-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--pmw-gap-xs);
}

.pmw-sidebar-member-link {
  display: flex;
  align-items: center;
  gap: var(--pmw-gap-sm);
  padding: var(--pmw-gap-xs) var(--pmw-gap-sm);
  border-radius: var(--pmw-radius-md);
  transition: background var(--pmw-duration) var(--pmw-ease);
  text-decoration: none;
}

.pmw-sidebar-member-link:hover {
  background: var(--pmw-primary-light);
}

.pmw-sidebar-member-name {
  font-size: var(--pmw-text-sm);
  font-weight: 500;
  color: var(--pmw-text);
  flex: 1;
}

/* Meta list */
.pmw-meta-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--pmw-gap-xs) var(--pmw-gap-md);
  margin: 0;
}

.pmw-meta-list dt {
  font-size: var(--pmw-text-xs);
  font-weight: 700;
  color: var(--pmw-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  align-self: center;
}

.pmw-meta-list dd {
  font-size: var(--pmw-text-xs);
  color: var(--pmw-text);
  margin: 0;
  align-self: center;
}

/* Badges admin/mod */
.pmw-badge--admin {
  background: #e0f2fe;
  color: #0369a1;
}

.pmw-badge--mod {
  background: #f0fdf4;
  color: #15803d;
}

/* ===================================================================
   FORMULARIO DE NUEVA ACTIVIDAD
   =================================================================== */

.pmw-activity-post-form {
  background: var(--pmw-surface);
  border: 1px solid var(--pmw-border);
  border-radius: var(--pmw-radius-xl);
  overflow: hidden;
  margin-bottom: var(--pmw-gap-xl);
  box-shadow: var(--pmw-shadow-sm);
}

.pmw-post-form-header {
  display: flex;
  gap: var(--pmw-gap-md);
  padding: var(--pmw-gap-lg);
}

.pmw-post-form-avatar {
  width: 44px !important;
  height: 44px !important;
  border-radius: var(--pmw-radius-md);
  object-fit: cover;
  flex-shrink: 0;
  display: block;
}

.pmw-post-form-input-wrap {
  flex: 1;
}

.pmw-post-form-input-wrap textarea {
  width: 100%;
  border: none;
  outline: none;
  font-family: var(--pmw-font-body);
  font-size: var(--pmw-text-base);
  resize: none;
  min-height: 80px;
  max-height: 300px;
  overflow-y: auto;
  background: transparent;
  color: var(--pmw-text);
  line-height: 1.6;
  padding: 0;
}

.pmw-post-form-input-wrap textarea::placeholder {
  color: var(--pmw-text-light);
}

#whats-new-submit {
  padding: var(--pmw-gap-sm) var(--pmw-gap-lg);
  background: var(--pmw-surface-2);
  border-top: 1px solid var(--pmw-border);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--pmw-gap-sm);
  flex-wrap: wrap;
}

.pmw-post-form-group {
  margin-right: auto;
  font-size: var(--pmw-text-sm);
  color: var(--pmw-text-muted);
  display: flex;
  align-items: center;
  gap: var(--pmw-gap-xs);
}

.pmw-post-form-group select {
  padding: 0.35rem 0.75rem;
  border-radius: var(--pmw-radius-md);
  border: 1.5px solid var(--pmw-border);
  font-family: var(--pmw-font-body);
  font-size: var(--pmw-text-sm);
  background: var(--pmw-surface);
  color: var(--pmw-text);
  outline: none;
  cursor: pointer;
}

/* ===================================================================
   NOTIFICACIONES
   =================================================================== */

.pmw-notifications-wrap {
  background: var(--pmw-surface);
  border: 1px solid var(--pmw-border);
  border-radius: var(--pmw-radius-xl);
  overflow: hidden;
  box-shadow: var(--pmw-shadow-sm);
}

.pmw-notifications-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--pmw-gap-lg) var(--pmw-gap-xl);
  border-bottom: 1px solid var(--pmw-border);
  background: var(--pmw-surface-2);
}

.pmw-section-title--sm {
  font-size: var(--pmw-text-lg);
  margin: 0;
}

.pmw-notifications-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.pmw-notification-item {
  display: flex;
  align-items: center;
  gap: var(--pmw-gap-md);
  padding: var(--pmw-gap-md) var(--pmw-gap-xl);
  border-bottom: 1px solid var(--pmw-border);
  transition: background var(--pmw-duration) var(--pmw-ease);
}

.pmw-notification-item:last-child {
  border-bottom: none;
}

.pmw-notification-item--unread {
  background: var(--pmw-primary-light);
  border-left: 3px solid var(--pmw-primary);
}

.pmw-notification-item:hover {
  background: var(--pmw-surface-2);
}

.pmw-notification-item--unread:hover {
  background: #dce9ff;
}

.pmw-notification-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: var(--pmw-primary-light);
  color: var(--pmw-primary);
  border-radius: var(--pmw-radius-md);
  flex-shrink: 0;
}

.pmw-notification-content {
  flex: 1;
  min-width: 0;
}

.pmw-notification-text {
  font-size: var(--pmw-text-sm);
  color: var(--pmw-text);
  margin: 0 0 0.2rem;
  line-height: 1.5;
}

.pmw-notification-time {
  font-size: var(--pmw-text-xs);
  color: var(--pmw-text-light);
}

.pmw-notification-actions {
  display: flex;
  gap: var(--pmw-gap-xs);
  flex-shrink: 0;
}

.pmw-notifications-empty {
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: var(--pmw-gap-2xl);
  color: var(--pmw-text-muted);
  background: transparent;
  border: none;
}

.pmw-notifications-empty svg {
  color: var(--pmw-text-light);
  margin-bottom: var(--pmw-gap-md);
}

/* ===================================================================
   HEADER: URL y nombre de perfil
   =================================================================== */

.pmw-profile-username {
  font-size: var(--pmw-text-sm);
  color: var(--pmw-text-muted);
  margin: 0;
  font-weight: 400;
}

.pmw-header-meta {
  display: flex;
  align-items: center;
  gap: var(--pmw-gap-xs);
  flex-wrap: wrap;
  margin-top: var(--pmw-gap-xs);
}

.pmw-header-meta-sep {
  color: var(--pmw-text-light);
}

.pmw-header-meta-item {
  font-size: var(--pmw-text-sm);
  color: var(--pmw-text-muted);
}

.pmw-header-name-wrap {
  align-self: flex-end;
  padding-bottom: var(--pmw-gap-xs);
}

.pmw-group-description {
  font-size: var(--pmw-text-sm);
  line-height: 1.7;
  color: var(--pmw-text-muted);
  margin: 0 0 var(--pmw-gap-md);
}

.pmw-profile-update {
  font-size: var(--pmw-text-sm);
  line-height: 1.6;
  color: var(--pmw-text-muted);
  margin: 0 0 var(--pmw-gap-md);
  font-style: italic;
}

.pmw-profile-info__actions {
  display: flex;
  flex-direction: column;
  gap: var(--pmw-gap-xs);
  flex-shrink: 0;
}

.pmw-profile-info__actions .pmw-btn,
.pmw-profile-info__actions a.button {
  white-space: nowrap;
}

/* ===================================================================
   FOROS — HEADER
   =================================================================== */

.pmw-forums-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--pmw-gap-lg) var(--pmw-gap-xl);
  border-bottom: 1px solid var(--pmw-border);
  background: var(--pmw-surface-2);
}

.pmw-forums-title {
  display: flex;
  align-items: center;
  gap: var(--pmw-gap-sm);
  font-family: var(--pmw-font-display);
  font-size: var(--pmw-text-lg);
  font-weight: 700;
  margin: 0;
  color: var(--pmw-text);
}

.pmw-bbpress-wrap {
  padding: var(--pmw-gap-lg);
}

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

@media (max-width: 768px) {
  .pmw-notifications-header {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--pmw-gap-sm);
  }

  .pmw-notification-item {
    padding: var(--pmw-gap-md);
  }

  .pmw-notification-actions {
    flex-direction: column;
  }

  .pmw-meta-list {
    grid-template-columns: 1fr;
  }

  .pmw-post-form-header {
    gap: var(--pmw-gap-sm);
  }

  .pmw-forums-header {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--pmw-gap-sm);
  }
}
