/* Floating Widgets (Facebook + Audio) */
.floating-widgets {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 2147483000;
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: flex-end;
}

.fb-fab {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: linear-gradient(135deg, #1877f2, #0d5bd9);
  border: 2px solid rgba(255, 255, 255, 0.2);
  text-decoration: none;
  box-shadow: 0 8px 24px rgba(24, 119, 242, 0.3);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.fb-fab:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(24, 119, 242, 0.4);
}

.fb-fab svg {
  width: 28px;
  height: 28px;
  display: block;
}

.ig-fab {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
  border: 2px solid rgba(255, 255, 255, 0.2);
  text-decoration: none;
  box-shadow: 0 8px 24px rgba(220, 39, 67, 0.3);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ig-fab:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(220, 39, 67, 0.4);
}

.ig-fab svg {
  width: 28px;
  height: 28px;
  display: block;
}

.player-fab {
  position: relative;
}

.player-fab .fab-btn {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #028a42, #036338);
  color: #fff;
  box-shadow: 0 8px 24px rgba(2, 138, 66, 0.3);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.player-fab .fab-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(2, 138, 66, 0.4);
}

.player-panel {
  position: absolute;
  right: 70px; /* panel po lewej od ikonki (56px btn + odstęp) */
  bottom: 4px;
  width: 320px;
  max-width: calc(100vw - 40px);
  background: linear-gradient(135deg, #028a42, #036338);
  color: #fff;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  padding: 16px 16px 14px 16px;
}

.player-panel[hidden] {
  display: none !important;
}

.player-close {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.25);
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.player-close:hover {
  background: rgba(255,255,255,0.25);
}

.player-panel .track-title {
  font-weight: 700;
  letter-spacing: 0.02em;
  margin-bottom: 8px;
  color: #ef4444;
}

.player-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.player-row.controls {
  justify-content: center;
  margin: 8px 0;
}

.player-row.progress {
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
}

.player-row.volume {
  margin-top: 6px;
}

.aw-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.9);
  color: #028a42;
  font-size: 1.1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease;
}

.aw-btn:hover {
  transform: scale(1.05);
}

.aw-icon {
  background: transparent;
  border: none;
  color: #fff;
  font-size: 1rem;
  cursor: pointer;
}

.aw-progress {
  width: 100%;
  height: 4px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.35);
  cursor: pointer;
  position: relative;
}

.aw-progress-fill {
  height: 100%;
  width: 0%;
  background: #fff;
  border-radius: 2px;
  transition: width 0.1s linear;
}

.aw-time {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  opacity: 0.85;
}

@media (max-width: 768px) {
  .floating-widgets {
    right: 15px;
    bottom: 15px;
    gap: 10px;
  }
  .fb-fab,
  .ig-fab,
  .player-fab .fab-btn {
    width: 52px;
    height: 52px;
  }
  .player-panel {
    width: 280px;
    padding: 14px;
    right: 62px; /* dostosowanie do mniejszego FAB */
  }
}

/* Hide legacy widgets to avoid duplicates */
.facebook-widget,
#musicPlayer { display: none !important; }
