.videojs-drm-settings-button {
  position: relative;
}

.videojs-drm-settings-popup {
  position: absolute;
  bottom: 110%;
  right: 0;
  background: rgba(28, 28, 28, 0.9);
  border-radius: 8px;
  padding: 4px 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  z-index: 1000;
  backdrop-filter: blur(10px);
  text-shadow: none;
}

.settings-popup-item {
  display: flex;
  align-items: center;
  min-height: 28px;
  padding: 6px 8px;
  color: #fff;
  cursor: pointer;
  transition: background-color 0.2s ease;
  font-size: 13px;
  -webkit-tap-highlight-color: transparent; /* Remove tap highlight on mobile */
}

.settings-popup-item:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.vjsd-main-menu.settings-popup-item > svg {
  width: 20px;
  height: 20px;
  margin-right: 10px;
}

.settings-popup-item.selected > svg {
  width: 16px;
  height: 16px;
  margin-left: 10px;
}

.settings-text {
  flex: 1;
  font-weight: 500;
  white-space: nowrap;
}

.settings-title {
  text-align: left;
  white-space: nowrap;
  margin-right: 8px;
}

.settings-value {
  opacity: 0.8;
  font-size: 13px;
  text-align: right;
  white-space: nowrap;
}

/* Touch-friendly styles for mobile */
@media (hover: none) and (pointer: coarse) {
  .settings-popup-item:hover {
    background-color: transparent; /* Disable hover on touch devices */
  }

  .settings-popup-item:active {
    background-color: rgba(255, 255, 255, 0.2);
  }
}

/* Back button styles */
.back-button {
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 4px;
}

.back-button > svg {
  width: 16px;
  height: 16px;
  margin-right: 4px;
}

/* Speed item styles */
.speed-item {
  position: relative;
}

.speed-item.selected {
  background-color: rgba(59, 130, 246, 0.2);
}

/* Quality item styles */
.quality-item {
  position: relative;
}

.quality-item.selected {
  background-color: rgba(59, 130, 246, 0.2);
}

/* Subtitle item styles */
.subtitle-item {
  position: relative;
}

.subtitle-item.selected {
  background-color: rgba(59, 130, 246, 0.2);
}

.check-icon {
  width: 16px;
  height: 16px;
  margin-right: 8px;
  fill: #3b82f6;
}

@media (max-width: 768px) {
  .videojs-drm-settings-popup {
    right: -10px;
  }

  .settings-popup-item {
    min-height: 24px;
    padding: 5px 6px;
    font-size: 12px;
  }

  .vjsd-main-menu.settings-popup-item > svg {
    width: 16px;
    height: 16px;
    margin-right: 8px;
  }

  .back-button > svg {
    width: 14px;
    height: 14px;
  }

  .settings-popup-item.selected > svg {
    width: 14px;
    height: 14px;
    margin-left: 5px;
  }

  .settings-title {
    margin-right: 4px;
  }

  .settings-value {
    font-size: 11px;
  }
}

@media (max-width: 480px) {
  .videojs-drm-settings-popup {
    right: -20px;
  }

  .settings-popup-item {
    min-height: 20px;
    padding: 2px 5px;
    font-size: 9px;
  }

  .vjsd-main-menu.settings-popup-item > svg {
    width: 9px;
    height: 9px;
    margin-right: 6px;
  }

  .back-button > svg {
    width: 12px;
    height: 12px;
  }

  .settings-popup-item.selected > svg {
    width: 14px;
    height: 14px;
    margin-left: 4px;
  }

  .settings-title {
    margin-right: 4px;
  }

  .settings-value {
    font-size: 9px;
  }
}
