/* Gather Musicians — özel ses oynatıcı (feed, önizleme) */
:root {
  /* Önceki 150px görsel + 150px ek dikey alan */
  --gm-audio-visual-min-height: 300px;
  --gm-audio-dock-height: 132px;
}

.gm-audio-player {
  position: relative;
  z-index: 2;
  pointer-events: auto;
  width: 100%;
  max-width: 100%;
  height: auto;
  min-height: 0;
  max-height: none;
  padding: 0;
  border-radius: 14px;
  background: var(--card, #fff);
  border: 1px solid var(--border, #e2e8f0);
  box-sizing: border-box;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* 4:3 görsel alanı (feed ses postları) */
.gm-audio-visual {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  min-height: var(--gm-audio-visual-min-height);
  flex-shrink: 0;
  overflow: hidden;
  background: linear-gradient(145deg, var(--gray-100, #f1f5f9) 0%, var(--gray-50, #f8fafc) 100%);
}

html.dark .gm-audio-visual {
  background: linear-gradient(145deg, #0f1524 0%, #1a2236 100%);
}

.gm-audio-artwork-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  pointer-events: none;
  filter: saturate(1.05);
}

.gm-audio-player--with-artwork .gm-audio-artwork-bg {
  opacity: 1;
}

/* Kapak görseli tıklanınca başlat/durdur — imleç ipucu */
.gm-audio-player--with-artwork .gm-audio-visual {
  cursor: pointer;
}

.gm-audio-visual-placeholder {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, var(--blue-50, #eff6ff) 0%, var(--gray-100, #f1f5f9) 100%);
  pointer-events: none;
}

html.dark .gm-audio-visual-placeholder {
  background: linear-gradient(145deg, #112240 0%, #1a2236 100%);
}

/* Dış halka + play — ortak merkez */
.gm-audio-visual-play-stack {
  position: relative;
  width: 5.25rem;
  height: 5.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: rgba(100, 116, 139, 0.45);
  pointer-events: none;
}

html.dark .gm-audio-visual-play-stack {
  color: rgba(148, 163, 184, 0.4);
}

.gm-audio-visual-ring {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
}

.gm-audio-visual-play-btn {
  position: relative;
  z-index: 2;
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3.5rem;
  height: 3.5rem;
  padding: 0;
  padding-left: 0.15rem;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.96);
  color: var(--blue-600, #2563eb);
  cursor: pointer;
  box-shadow: 0 4px 18px rgba(37, 99, 235, 0.2);
  transition: transform 0.12s, box-shadow 0.15s;
  font-family: inherit;
  box-sizing: border-box;
}

.gm-audio-visual-play-stack:hover .gm-audio-visual-play-btn {
  transform: scale(1.04);
  box-shadow: 0 6px 22px rgba(37, 99, 235, 0.28);
}

.gm-audio-visual-play-btn:active {
  transform: scale(0.96);
}

.gm-audio-visual-play-btn .gm-audio-btn-icon {
  font-size: 1.28rem;
  line-height: 1;
}

html.dark .gm-audio-visual-play-btn {
  background: rgba(30, 41, 59, 0.95);
  color: #93c5fd;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35);
}

.gm-audio-player.is-loading .gm-audio-visual-play-btn {
  opacity: 0.85;
}

.gm-audio-visual-scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(
    180deg,
    rgba(15, 23, 42, 0) 0%,
    rgba(15, 23, 42, 0.08) 55%,
    rgba(15, 23, 42, 0.22) 100%
  );
}

.gm-audio-player-body {
  position: relative;
  z-index: 2;
  flex: 0 0 auto;
  height: var(--gm-audio-dock-height);
  min-height: var(--gm-audio-dock-height);
  max-height: var(--gm-audio-dock-height);
  padding: 0.55rem 0.85rem 0.6rem;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  background: linear-gradient(145deg, var(--gray-50, #f8fafc) 0%, #fff 100%);
  border-top: 1px solid var(--border, #e2e8f0);
}

html.dark .gm-audio-player-body {
  background: linear-gradient(145deg, #121a2e 0%, #1a2236 100%);
  border-top-color: #2a3a5c;
}

html.dark .gm-audio-player {
  background: linear-gradient(145deg, #121a2e 0%, #1a2236 100%);
  border-color: #2a3a5c;
}

/* display:none ses metadata + play'i birçok tarayıcıda bozar */
.gm-audio-player .gm-audio-el {
  position: absolute;
  width: 0;
  height: 0;
  opacity: 0;
  pointer-events: none;
  left: -9999px;
}

.gm-audio-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text, #0f172a);
  margin: 0 0 0.35rem;
  flex-shrink: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

html.dark .gm-audio-label {
  color: #e8eeff;
}

.gm-audio-controls {
  position: relative;
  flex: 1 1 auto;
  min-height: 2.75rem;
  margin-bottom: 0.15rem;
  width: 100%;
}

.gm-audio-controls-main {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  pointer-events: none;
  z-index: 1;
}

.gm-audio-controls-main > * {
  pointer-events: auto;
}

.gm-audio-btn {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.1rem;
  min-width: 2.75rem;
  min-height: 2.75rem;
  padding: 0.35rem 0.5rem;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 12px;
  background: var(--card, #fff);
  color: var(--text, #334155);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.12s;
  font-family: inherit;
}

html.dark .gm-audio-btn {
  background: #0f1524;
  border-color: #2a3a5c;
  color: #c8d4f0;
}

.gm-audio-btn:hover {
  border-color: var(--blue-400, #60a5fa);
  background: var(--blue-50, #eff6ff);
}

html.dark .gm-audio-btn:hover {
  background: #112240;
}

.gm-audio-btn:active {
  transform: scale(0.96);
}

.gm-audio-btn--primary {
  min-width: 3.25rem;
  min-height: 3.25rem;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, var(--blue-500, #3b82f6), var(--blue-700, #1d4ed8));
  color: #fff;
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.35);
}

.gm-audio-btn--primary:hover {
  background: linear-gradient(135deg, #2563eb, #1e40af);
  color: #fff;
}

.gm-audio-btn-icon {
  font-size: 1.05rem;
  line-height: 1;
}

.gm-audio-btn--primary .gm-audio-btn-icon {
  font-size: 1.15rem;
}

.gm-audio-btn-sub {
  font-size: 0.58rem;
  font-weight: 600;
  opacity: 0.75;
  letter-spacing: 0.02em;
}

.gm-audio-btn--skip {
  min-width: 2.85rem;
  min-height: 2.75rem;
  padding: 0.4rem 0.55rem;
  border-radius: 10px;
}

.gm-audio-skip-label {
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

/* Yatay ses slider — akış dışı katman, buton merkezini kaydırmaz */
.gm-audio-volume-wrap {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  z-index: 2;
  pointer-events: auto;
  width: 5.5rem;
  height: 1.5rem;
  margin: 0;
  padding: 0;
}

.gm-audio-fader {
  display: flex;
  align-items: center;
  margin: 0;
  padding: 0;
  cursor: pointer;
}

.gm-audio-fader-input {
  -webkit-appearance: none;
  appearance: none;
  width: 5.5rem;
  height: 4px;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.18);
  cursor: pointer;
  outline: none;
  transition: opacity 0.15s, box-shadow 0.15s;
}

html.dark .gm-audio-fader-input {
  background: rgba(148, 163, 184, 0.14);
}

.gm-audio-fader-input::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 999px;
  background: transparent;
}

.gm-audio-fader-input::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 11px;
  height: 11px;
  margin-top: -3.5px;
  border-radius: 3px;
  background: rgba(71, 85, 105, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.45);
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.1);
  transition: transform 0.12s, background 0.12s;
}

html.dark .gm-audio-fader-input::-webkit-slider-thumb {
  background: rgba(203, 213, 225, 0.82);
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
}

.gm-audio-fader-input::-moz-range-track {
  height: 4px;
  border: none;
  border-radius: 999px;
  background: transparent;
}

.gm-audio-fader-input::-moz-range-thumb {
  width: 11px;
  height: 11px;
  border-radius: 3px;
  background: rgba(71, 85, 105, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.45);
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.1);
}

html.dark .gm-audio-fader-input::-moz-range-thumb {
  background: rgba(203, 213, 225, 0.82);
  border-color: rgba(255, 255, 255, 0.15);
}

.gm-audio-fader-input:hover::-webkit-slider-thumb {
  background: rgba(51, 65, 85, 0.85);
}

.gm-audio-fader-input:focus-visible {
  box-shadow: 0 0 0 2px rgba(100, 116, 139, 0.25);
}

.gm-audio-volume-wrap.is-muted .gm-audio-fader-input {
  opacity: 0.38;
}

.gm-audio-icon-pause[hidden],
.gm-audio-icon-play[hidden],
.gm-audio-icon-loading[hidden] {
  display: none !important;
}

.gm-audio-player.is-loading .gm-audio-btn--primary {
  opacity: 0.85;
}

.gm-audio-icon-loading {
  display: inline-block;
  animation: gm-audio-spin 0.85s linear infinite;
}

@keyframes gm-audio-spin {
  to { transform: rotate(360deg); }
}

.gm-audio-status {
  margin: 0.35rem 0 0;
  font-size: 0.72rem;
  color: #dc2626;
  text-align: center;
  line-height: 1.35;
}

.gm-audio-player.is-error .gm-audio-status {
  display: block;
}

.gm-audio-seek:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.gm-audio-progress {
  width: 100%;
  flex-shrink: 0;
}

.gm-audio-seek {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: var(--gray-200, #e2e8f0);
  outline: none;
  cursor: pointer;
  margin: 0 0 0.45rem;
}

html.dark .gm-audio-seek {
  background: #2a3a5c;
}

.gm-audio-seek::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--blue-600, #2563eb);
  border: 2px solid #fff;
  box-shadow: 0 1px 6px rgba(37, 99, 235, 0.45);
}

.gm-audio-seek::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--blue-600, #2563eb);
  border: 2px solid #fff;
}

.gm-audio-times {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  font-variant-numeric: tabular-nums;
  color: var(--muted, #64748b);
}

.post-media.post-media--audio {
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  overflow: visible !important;
  display: block !important;
  padding: 0 !important;
  background: transparent !important;
  margin-bottom: 12px;
}

.post-media.post-media--audio .gm-audio-player {
  width: 100%;
}

.feed-composer-audio-preview {
  display: block !important;
  margin-top: 8px;
  width: 100%;
}

.feed-composer-preview .gm-audio-player {
  margin-top: 0;
}

/* ── Ses toggle butonu: varsayılan gizli (masaüstünde slider zaten görünür) ── */
.gm-audio-vol-toggle {
  display: none !important;
}

@media (max-width: 640px) {
  /* Mobilde ses ayarı yok: telefon zaten kendi ses seviyesini kontrol eder */
  .gm-audio-vol-toggle,
  .gm-audio-volume-wrap {
    display: none !important;
  }
}
