/* ========================================================
   TARJETAS DE CONFESIÓN Y MODO SPOILER - LIVE ECHOES
   Diseño sobrio, editorial y centrado en la lectura auténtica
   ======================================================== */

.confession-card {
  position: relative;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background-color: var(--card-theme-charcoal);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform var(--transition-normal), box-shadow var(--transition-normal), border-color var(--transition-normal);
}

.confession-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-medium);
}

/* Temas de Fondo Mate Curados (Colores sólidos y sobrios, no degradados fluorescentes) */
.confession-card.theme-midnight { background-color: var(--card-theme-charcoal); }
.confession-card.theme-cyberpunk { background-color: var(--card-theme-navy); }
.confession-card.theme-crimson { background-color: var(--card-theme-wine); }
.confession-card.theme-emerald { background-color: var(--card-theme-forest); }
.confession-card.theme-aurora { background-color: var(--card-theme-slate); }
.confession-card.theme-obsidian { background-color: var(--bg-surface); }

/* Encabezado de la Tarjeta */
.card-header {
  padding: 1rem 1.15rem 0.5rem 1.15rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.author-info {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.author-avatar {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-xs);
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
}

.author-meta {
  display: flex;
  flex-direction: column;
}

.author-alias-line {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.author-alias {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-primary);
}

.presence-indicator {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.presence-indicator.online {
  background-color: var(--accent-emerald);
}

.presence-indicator.offline {
  background-color: var(--text-tertiary);
}

.confession-time {
  font-size: 0.7rem;
  color: var(--text-tertiary);
}

.card-badges {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.badge-tag {
  font-size: 0.68rem;
  font-weight: 600;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-full);
  text-transform: capitalize;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}

.badge-spoiler {
  background: rgba(225, 29, 72, 0.1);
  border-color: rgba(225, 29, 72, 0.3);
  color: #fda4af;
}

/* ========================================================
   CUERPO DE LA TARJETA Y TIPOGRAFÍA EDITORIAL
   ======================================================== */
.card-body {
  padding: 0.5rem 1.15rem 1rem 1.15rem;
  flex: 1;
  position: relative;
}

.confession-text {
  font-size: 0.95rem;
  line-height: 1.55;
  color: #e4e4e7;
  word-break: break-word;
  white-space: pre-wrap;
  font-weight: 450;
}

.confession-image-wrapper {
  margin-top: 0.75rem;
  border-radius: var(--radius-sm);
  overflow: hidden;
  max-height: 260px;
  border: 1px solid var(--border-subtle);
}

.confession-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ========================================================
   MODO SPOILER - MANTENER PRESIONADO (Sensación táctil y limpia)
   ======================================================== */
.spoiler-container {
  position: relative;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  touch-action: manipulation;
}

.spoiler-content {
  transition: filter 0.2s ease, opacity 0.2s ease;
}

/* Estado desenfocado por defecto */
.spoiler-container:not(.revealed) .spoiler-content {
  filter: blur(14px);
  opacity: 0.25;
  pointer-events: none;
}

/* Capa de protección sobria estilo documento confidencial */
.spoiler-shield {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(14, 15, 20, 0.7);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border-radius: var(--radius-sm);
  cursor: pointer;
  z-index: 10;
  transition: opacity 0.2s ease, visibility 0.2s ease;
  padding: 1rem;
  text-align: center;
  border: 1px dashed var(--border-medium);
}

.spoiler-container.revealed .spoiler-shield {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.spoiler-icon {
  font-size: 1.35rem;
  margin-bottom: 0.35rem;
  color: var(--text-secondary);
}

.spoiler-cta {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-primary);
}

.spoiler-hint {
  font-size: 0.7rem;
  color: var(--text-tertiary);
  margin-top: 0.15rem;
}

/* Barra de progreso de pulsación */
.hold-progress-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  background: var(--text-primary);
  width: 0%;
}

.spoiler-container.holding .hold-progress-bar {
  animation: chargeHold 0.32s ease-in forwards;
}

@keyframes chargeHold {
  from { width: 0%; }
  to { width: 100%; }
}

/* Botón discreto para fijar lectura */
.btn-pin-spoiler {
  position: absolute;
  top: 8px;
  right: 8px;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-medium);
  color: var(--text-secondary);
  border-radius: var(--radius-full);
  padding: 0.2rem 0.55rem;
  font-size: 0.7rem;
  font-weight: 500;
  cursor: pointer;
  z-index: 15;
  transition: var(--transition-fast);
}

.btn-pin-spoiler:hover {
  color: var(--text-primary);
  border-color: var(--border-strong);
}

/* ========================================================
   PIE DE TARJETA: REACCIONES Y ACCIÓN 1-A-1
   ======================================================== */
.card-footer {
  padding: 0.75rem 1.15rem 0.9rem 1.15rem;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.reactions-bar {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  overflow-x: auto;
  scrollbar-width: none;
}

.reactions-bar::-webkit-scrollbar {
  display: none;
}

.reaction-btn {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  padding: 0.25rem 0.55rem;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.88rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition-fast);
}

.reaction-btn:hover {
  background: var(--bg-surface-elevated);
  border-color: var(--border-medium);
  color: var(--text-primary);
}

.reaction-btn:active {
  transform: scale(0.95);
}

.reaction-count {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-primary);
}

/* Acciones inferiores */
.card-bottom-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.btn-private-chat {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-medium);
  color: var(--text-primary);
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  transition: var(--transition-fast);
}

.btn-private-chat:hover:not(:disabled) {
  background: var(--bg-surface-hover);
  border-color: var(--border-strong);
}

.btn-private-chat.author-active {
  border-color: var(--accent-emerald);
}

.btn-private-chat:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.btn-report-confession {
  background: transparent;
  border: none;
  color: var(--text-tertiary);
  font-size: 0.76rem;
  cursor: pointer;
  padding: 0.25rem;
  border-radius: var(--radius-xs);
  transition: color var(--transition-fast);
}

.btn-report-confession:hover {
  color: var(--accent-red);
}
