/* ═══════════════════════════════════════
   STORIED FLAVOURS — Global Player CSS
   ═══════════════════════════════════════ */

#global-audio-player {
  position: fixed;
  bottom: var(--space-4, 16px);
  right: var(--space-4, 16px);
  width: 380px;
  max-width: calc(100vw - var(--sidebar-width, 240px) - var(--space-8, 32px));
  z-index: 1000;
  background: linear-gradient(135deg, rgba(255, 253, 249, 0.28) 0%, rgba(245, 235, 220, 0.12) 100%); /* Frosted golden glass */
  backdrop-filter: blur(24px) saturate(125%);
  -webkit-backdrop-filter: blur(24px) saturate(125%);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: var(--border-radius-xl, 24px);
  box-shadow: 0 20px 50px rgba(62, 39, 35, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.5);
  transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
  overflow: hidden;
}

@media (max-width: 768px) {
  #global-audio-player {
    left: var(--space-4, 16px);
    right: var(--space-4, 16px);
    width: auto;
    max-width: none;
    bottom: var(--space-4, 16px);
  }
}

.global-player {
  position: relative;
  padding: var(--space-5, 20px);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--space-4, 16px);
}

/* Close & Minimize button alignment */
.global-player-actions {
  position: absolute;
  top: 16px;
  right: 16px;
  display: flex;
  align-items: center;
  gap: 6px;
  z-index: 10;
}

.global-player-actions button {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--color-vintage-grape, #5D3954); /* Darker color by default for high contrast */
  opacity: 0.65;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  width: 26px; /* Slightly larger clickable target */
  height: 26px;
}

.global-player-actions button:hover {
  opacity: 1;
  color: var(--color-vintage-grape, #5D3954);
  background: rgba(93, 57, 84, 0.12); /* Soft vintage grape background */
  box-shadow: 0 0 10px rgba(93, 57, 84, 0.35); /* Glowing box-shadow */
}

.global-player-actions button svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
  transition: filter 0.3s ease;
}

.global-player-actions button:hover svg {
  filter: drop-shadow(0 0 4px rgba(93, 57, 84, 0.7)); /* Glowing SVG drop-shadow filter */
}

/* Sub-header caption */
.global-player-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  margin-bottom: 4px;
  margin-top: 12px;
}

.global-player-brand-primary {
  font-family: Georgia, serif;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 2px;
  color: #FFFDF9;
  text-shadow: 0 1px 3px rgba(62, 39, 35, 0.15);
  text-transform: uppercase;
}

.global-player-brand-secondary {
  font-family: var(--font-family-sans, sans-serif);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 2px;
  color: #E6C280; /* Honey Gold */
  text-transform: uppercase;
  opacity: 0.9;
}

/* Track information styled with elegant serif fonts */
.global-player-track-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
}

.global-player-title {
  font-family: Georgia, serif;
  font-weight: 600;
  font-size: 22px;
  color: #5C3E35; /* Chocolate brown */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin: 0;
  line-height: 1.25;
}

.global-player-artist {
  font-family: Georgia, serif;
  font-style: italic;
  font-size: 15px;
  color: #FFFDF9; /* Soft cream/white */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin: 0;
  line-height: 1.25;
  text-shadow: 0 1px 2px rgba(62, 39, 35, 0.1);
}

/* Visualizer Canvas Area */
.global-player-body {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100px;
}

.global-player-visualizer {
  background: transparent;
  width: 100%;
  height: 100px;
  display: block;
}

/* Mid Controls Bar (Shuffle, Repeat, Timeline) */
.global-player-mid-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.85);
}

.global-player-mid-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.global-player-mid-left button {
  background: none;
  border: none;
  color: #E6C280;
  opacity: 0.8;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.global-player-mid-left button:hover {
  opacity: 1;
  color: #FFFDF9;
  background: rgba(255, 255, 255, 0.1);
}

.global-player-mid-left button svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.global-player-time-total-display {
  font-variant-numeric: tabular-nums;
  font-weight: 500;
  opacity: 0.8;
}

/* Progress Slider & Timers */
.global-player-progress-container {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.global-player-progress-bar {
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.22);
  border-radius: 2px;
  position: relative;
  cursor: pointer;
  transition: height 0.15s ease;
}

.global-player-progress-bar:hover {
  height: 6px;
}

.global-player-progress-fill {
  height: 100%;
  background: #FFFDF9; /* Clean white progress line */
  border-radius: 2px;
  width: 0%;
  position: relative;
}

.global-player-progress-fill::after {
  content: '';
  position: absolute;
  right: -6px;
  top: 50%;
  transform: translateY(-50%);
  width: 12px;
  height: 12px;
  background: white;
  border: 2.5px solid #C85A1F;
  border-radius: 50%;
  box-shadow: 0 2px 6px rgba(62, 39, 35, 0.22);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.global-player-progress-bar:hover .global-player-progress-fill::after {
  opacity: 1;
}

.global-player-time-labels {
  display: flex;
  justify-content: space-between;
  width: 100%;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.85);
  font-variant-numeric: tabular-nums;
}

/* Control buttons at the bottom */
.global-player-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
  width: 100%;
  margin-top: 4px;
}

.global-player-skip-back-btn,
.global-player-skip-forward-btn {
  background: none;
  border: none;
  color: #E6C280; /* Honey Gold skip arrows */
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  width: 36px;
  height: 36px;
  border-radius: 50%;
}

.global-player-skip-back-btn:hover,
.global-player-skip-forward-btn:hover {
  color: #FFFDF9;
  background: rgba(255, 255, 255, 0.1);
}

.global-player-skip-back-btn svg,
.global-player-skip-forward-btn svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.global-player-play-btn {
  background: radial-gradient(circle, #F9E5CF 0%, #DCA574 100%);
  border: 2px solid rgba(255, 255, 255, 0.6);
  color: #5C3E35;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 5px 15px rgba(212, 165, 116, 0.4), inset 0 2px 4px rgba(255, 255, 255, 0.5);
  transition: all 0.25s cubic-bezier(0.25, 0.8, 0.25, 1);
  flex-shrink: 0;
}

.global-player-play-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 7px 22px rgba(212, 165, 116, 0.55), 0 0 0 4px rgba(212, 165, 116, 0.15);
}

.global-player-play-btn:active {
  transform: scale(0.96);
}

.global-player-play-btn svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

/* Footer Section */
.global-player-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  padding-top: var(--space-3, 12px);
  margin-top: 4px;
}

.global-player-badge {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #FFFDF9;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1.2px;
  padding: 4px 10px;
  border-radius: 20px;
  text-transform: uppercase;
}

.global-player-footer-right {
  display: flex;
  align-items: center;
  gap: 16px;
  color: #FFFDF9;
  font-size: 11px;
  opacity: 0.85;
}

.global-player-volume-btn {
  background: none;
  border: none;
  color: currentColor;
  opacity: 0.8;
  cursor: pointer;
  padding: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.global-player-volume-btn:hover {
  opacity: 1;
  color: #E6C280;
}

.global-player-volume-btn svg {
  width: 15px;
  height: 15px;
  fill: currentColor;
}

.global-player-footer-link {
  cursor: pointer;
  font-weight: 500;
  transition: color 0.15s ease;
}

.global-player-footer-link:hover {
  color: #E6C280;
}

/* Minimized State */
.global-player[data-state="minimized"] {
  width: 320px;
  gap: var(--space-3, 12px);
}

.global-player[data-state="minimized"] .global-player-label,
.global-player[data-state="minimized"] .global-player-body,
.global-player[data-state="minimized"] .global-player-mid-controls,
.global-player[data-state="minimized"] .global-player-time-labels,
.global-player[data-state="minimized"] .global-player-footer {
  display: none;
}

.global-player[data-state="minimized"] .global-player-track-info {
  margin-top: 8px;
}

.global-player[data-state="minimized"] .global-player-title {
  font-size: 16px;
}

.global-player[data-state="minimized"] .global-player-artist {
  font-size: 12px;
}
