/* =============================================
   blog.css — Estilos del Blog Interactivo
   Math & Beer Games
   ============================================= */

/* ── Sección de reacción y comentarios dentro del modal ── */
.blog-section {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  margin-top: 1.2rem;
  padding-top: 1rem;
}

.blog-section-title {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.6rem;
}

/* ── Botón de reacción (Brindis 🍻) ── */
.blog-react-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 183, 0, 0.08);
  border: 1px solid rgba(255, 183, 0, 0.25);
  border-radius: 20px;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 4px 14px;
  cursor: pointer;
  transition: all 0.25s ease;
  font-family: 'Inter', sans-serif;
}

.blog-react-btn:hover {
  background: rgba(255, 183, 0, 0.18);
  border-color: var(--accent-beer);
  color: var(--accent-beer);
  transform: scale(1.05);
}

.blog-react-btn.blog-reacted {
  background: rgba(255, 183, 0, 0.22);
  border-color: var(--accent-beer);
  color: var(--accent-beer);
}

@keyframes blog-pop {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.3); }
  100% { transform: scale(1); }
}
.blog-react-pop {
  animation: blog-pop 0.35s ease;
}

/* ── Lista de comentarios ── */
.blog-comments-list {
  max-height: 220px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-right: 4px;
  margin-bottom: 0.8rem;
}

.blog-comments-list::-webkit-scrollbar { width: 4px; }
.blog-comments-list::-webkit-scrollbar-track { background: transparent; }
.blog-comments-list::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 2px; }

.blog-comment {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 8px 12px;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.blog-comment-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.blog-nick {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent-beer);
}

.blog-time {
  font-size: 0.68rem;
  color: rgba(182, 189, 231, 0.5);
}

.blog-comment-text {
  margin: 0;
  font-size: 0.82rem;
  color: var(--text-main);
  line-height: 1.45;
  word-break: break-word;
}

.blog-loading, .blog-empty {
  font-size: 0.8rem;
  color: rgba(182, 189, 231, 0.5);
  text-align: center;
  padding: 12px 0;
}

/* ── Caja de escribir comentario ── */
.blog-input-row {
  display: flex;
  gap: 8px;
  align-items: flex-end;
}

.blog-comment-input {
  flex: 1;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  color: var(--text-main);
  font-family: 'Inter', sans-serif;
  font-size: 0.82rem;
  padding: 8px 12px;
  resize: none;
  min-height: 40px;
  max-height: 100px;
  transition: border-color 0.2s;
}

.blog-comment-input:focus {
  outline: none;
  border-color: var(--accent-math);
}

.blog-comment-input::placeholder { color: rgba(182, 189, 231, 0.45); }

.blog-send-btn {
  background: linear-gradient(135deg, var(--accent-math), #0088ff);
  border: none;
  border-radius: 10px;
  color: #fff;
  font-size: 1rem;
  width: 38px;
  height: 38px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s, opacity 0.2s;
  flex-shrink: 0;
}
.blog-send-btn:hover { transform: scale(1.1); opacity: 0.9; }

/* ── Login hint ── */
.blog-login-hint {
  font-size: 0.75rem;
  color: rgba(182, 189, 231, 0.45);
  text-align: center;
  margin-top: 4px;
}

.blog-nick-link {
  color: var(--accent-beer);
  font-weight: 600;
  text-decoration: none;
  transition: opacity 0.2s;
}
.blog-nick-link:hover { opacity: 0.75; text-decoration: underline; }

/* ── Próximas charlas: grid de tarjetas premium ── */
.upcoming-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
  width: 90%;
  max-width: 820px;
  margin-bottom: 1.2rem;
}

.upcoming-card {
  flex: 1 1 260px;
  text-align: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.upcoming-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(0,0,0,0.35) !important;
}

.upcoming-countdown {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.upcoming-time {
  font-family: 'Inter', monospace;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--accent-beer);
  letter-spacing: 0.04em;
}

/* ── Caja de suscripción integrada en próximas charlas ── */
.upcoming-subscribe-box {
  width: 90%;
  max-width: 560px;
  margin-bottom: 1.5rem;
}

.subscribe-inline-form {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-top: 10px;
}

.subscribe-inline-form input {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  color: var(--text-main);
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  padding: 9px 14px;
  min-width: 180px;
  flex: 1 1 180px;
  transition: border-color 0.2s;
}

.subscribe-inline-form input:focus {
  outline: none;
  border-color: var(--accent-beer);
}

.subscribe-inline-form input::placeholder { color: rgba(182, 189, 231, 0.5); }

#subscribe-btn {
  background: var(--accent-beer);
  color: #1a0b2e;
  border: none;
  border-radius: 10px;
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: 0.9rem;
  padding: 9px 20px;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.2s;
  white-space: nowrap;
}
#subscribe-btn:hover { opacity: 0.88; transform: scale(1.02); }
#subscribe-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.blog-subscribe-ok {
  color: #4ade80;
  font-size: 0.9rem;
  font-weight: 600;
}


/* ── Toast de notificación ── */
#blog-toast {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: rgba(32, 9, 40, 0.95);
  border: 1px solid rgba(255, 183, 0, 0.4);
  color: var(--text-main);
  font-size: 0.85rem;
  font-family: 'Inter', sans-serif;
  padding: 10px 22px;
  border-radius: 20px;
  opacity: 0;
  pointer-events: none;
  z-index: 9999;
  transition: opacity 0.3s ease, transform 0.3s ease;
  white-space: nowrap;
}

#blog-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
