/* =====================================================
   OLHAPAUTA — AUDIO PLAYER STYLES (SPRINT 16)
===================================================== */

.op-audio-player {
  width: 100%;
  padding: 15px 20px;
  background-color: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  margin: 20px 0 25px 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-sizing: border-box;
}

.op-audio-player-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: flex-start;
  flex-wrap: wrap;
}

/* Botões base */
.op-audio-btn {
  border: 0;
  outline: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s ease, transform 0.1s ease;
}

.op-audio-btn:active {
  transform: scale(0.97);
}

.op-audio-btn:focus-visible {
  outline: 3px solid rgba(229, 57, 53, 0.4);
  outline-offset: 2px;
}

/* Botão Play */
.op-audio-btn-play {
  background-color: #e53935; /* Vermelho padrão do tema */
  color: #ffffff;
  padding: 8px 16px;
  border-radius: 8px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  gap: 8px;
}

.op-audio-btn-play:hover {
  background-color: #d32f2f;
}

/* Botão Stop */
.op-audio-btn-stop {
  background-color: rgba(15, 23, 42, 0.05);
  color: #64748b;
  width: 32px;
  height: 32px;
  border-radius: 8px;
}

.op-audio-btn-stop:hover:not(:disabled) {
  background-color: rgba(229, 57, 53, 0.1);
  color: #e53935;
}

.op-audio-btn-stop:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Ícones */
.op-audio-icon {
  flex-shrink: 0;
  display: block;
}

/* Seletor de Velocidades */
.op-audio-speed-container {
  position: relative;
}

.op-audio-speed-toggle {
  background-color: rgba(15, 23, 42, 0.05);
  border: 1px solid rgba(15, 23, 42, 0.08);
  color: #475569;
  padding: 8px 12px;
  border-radius: 8px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s ease;
}

.op-audio-speed-toggle:hover {
  background-color: rgba(15, 23, 42, 0.08);
}

.op-audio-speed-toggle:focus-visible {
  outline: 3px solid rgba(229, 57, 53, 0.4);
  outline-offset: 2px;
}

.op-audio-speed-menu {
  position: absolute;
  bottom: 100%;
  left: 0;
  margin-bottom: 8px;
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.15);
  list-style: none;
  padding: 4px 0;
  margin: 0;
  width: 90px;
  z-index: 10;
}

.op-audio-speed-menu li {
  padding: 6px 12px;
  font-size: 12px;
  color: #334155;
  cursor: pointer;
  text-align: left;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.op-audio-speed-menu li:hover {
  background-color: #f1f5f9;
  color: #0f172a;
}

/* 4. Barra de Progresso */
.op-audio-progress-bar {
  width: 100%;
  height: 6px;
  background-color: rgba(15, 23, 42, 0.06);
  border-radius: 3px;
  overflow: hidden;
  position: relative;
}

.op-audio-progress-fill {
  height: 100%;
  background-color: #e53935;
  width: 0%;
  border-radius: 3px;
  transition: width 0.2s linear;
}

/* =====================================================
   SUPORTE AO MODO ESCURO (PREFERS-COLOR-SCHEME)
===================================================== */
@media (prefers-color-scheme: dark) {
  .op-audio-player {
    background-color: #1e293b;
    border-color: #334155;
  }

  .op-audio-btn-stop {
    background-color: rgba(255, 255, 255, 0.06);
    color: #94a3b8;
  }

  .op-audio-btn-stop:hover:not(:disabled) {
    background-color: rgba(229, 57, 53, 0.15);
    color: #ef4444;
  }

  .op-audio-speed-toggle {
    background-color: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.08);
    color: #cbd5e1;
  }

  .op-audio-speed-toggle:hover {
    background-color: rgba(255, 255, 255, 0.1);
  }

  .op-audio-speed-menu {
    background: #0f172a;
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  }

  .op-audio-speed-menu li {
    color: #94a3b8;
  }

  .op-audio-speed-menu li:hover {
    background-color: #1e293b;
    color: #ffffff;
  }

  .op-audio-progress-bar {
    background-color: rgba(255, 255, 255, 0.1);
  }

  .op-audio-progress-fill {
    background-color: #ef4444;
  }
}

/* Ajuste Responsivo Mobile */
@media (max-width: 480px) {
  .op-audio-player {
    padding: 12px 15px;
  }
  .op-audio-btn-play {
    padding: 8px 12px;
    font-size: 12px;
  }
}
