/* VidBee Download Button Container */
.vidbee-download-container {
  position: fixed;
  bottom: 16px;
  right: 16px;
  z-index: 9999;
  transition: all 0.2s ease;
  overflow: visible;
}

/* Hidden state */
.vidbee-download-container.vidbee-hidden {
  opacity: 0;
  pointer-events: none;
  transform: scale(0);
}

/* Main Download Button */
.vidbee-download-button {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  font-size: 0;
  transition: all 0.2s ease;
  opacity: 0.6;
  overflow: visible;
}

.vidbee-download-button:hover {
  opacity: 1;
  background: rgba(0, 0, 0, 0.7);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  transform: scale(1.1);
}

.vidbee-download-button:active {
  transform: scale(0.95);
}

.vidbee-download-button svg {
  flex-shrink: 0;
  stroke: currentColor;
  width: 16px;
  height: 16px;
}

/* Tooltip */
.vidbee-tooltip {
  position: absolute;
  right: calc(100% + 8px);
  top: 50%;
  padding: 6px 10px;
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: white;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  transform: translateY(-50%) translateX(4px);
  z-index: 10000;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  line-height: 1;
}

.vidbee-tooltip::after {
  content: '';
  position: absolute;
  left: 100%;
  top: 50%;
  transform: translateY(-50%);
  border: 4px solid transparent;
  border-left-color: rgba(0, 0, 0, 0.9);
}

.vidbee-download-button:hover .vidbee-tooltip {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}

/* Close Button - Hidden by default */
.vidbee-close-button {
  position: absolute;
  top: -6px;
  right: -6px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  padding: 0;
  background: rgba(255, 77, 77, 0.9);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  cursor: pointer;
  font-size: 0;
  transition: all 0.2s ease;
  z-index: 1;
  opacity: 0;
  pointer-events: none;
  overflow: visible;
}

/* Show close button on container hover */
.vidbee-download-container:hover .vidbee-close-button {
  opacity: 1;
  pointer-events: auto;
}

.vidbee-close-button:hover {
  background: rgba(255, 77, 77, 1);
  transform: scale(1.15);
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.4);
}

.vidbee-close-button:active {
  transform: scale(0.9);
}

.vidbee-close-button svg {
  flex-shrink: 0;
  stroke: currentColor;
  width: 10px;
  height: 10px;
}

/* Close button tooltip positioning */
.vidbee-close-button .vidbee-tooltip {
  right: calc(100% + 6px);
  top: 50%;
  left: auto;
  transform: translateY(-50%) translateX(4px);
}

.vidbee-close-button .vidbee-tooltip::after {
  left: 100%;
  top: 50%;
  right: auto;
  transform: translateY(-50%);
  border-left-color: rgba(0, 0, 0, 0.9);
  border-top-color: transparent;
}

.vidbee-download-container:hover .vidbee-close-button:hover .vidbee-tooltip {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}
