/* ============================================
   CONFIGURACIÓN Y PRIVACIDAD (ecocfg-*)
   ============================================ */
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }

.ecocfg-header { padding: 12px 4px 8px; }
.ecocfg-titulo { font-size: 1.8rem; font-weight: 800; margin: 0 0 4px; color: #0F3D1E; }
.ecocfg-sub { color: #65676b; margin: 0 0 18px; font-size: .95rem; }
.ecocfg-search {
  position: relative;
  background: #f0f2f5;
  border-radius: 24px;
  padding: 10px 16px 10px 44px;
  display: flex;
  align-items: center;
}
.ecocfg-search-icon { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); font-size: 1rem; opacity: .6; }
.ecocfg-search input {
  background: transparent;
  border: 0;
  outline: none;
  flex: 1;
  font-size: .95rem;
  color: #050505;
  font-family: inherit;
}

.ecocfg-section { margin-top: 26px; }
.ecocfg-section-titulo { font-size: 1.05rem; font-weight: 700; color: #050505; margin: 0 0 12px; padding: 0 4px; }

.ecocfg-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}
.ecocfg-card {
  background: #f0f2f5;
  border: 0;
  border-radius: 12px;
  padding: 18px;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  transition: background .15s, transform .1s;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 130px;
}
.ecocfg-card:hover { background: #e4e6eb; }
.ecocfg-card:active { transform: scale(.98); }
.ecocfg-card-icon {
  width: 56px; height: 56px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
}
.ecocfg-card-icon-bloq { background: linear-gradient(135deg, #ff6b6b, #c62828); }
.ecocfg-card-icon-act  { background: linear-gradient(135deg, #ffb74d, #e65100); }
.ecocfg-card-icon-dark { background: linear-gradient(135deg, #4b5563, #1a1a1a); }
.ecocfg-card-icon-idioma { background: linear-gradient(135deg, #4fc3f7, #0277bd); }

.ecocfg-idioma-opt {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border: 2px solid #dadde1;
  border-radius: 10px;
  cursor: pointer;
  margin-bottom: 10px;
  transition: border-color .15s, background .15s;
}
.ecocfg-idioma-opt:has(input:checked) { border-color: var(--secondary, #4CAF50); background: #f6faf7; }
.ecocfg-idioma-opt input[type="radio"] { width: auto; margin: 0; transform: scale(1.2); }
.ecocfg-idioma-flag { font-size: 1.8rem; line-height: 1; }

.ecocfg-pwd-bar {
  height: 4px;
  background: #e4e6eb;
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 4px;
}
.ecocfg-pwd-bar-fill {
  height: 100%;
  width: 0;
  background: #c62828;
  border-radius: 2px;
  transition: width .2s, background .2s;
}
.ecocfg-card-title { font-size: 1rem; font-weight: 700; color: #050505; margin-bottom: 4px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ecocfg-card-desc { font-size: .85rem; color: #65676b; line-height: 1.4; }

.ecocfg-badge { background: var(--secondary, #4CAF50); color: #fff; font-size: .7rem; padding: 2px 8px; border-radius: 10px; font-weight: 700; }
.ecocfg-badge-off { background: #8a8d91; }
.ecocfg-badge-on  { background: #2e7d32; }

.ecocfg-accordion {
  background: #fff;
  border: 1px solid #dadde1;
  border-radius: 12px;
  margin-bottom: 10px;
  overflow: hidden;
}
.ecocfg-accordion[open] { box-shadow: 0 2px 6px rgba(0,0,0,.05); }
.ecocfg-accordion-head {
  padding: 14px 18px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  list-style: none;
  user-select: none;
}
.ecocfg-accordion-head::-webkit-details-marker { display: none; }
.ecocfg-accordion-titulo { font-size: 1rem; font-weight: 600; color: #050505; }
.ecocfg-accordion-chev { color: #65676b; transition: transform .2s; font-size: .95rem; }
.ecocfg-accordion[open] .ecocfg-accordion-chev { transform: rotate(180deg); }
.ecocfg-accordion-body { border-top: 1px solid #dadde1; border-radius: 0 !important; box-shadow: none !important; margin: 0 !important; }
.ecocfg-accordion-peligro { border-color: #f5c6c6; }

.ecocfg-bloq-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid #f0f2f5;
}
.ecocfg-bloq-item:last-child { border-bottom: 0; }
.ecocfg-bloq-avatar { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; }
.ecocfg-bloq-info { flex: 1; min-width: 0; }
.ecocfg-bloq-nombre { font-weight: 600; color: #050505; }

.ecocfg-act-item {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid #f0f2f5;
  text-decoration: none;
  color: inherit;
}
.ecocfg-act-item:last-child { border-bottom: 0; }
.ecocfg-act-item:hover { background: #f6faf7; }
.ecocfg-act-icon { width: 40px; height: 40px; border-radius: 50%; background: #f0f2f5; display: flex; align-items: center; justify-content: center; font-size: 1.1rem; flex-shrink: 0; }
.ecocfg-act-body { flex: 1; min-width: 0; }
.ecocfg-act-linea { color: #050505; margin-bottom: 4px; font-size: .92rem; }


/* ============================================
   LIGHTBOX FOTOS
   ============================================ */
.eco-lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.92);
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.eco-lightbox.abierto { display: flex; }
.eco-lightbox-img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 8px;
}
.eco-lightbox-cerrar,
.eco-lightbox-nav {
  position: absolute;
  background: rgba(255,255,255,.15);
  border: 0;
  color: #fff;
  width: 46px; height: 46px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  backdrop-filter: blur(10px);
  transition: background .18s;
}
.eco-lightbox-cerrar:hover,
.eco-lightbox-nav:hover { background: rgba(255,255,255,.28); }
.eco-lightbox-cerrar { top: 20px; right: 20px; }
.eco-lightbox-prev  { left: 20px; top: 50%; transform: translateY(-50%); }
.eco-lightbox-next  { right: 20px; top: 50%; transform: translateY(-50%); }
.eco-lightbox-info {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  color: #fff;
  font-size: .85rem;
  background: rgba(0,0,0,.5);
  padding: 6px 14px;
  border-radius: 20px;
}
@media (max-width: 600px) {
  .eco-lightbox-cerrar { top: 12px; right: 12px; width: 40px; height: 40px; }
  .eco-lightbox-nav { width: 40px; height: 40px; }
  .eco-lightbox-prev { left: 8px; }
  .eco-lightbox-next { right: 8px; }
}

/* Modal edición publicación */
.eco-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.6);
  z-index: 9500;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.eco-modal.abierto { display: flex; }
.eco-modal-card {
  background: #fff;
  border-radius: 14px;
  max-width: 520px;
  width: 100%;
  padding: 20px;
  box-shadow: 0 20px 60px rgba(0,0,0,.3);
}
.eco-modal-card h3 { margin: 0 0 14px; font-size: 1.1rem; }
.eco-modal-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 14px; }

.share-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.share-opt {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: #f0f2f5;
  border: 1px solid #dadde1;
  border-radius: 10px;
  color: #1a1a1a;
  text-decoration: none;
  cursor: pointer;
  font-size: .9rem;
  font-weight: 600;
  transition: background .15s, transform .15s;
}
.share-opt:hover { background: #e4e6eb; transform: translateY(-1px); }
.share-icon { font-size: 1.3rem; }
.share-copy { grid-column: 1 / -1; justify-content: center; background: #e8f5e9; color: #2e7d32; border-color: #c8e6c9; }
.share-copy:hover { background: #c8e6c9; }
@media (max-width: 500px) {
  .share-options { grid-template-columns: 1fr; }
}

/* ============================================
   NOTIFICACIONES DROPDOWN (topbar)
   ============================================ */
.notif-dropdown { position: relative; display: inline-block; }
.notif-trigger {
  position: relative;
  background: transparent;
  border: 0;
  padding: 4px 8px;
  cursor: pointer;
  color: inherit;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border-radius: 6px;
  transition: background .15s;
}
.notif-trigger:hover { background: rgba(255,255,255,.1); }
.notif-trigger-badge {
  position: absolute;
  top: -2px; right: -2px;
  background: #c62828;
  color: #fff;
  font-size: .65rem;
  font-weight: 700;
  min-width: 16px;
  height: 16px;
  border-radius: 8px;
  padding: 0 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.notif-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 360px;
  max-width: calc(100vw - 20px);
  max-height: 70vh;
  overflow-y: auto;
  background: #fff;
  color: #1a1a1a;
  border-radius: 12px;
  box-shadow: 0 8px 30px rgba(0,0,0,.18);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity .18s, transform .18s, visibility .18s;
  z-index: 1000;
  border: 1px solid #eef0f2;
}
.notif-dropdown.open .notif-panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.notif-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid #eef0f2;
  position: sticky; top: 0;
  background: #fff;
  z-index: 5;
  box-shadow: 0 1px 4px rgba(0,0,0,.04);
}
.notif-panel-head strong { font-size: 1.05rem; color: #1a1a1a; }
.notif-mark-all {
  background: transparent;
  border: 0;
  color: var(--color-acento, #4CAF50);
  font-size: .8rem;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 4px;
}
.notif-mark-all:hover { background: #f0f2f5; }
.notif-panel-lista { padding: 4px; }
.notif-item {
  display: flex;
  gap: 10px;
  padding: 12px;
  border-radius: 8px;
  cursor: pointer;
  color: #1a1a1a;
  text-decoration: none;
  transition: background .15s;
  position: relative;
}
.notif-item:hover { background: #f0f2f5; }
.notif-item.no-leida { background: #eef7ee; }
.notif-item.no-leida::before {
  content: '';
  position: absolute;
  left: 4px;
  top: 50%;
  transform: translateY(-50%);
  width: 6px; height: 6px;
  background: var(--color-acento, #4CAF50);
  border-radius: 50%;
}
.notif-item-icon {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: #e8f5e9;
  color: var(--color-primario, #0F3D1E);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1.1rem;
}
.notif-item-body { flex: 1; min-width: 0; }
.notif-item-titulo { font-weight: 600; font-size: .88rem; line-height: 1.3; color: #1a1a1a; }
.notif-item-mensaje { font-size: .82rem; color: #65676b; margin-top: 2px; line-height: 1.3; }
.notif-item-tiempo { font-size: .72rem; color: #6b7a70; margin-top: 4px; }
.notif-vacio {
  padding: 40px 20px;
  text-align: center;
  color: #65676b;
  font-size: .9rem;
}
@media (max-width: 700px) {
  .notif-panel {
    position: fixed;
    top: 50px;
    right: 8px;
    left: 8px;
    width: auto;
    max-width: none;
  }
}

/* ============================================
   BÚSQUEDA TOPBAR
   ============================================ */
.topbar-buscar {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,.12);
  border-radius: 20px;
  padding: 4px 12px;
  color: inherit;
  transition: background .18s, min-width .25s;
  min-width: 200px;
}
.topbar-buscar:focus-within {
  background: rgba(255,255,255,.22);
  min-width: 260px;
}
.topbar-buscar input {
  background: transparent;
  border: 0;
  outline: 0;
  color: inherit;
  font-size: .82rem;
  padding: 4px 0;
  width: 100%;
  flex: 1;
}
.topbar-buscar input::placeholder { color: rgba(255,255,255,.7); }
.topbar-buscar-panel {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: #fff;
  color: #1a1a1a;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,.18);
  padding: 6px;
  max-height: 400px;
  overflow-y: auto;
  z-index: 1500;
  display: none;
  min-width: 280px;
}
.topbar-buscar-panel.abierto { display: block; }
.topbar-buscar-item {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 8px 10px;
  border-radius: 8px;
  color: #1a1a1a;
  text-decoration: none;
  transition: background .15s;
}
.topbar-buscar-item:hover { background: #f0f2f5; }
.topbar-buscar-item img {
  width: 32px; height: 32px;
  border-radius: 50%;
  object-fit: cover;
}
.topbar-buscar-item strong { font-size: .88rem; }
.topbar-buscar-vacio {
  padding: 16px;
  text-align: center;
  color: #65676b;
  font-size: .85rem;
}
@media (max-width: 800px) {
  .topbar-buscar { display: none; }
}

