/* Voice notes and short clips on a message.
   Shared by the card compose page, the group write page, and the wall. */

.fw-add-media {
  display: grid;
  gap: 14px;
}

.fw-ico {
  width: 20px;
  height: 20px;
  flex: none;
}

/* Beats .fw-kudo-body p, which otherwise flattens the label and hint
   to the same size as a written message. */
.fw-add-media .fw-add-label {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--board-ink, #2c2434);
}

.fw-add-media .fw-add-hint {
  margin: -10px 0 0;
  font-size: 15px;
  line-height: 1.5;
  color: var(--board-muted, #6b6577);
}

.fw-add-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.fw-add-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 1.5px solid rgba(58, 24, 79, 0.16);
  border-radius: 16px;
  padding: 13px 18px;
  background: #fff;
  color: var(--board-ink, #2c2434);
  font-family: inherit;
  font-weight: 700;
  font-size: 15px;
  line-height: 1.2;
  cursor: pointer;
  transition: border-color 0.14s ease, box-shadow 0.14s ease, transform 0.14s ease;
}

.fw-add-btn:hover {
  border-color: rgba(58, 24, 79, 0.4);
  transform: translateY(-1px);
}

.fw-add-btn .fw-ico {
  color: #6b4b86;
}

.fw-add-flag {
  display: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #3f8f5c;
  color: #fff;
  align-items: center;
  justify-content: center;
}

.fw-ico-tick {
  width: 12px;
  height: 12px;
  stroke-width: 2.4;
}

.fw-add-btn.is-set {
  border-color: #2a103b;
  background: #2a103b;
  color: #fff;
  box-shadow: 0 6px 16px rgba(42, 16, 59, 0.22);
}

.fw-add-btn.is-set .fw-ico {
  color: #e0b33a;
}

.fw-add-btn.is-set .fw-add-flag {
  display: inline-flex;
}

.fw-add-swap {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(224, 179, 58, 0.16);
  font-size: 14px;
  line-height: 1.5;
  color: #6d4a12;
}

.fw-add-panel {
  display: grid;
  gap: 16px;
  padding: 20px;
  border: 1.5px solid rgba(58, 24, 79, 0.12);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 10px 26px rgba(42, 16, 59, 0.08);
}

.fw-add-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.fw-add-head h3 {
  flex: 1;
  margin: 0;
  font-size: 16px;
  font-weight: 800;
  color: var(--board-ink, #2c2434);
}

.fw-add-head .fw-ico {
  color: #6b4b86;
}

.fw-add-x {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(58, 24, 79, 0.07);
  color: var(--board-ink, #2c2434);
  cursor: pointer;
}

.fw-add-x:hover {
  background: rgba(58, 24, 79, 0.14);
}

.fw-add-panel audio,
.fw-add-panel video {
  width: 100%;
  border-radius: 12px;
}

.fw-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1.5px solid rgba(58, 24, 79, 0.18);
  border-radius: 999px;
  padding: 10px 17px;
  background: #fff;
  color: var(--board-ink, #2c2434);
  font-family: inherit;
  font-weight: 700;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
}

.fw-chip:hover {
  border-color: rgba(58, 24, 79, 0.42);
}

.fw-chip .fw-ico {
  width: 17px;
  height: 17px;
}

.fw-chip.is-danger {
  color: #9a3b3b;
  border-color: rgba(154, 59, 59, 0.28);
}

.fw-chip.is-danger:hover {
  border-color: #9a3b3b;
  background: rgba(154, 59, 59, 0.06);
}

.fw-voice {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 14px 16px;
  background: linear-gradient(135deg, #2a103b, #4a2260);
  color: #fff;
}

.fw-voice-play {
  width: 42px;
  height: 42px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #e0b33a;
  cursor: pointer;
  appearance: none;
  line-height: 0;
}

.fw-voice-play span {
  display: block;
  width: 0;
  height: 0;
  margin-left: 3px;
  border-style: solid;
  border-width: 8px 0 8px 13px;
  border-color: transparent transparent transparent #2a103b;
}

.fw-voice.is-playing .fw-voice-play span {
  width: 12px;
  height: 14px;
  margin: 0;
  border: 0;
  background: #2a103b;
  clip-path: polygon(0 0, 35% 0, 35% 100%, 0 100%, 0 0, 65% 0, 100% 0, 100% 100%, 65% 100%, 65% 0);
}

.fw-voice-wave {
  grid-column: 2;
  grid-row: 1;
  display: flex;
  align-items: center;
  gap: 3px;
  height: 26px;
  pointer-events: none;
}

.fw-voice-wave i {
  flex: 1;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.34);
  height: 30%;
}

.fw-voice-wave i:nth-child(3n) { height: 72%; }
.fw-voice-wave i:nth-child(3n + 1) { height: 48%; }
.fw-voice-wave i:nth-child(4n) { height: 92%; }

.fw-voice.is-playing .fw-voice-wave i {
  background: #e0b33a;
  animation: fw-voice-bounce 0.9s ease-in-out infinite;
}

.fw-voice-wave i:nth-child(2n) { animation-delay: 0.12s; }
.fw-voice-wave i:nth-child(3n) { animation-delay: 0.24s; }
.fw-voice-wave i:nth-child(5n) { animation-delay: 0.36s; }

@keyframes fw-voice-bounce {
  0%, 100% { transform: scaleY(0.6); }
  50% { transform: scaleY(1.25); }
}

@media (prefers-reduced-motion: reduce) {
  .fw-voice.is-playing .fw-voice-wave i { animation: none; }
}

.fw-voice-seek {
  grid-column: 2;
  grid-row: 1;
  width: 100%;
  margin: 0;
  opacity: 0;
  accent-color: #e0b33a;
  cursor: pointer;
}

.fw-voice:hover .fw-voice-seek,
.fw-voice:focus-within .fw-voice-seek {
  opacity: 1;
}

.fw-voice:hover .fw-voice-wave,
.fw-voice:focus-within .fw-voice-wave {
  opacity: 0;
}

.fw-voice-time {
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  opacity: 0.9;
}

.fw-voice figcaption {
  grid-column: 1 / -1;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.6;
}

.fw-rec {
  display: grid;
  gap: 12px;
}

.fw-rec-stage {
  display: grid;
  gap: 12px;
}

.fw-rec-cam-wrap {
  position: relative;
}

.fw-rec-cam {
  width: 100%;
  border-radius: 12px;
  background: #140a1c;
  transform: scaleX(-1);
}

.fw-rec-live {
  position: absolute;
  left: 10px;
  top: 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(10, 4, 16, 0.66);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
}

.fw-rec-live::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ff5a5a;
  animation: fw-rec-pulse 1.1s ease-in-out infinite;
}

.fw-rec-controls {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.fw-rec-go {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  border: 0;
  border-radius: 999px;
  padding: 13px 22px;
  background: #2a103b;
  color: #fff;
  font-family: inherit;
  font-weight: 700;
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
}

.fw-rec-go:hover {
  background: #3d1a55;
}

.fw-rec-go .fw-ico-dot {
  width: 14px;
  height: 14px;
  color: #ff6b6b;
}

.fw-rec-go.is-stop {
  background: #c23b3b;
}

.fw-rec-go.is-stop:hover {
  background: #a83232;
}

.fw-rec-go.is-stop .fw-ico {
  width: 14px;
  height: 14px;
}

.fw-rec-timer {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--board-ink, #2c2434);
}

.fw-rec-timer i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #ff5a5a;
  animation: fw-rec-pulse 1.1s ease-in-out infinite;
}

@keyframes fw-rec-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

@media (prefers-reduced-motion: reduce) {
  .fw-rec-timer i,
  .fw-rec-live::before { animation: none; }
}

.fw-rec-limit {
  font-size: 14px;
  color: var(--board-muted, #6b6577);
}

.fw-rec-preview {
  display: grid;
  gap: 12px;
}

.fw-rec-preview-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.fw-rec-note {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--board-muted, #6b6577);
}

.fw-rec-note.is-warn {
  color: #9a3b3b;
}

.fw-player {
  position: relative;
  margin: 0;
  background: #140a1c;
}

.fw-player:fullscreen,
.fw-player:-webkit-full-screen {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
}

.fw-player:fullscreen video,
.fw-player:-webkit-full-screen video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.fw-player video {
  display: block;
  width: 100%;
  height: auto;
  vertical-align: middle;
}

.fw-player-big {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 64px;
  height: 64px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.92);
  transform: translate(-50%, -50%);
  cursor: pointer;
  appearance: none;
  line-height: 0;
}

.fw-player-big span {
  display: block;
  width: 0;
  height: 0;
  margin: 0 0 0 3px;
  border-style: solid;
  border-width: 11px 0 11px 18px;
  border-color: transparent transparent transparent #2a103b;
}

.fw-player.is-playing .fw-player-big {
  opacity: 0;
  pointer-events: none;
}

.fw-player-bar {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 28px 10px 10px;
  background: linear-gradient(180deg, transparent, rgba(10, 4, 16, 0.78));
  color: #fff;
  opacity: 0;
  transition: opacity 0.18s ease;
}

.fw-player:hover .fw-player-bar,
.fw-player.is-playing .fw-player-bar,
.fw-player:focus-within .fw-player-bar {
  opacity: 1;
}

.fw-player-toggle,
.fw-player-mute,
.fw-player-full {
  border: 0;
  background: transparent;
  color: #fff;
  font-family: inherit;
  font-weight: 700;
  font-size: 11px;
  line-height: 1;
  letter-spacing: 0.02em;
  cursor: pointer;
  padding: 0;
}

.fw-player-seek {
  flex: 1;
  min-width: 0;
  accent-color: #e0b33a;
}

.fw-player-time {
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  opacity: 0.88;
}
