/*
 * cards.css — Additional card styles for multi-page layout.
 * Base card styles are in css/components/wall.css.
 */

/* Card link wrapper — no text decoration */
.card-link {
  display: block;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

.card-link:hover .card {
  transform: translateY(-8px) rotate(0deg) scale(1.02);
  z-index: 5;
}

/* Large card (permalink page) */
.card--large {
  padding: var(--space-3xl) var(--space-2xl);
}

.card--large .card__text {
  font-size: clamp(1.2rem, 2.5vw, 1.6rem);
  line-height: 1.8;
  margin-bottom: var(--space-2xl);
}

/* Feed sentinel */
.feed-sentinel {
  display: flex;
  justify-content: center;
  padding: var(--space-2xl) 0;
  min-height: 60px;
}

/* Category pill on card */
.card__category {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 0.65rem;
  text-transform: lowercase;
  letter-spacing: 0.08em;
  color: var(--color-text-dim);
  padding: 2px 8px;
  border: 1px solid var(--color-glass-border);
  border-radius: var(--radius-full);
  margin-right: auto;
}

/* Reactions display in card meta */
.card__reactions {
  font-family: var(--font-sans);
  font-size: 0.7rem;
  color: var(--color-text-dim);
}

.card__time {
  font-family: var(--font-sans);
  font-size: 0.7rem;
  color: var(--color-text-muted);
}

/* === Ritual Effects === */

/* Candle — warm golden glow, animated flicker */
.card--highlighted {
  border-color: rgba(218, 165, 32, 0.35);
  box-shadow:
    0 0 15px rgba(218, 165, 32, 0.12),
    0 0 40px rgba(218, 165, 32, 0.06),
    inset 0 0 30px rgba(218, 165, 32, 0.03);
  animation: candleFlicker 3s ease-in-out infinite;
}

@keyframes candleFlicker {
  0%, 100% { box-shadow: 0 0 15px rgba(218, 165, 32, 0.12), 0 0 40px rgba(218, 165, 32, 0.06); }
  50% { box-shadow: 0 0 20px rgba(218, 165, 32, 0.18), 0 0 50px rgba(218, 165, 32, 0.09); }
}

/* Ritual badge — top-right indicator */
.card__ritual-badge {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  font-size: 0.65rem;
  padding: 2px 6px;
  border-radius: 8px;
  letter-spacing: 0.04em;
  font-weight: 600;
  text-transform: uppercase;
  pointer-events: none;
}

/* Candle badge */
.card--highlighted .card__ritual-badge {
  background: rgba(218, 165, 32, 0.15);
  color: #daa520;
  border: 1px solid rgba(218, 165, 32, 0.25);
}

/* Altar — boosted, rises above the rest */
.card--boosted {
  border-color: rgba(200, 50, 50, 0.3);
  box-shadow:
    0 4px 20px rgba(200, 50, 50, 0.1),
    0 0 40px rgba(200, 50, 50, 0.05);
  transform: rotate(var(--rotation, 0deg)) scale(1.02);
}

.card--boosted .card__ritual-badge {
  background: rgba(200, 50, 50, 0.15);
  color: #c83232;
  border: 1px solid rgba(200, 50, 50, 0.25);
}

/* Eternal flame — highlighted + boosted, permanent, strongest effect */
.card--highlighted.card--boosted {
  border-color: rgba(218, 165, 32, 0.4);
  box-shadow:
    0 0 20px rgba(218, 165, 32, 0.15),
    0 4px 30px rgba(200, 50, 50, 0.1),
    0 0 60px rgba(218, 165, 32, 0.05);
  animation: eternalFlame 4s ease-in-out infinite;
}

@keyframes eternalFlame {
  0%, 100% {
    box-shadow: 0 0 20px rgba(218, 165, 32, 0.15), 0 4px 30px rgba(200, 50, 50, 0.1);
  }
  33% {
    box-shadow: 0 0 25px rgba(218, 165, 32, 0.22), 0 4px 35px rgba(200, 50, 50, 0.14);
  }
  66% {
    box-shadow: 0 0 18px rgba(218, 165, 32, 0.12), 0 4px 25px rgba(200, 50, 50, 0.08);
  }
}

.card--highlighted.card--boosted .card__ritual-badge {
  background: linear-gradient(135deg, rgba(218, 165, 32, 0.2), rgba(200, 50, 50, 0.2));
  color: #daa520;
  border: 1px solid rgba(218, 165, 32, 0.3);
}

/* === Audio Button === */
.audio-btn {
  background: none;
  border: none;
  color: var(--color-text-dim, #444);
  cursor: pointer;
  padding: 2px 4px;
  margin-left: auto;
  transition: color 0.3s ease, transform 0.2s ease;
  display: inline-flex;
  align-items: center;
  line-height: 1;
}

.audio-btn:hover {
  color: var(--color-text-muted, #888);
  transform: scale(1.2);
}

/* Speaking state — waveform pulse */
.card--speaking {
  position: relative;
}

.card--speaking .audio-btn {
  color: #8b0000;
  animation: audio-pulse 1s ease-in-out infinite;
}

.card--speaking::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(139, 0, 0, 0.6) 20%,
    rgba(139, 0, 0, 0.9) 50%,
    rgba(139, 0, 0, 0.6) 80%,
    transparent 100%
  );
  animation: audio-wave 1.5s ease-in-out infinite;
}

@keyframes audio-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.3); }
}

@keyframes audio-wave {
  0% { transform: scaleX(0.3); opacity: 0.5; }
  50% { transform: scaleX(1); opacity: 1; }
  100% { transform: scaleX(0.3); opacity: 0.5; }
}

/* === Chain Badge === */
.card__chain-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-family: var(--font-sans);
  font-size: 0.65rem;
  color: var(--color-text-dim, #444);
  text-decoration: none;
  transition: color 0.3s ease;
}

.card__chain-badge:hover {
  color: #8b0000;
}

.card__chain-badge svg {
  opacity: 0.6;
}

/* Expiry badge */
.card__expiry-badge {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  font-family: var(--font-sans);
  font-size: 0.6rem;
  color: #c83232;
  padding: 2px 6px;
  border-radius: 8px;
  background: rgba(200, 50, 50, 0.1);
  border: 1px solid rgba(200, 50, 50, 0.2);
  pointer-events: none;
}
