/* Seguir, seguidores y seguidos, y mensajes directos. Fondo blanco, íconos de línea, rosa para lo que se toca. */

/* El +/− de seguir y los íconos redondos de la charla. */
.seguir-btn {
  position: relative; display: inline-grid; place-items: center; width: 40px; height: 40px; padding: 0;
  border: 1px solid var(--linea, #dedcd6); border-radius: 50%; background: var(--papel, #fff); color: var(--tinta, #15344b);
  cursor: pointer; transition: color 160ms, background-color 160ms, border-color 160ms;
}
.seguir-btn:hover, .seguir-btn:focus-visible { color: var(--rosa-texto, #c2456d); border-color: var(--rosa, #e87094); }
.seguir-btn:focus-visible { outline: 2px solid var(--verde, #1f7a55); outline-offset: 2px; }
.seguir-btn .icono { width: 20px; height: 20px; }
.seguir-btn path { transform-box: fill-box; transform-origin: center; transition: transform 220ms cubic-bezier(.16, 1, .3, 1); }
.seguir-btn.sigo { color: var(--verde, #1f7a55); border-color: var(--verde, #1f7a55); }
.seguir-btn.sigo .seguir-v { transform: scaleY(0); }
.seguir-btn[disabled] { opacity: .55; cursor: progress; }
.seguir-fila { display: inline-flex; align-items: center; gap: 6px; }
.cabecera-pagina .seguir-fila { align-self: center; }

/* Los dos números del perfil: seguidores (personas) y seguidos (chequeo). */
.red-numero { display: inline-flex; align-items: center; gap: 4px; color: inherit; text-decoration: none; border-radius: 999px; }
.red-numero:hover, .red-numero:focus-visible { color: var(--rosa-texto, #c2456d); }
.red-numero[aria-current="page"] { color: var(--verde, #1f7a55); font-weight: 700; }
.red-numero .icono { width: 16px; height: 16px; }
.red-numeros { display: inline-flex; align-items: center; justify-content: center; gap: 14px; font-size: 13px; }
.perfil-numeros .red-numero .icono { width: 16px; height: 16px; }

/* Las listas. */
.red { max-width: 560px; margin: 0 auto; padding: 8px 0 40px; }
.red-cabecera { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 6px 4px 14px; border-bottom: 1px solid var(--linea, #dedcd6); }
.red-quien { color: var(--verde, #1f7a55); font-size: 17px; text-decoration: none; overflow-wrap: anywhere; }
.red-pestanas .red-numero { padding: 6px 10px; }
.red-pestanas .red-numero .icono { width: 20px; height: 20px; }
.red-lista { margin: 0; padding: 0; list-style: none; }
.red-lista li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 4px; border-bottom: 1px solid var(--papel-hondo, #f3f2ee); }
.red-persona { display: inline-flex; align-items: center; gap: 10px; min-width: 0; color: var(--tinta, #15344b); text-decoration: none; }
.red-persona:hover span { color: var(--rosa-texto, #c2456d); }
.red-persona .avatar { width: 40px; height: 40px; margin: 0; flex: none; }
.red-persona span { overflow-wrap: anywhere; }
.red-vacio { display: grid; place-items: center; color: var(--tinta-suave, #5e6763); }
.red-vacio .icono { width: 30px; height: 30px; }

/* Mensajes: bandeja a la izquierda y charla a la derecha; en pantallas angostas, una cosa por vez. */
.mensajes { display: grid; grid-template-columns: minmax(220px, 300px) 1fr; gap: 0; max-width: 980px; margin: 0 auto; min-height: 60vh;
  border: 1px solid var(--linea, #dedcd6); border-radius: 16px; background: var(--papel, #fff); overflow: hidden; }
.mensajes:not(.con-charla) { grid-template-columns: 1fr; max-width: 560px; }
.bandeja { border-right: 1px solid var(--linea, #dedcd6); overflow-y: auto; max-height: 75vh; }
.mensajes:not(.con-charla) .bandeja { border-right: 0; }
.bandeja ul { margin: 0; padding: 0; list-style: none; }
.bandeja-charla { position: relative; display: flex; align-items: center; gap: 10px; padding: 10px 14px; color: var(--tinta, #15344b); text-decoration: none; border-bottom: 1px solid var(--papel-hondo, #f3f2ee); }
.bandeja-charla:hover, .bandeja-charla[aria-current="page"] { background: var(--papel-hondo, #f3f2ee); }
.bandeja-charla .avatar { width: 40px; height: 40px; margin: 0; flex: none; }
.bandeja-texto { display: flex; flex-direction: column; min-width: 0; }
.bandeja-quien { color: var(--verde, #1f7a55); overflow-wrap: anywhere; }
.bandeja-ultimo { display: flex; align-items: center; gap: 4px; color: var(--tinta-suave, #5e6763); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bandeja-ultimo .icono, .bandeja-ultimo .fl { width: 14px; height: 14px; }
.sin-leer .bandeja-ultimo { color: var(--tinta, #15344b); font-weight: 700; }
.bandeja-charla .punto { margin-left: auto; flex: none; }

.charla { display: flex; flex-direction: column; min-width: 0; height: 75vh; }
.charla-cabecera { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-bottom: 1px solid var(--linea, #dedcd6); }
.charla-volver { display: none; }
.charla-mensajes { flex: 1 1 auto; display: flex; flex-direction: column; gap: 6px; margin: 0; padding: 14px 12px; list-style: none; overflow-y: auto; overscroll-behavior: contain; }
.msj { max-width: 78%; }
.msj.mio { align-self: flex-end; }
.msj.suyo { align-self: flex-start; }
.msj p { margin: 0; padding: 7px 12px; border-radius: 16px; font-size: 15px; line-height: 1.4; white-space: pre-wrap; overflow-wrap: anywhere; }
.msj.suyo p { background: var(--papel-hondo, #f3f2ee); border-bottom-left-radius: 5px; }
.msj.mio p { background: color-mix(in srgb, var(--rosa, #e87094) 16%, #fff); border-bottom-right-radius: 5px; }
.msj-gif { max-width: 220px; max-height: 220px; border-radius: 12px; }
.msj-foto { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--papel-hondo, #f3f2ee); color: var(--tinta, #15344b); }

.sticker { display: inline-grid; place-items: center; width: 72px; height: 72px; }
.sticker img { width: 72px; height: 72px; object-fit: contain; }
.sticker .fl { width: 60px; height: 60px; }
.sticker .fl.blanca { stroke-width: .6; }
.sticker-nanduti { width: 66px; height: 66px; }

.charla-escribir { position: relative; display: flex; align-items: center; gap: 6px; padding: 8px 10px; border-top: 1px solid var(--linea, #dedcd6); }
.charla-texto { display: flex; flex: 1 1 auto; gap: 6px; min-width: 0; margin: 0; }
.charla-texto input[type="text"] { flex: 1 1 auto; min-width: 0; height: 40px; padding: 0 14px; border: 1px solid var(--linea, #dedcd6); border-radius: 999px; background: var(--papel, #fff); font-size: 15px; }
.charla-texto input[type="text"]:focus { outline: 2px solid var(--verde, #1f7a55); outline-offset: 1px; }
.charla-stickers summary { list-style: none; }
.charla-stickers summary::-webkit-details-marker { display: none; }
.stickers-panel {
  position: absolute; z-index: 5; left: 8px; right: 8px; bottom: calc(100% + 6px); display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr));
  gap: 6px; max-height: 260px; margin: 0; padding: 10px; overflow-y: auto; border: 1px solid var(--linea, #dedcd6); border-radius: 14px;
  background: var(--papel, #fff); box-shadow: 0 10px 30px rgba(0, 0, 0, .14);
}
.stickers-panel button { display: grid; place-items: center; padding: 2px; border: 0; border-radius: 12px; background: none; cursor: pointer; }
.stickers-panel button:hover, .stickers-panel button:focus-visible { background: var(--papel-hondo, #f3f2ee); }
.stickers-panel .sticker, .stickers-panel .sticker img { width: 56px; height: 56px; }
.stickers-panel .sticker .fl { width: 46px; height: 46px; }
.stickers-panel .sticker-nanduti { width: 50px; height: 50px; }
.charla-gif { display: inline-flex; gap: 6px; }
.charla-gif label { cursor: pointer; }
.charla-gif input[type="file"] { position: absolute; width: 1px; height: 1px; opacity: 0; }
.js .charla-gif-mandar { display: none; }
.charla-candado { display: grid; place-items: center; padding: 12px; border-top: 1px solid var(--linea, #dedcd6); color: var(--tinta-suave, #5e6763); }
.charla-error { margin: 0; padding: 0 12px 8px; color: var(--rosa-texto, #c2456d); font-size: 13px; }

@media (max-width: 760px) {
  .mensajes { grid-template-columns: 1fr; border-radius: 12px; }
  .mensajes.con-charla .bandeja { display: none; }
  .charla-volver { display: inline-grid; }
  .charla { height: calc(100dvh - 140px); }
  .msj { max-width: 86%; }
}

/* La racha: el tajy encendido con los días; gris y latiendo si falta mi foto de hoy; dorado al año. */
.racha { display: inline-flex; align-items: center; gap: 3px; padding: 0 10px; min-height: 36px; border-radius: 999px; background: rgba(255,255,255,.94); color: var(--acento, #c2410c); font-weight: 700; font-size: 14px; }
.racha .fl { width: 20px; height: 20px; fill: var(--acento, #c2410c); }
.racha.en-riesgo { color: var(--tinta-suave, #56687a); }
.racha.en-riesgo .fl { fill: var(--tinta-suave, #56687a); opacity: .6; animation: racha-late 1.2s ease-in-out infinite; }
.racha.anio { color: #8e5a24; }
.racha.anio .fl { fill: #d9a21b; filter: drop-shadow(0 0 4px rgba(242,193,78,.8)); }
.bandeja-charla .racha { background: none; padding: 0 4px; min-height: 0; }
@keyframes racha-late { 50% { transform: scale(1.18); } }
@media (prefers-reduced-motion: reduce) { .racha.en-riesgo .fl { animation: none; } }
