.bf-native-player {
  --player-red: var(--red, #790b16);
  --player-accent: var(--brand, #b5202b);
  position: relative;
  isolation: isolate;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #000;
  color: #fff;
}

.bf-native-player:fullscreen,
.bf-native-player:-webkit-full-screen {
  width: 100%;
  height: 100%;
}

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

.bf-native-video {
  display: block;
  width: 100%;
  height: 100%;
  background: #000;
  object-fit: contain;
  cursor: pointer;
}

.bf-native-video::cue {
  color: #fff;
  background: #000c;
}

.bf-native-controls {
  position: absolute;
  z-index: 2;
  right: 0;
  bottom: 0;
  left: 0;
  display: grid;
  gap: 2px;
  padding: 22px clamp(10px, 2.15vw, 23px) 9px;
  background: linear-gradient(transparent, #000b 35%, #000f);
}

.bf-native-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
}

.bf-native-spacing { flex: 1; }

.bf-native-button {
  display: grid;
  flex: none;
  width: 40px;
  height: 39px;
  place-items: center;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 5px;
  background: transparent;
  color: #fff;
}

.bf-native-button:hover:not(:disabled),
.bf-native-button[aria-expanded="true"] {
  border-color: #ffffff39;
  background: #ffffff21;
}

.bf-native-button:focus-visible,
.bf-native-player input:focus-visible,
.bf-native-player select:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.bf-native-button svg { width: 19px; height: 19px; }

.bf-native-center {
  position: absolute;
  z-index: 1;
  top: 50%;
  left: 50%;
  width: clamp(53px, 7.3vw, 80px);
  height: clamp(53px, 7.3vw, 80px);
  transform: translate(-50%, -50%);
  border: 1px solid var(--player-accent);
  border-radius: 50%;
  background: var(--player-red);
  box-shadow: 0 6px 32px #000a;
}

.bf-native-center:hover:not(:disabled) { background: var(--red-hover, #96121e); }
.bf-native-center svg { width: 33%; height: 33%; margin-left: 3px; }

.bf-native-time {
  min-width: 0;
  margin-inline: 5px;
  color: #eee;
  white-space: nowrap;
  font-size: 11px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.bf-native-seek,
.bf-native-volume {
  margin: 0;
  accent-color: var(--player-accent);
  cursor: pointer;
}

.bf-native-seek { width: 100%; height: 16px; }
.bf-native-seek:disabled { opacity: .38; cursor: default; }
.bf-native-volume { width: clamp(42px, 9vw, 81px); }

.bf-native-settings {
  position: absolute;
  right: clamp(10px, 2.15vw, 23px);
  bottom: calc(100% - 11px);
  display: grid;
  width: min(255px, calc(100% - 20px));
  gap: 7px;
  padding: 11px;
  border: 1px solid var(--accent-border, #70202a);
  border-radius: 7px;
  background: var(--surface, #101010);
  box-shadow: 0 6px 24px #0009;
}

.bf-native-field {
  display: grid;
  grid-template-columns: 60px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  color: #ddd;
  font-size: 11px;
}

.bf-native-field select {
  width: 100%;
  min-width: 0;
  min-height: 33px;
  padding: 5px 7px;
  border: 1px solid #ffffff2c;
  border-radius: 4px;
  background: var(--accent-raised, #2c0d12);
  color: #fff;
  font-size: 11px;
}

.bf-native-message {
  position: absolute;
  z-index: 1;
  top: 50%;
  left: 50%;
  width: max-content;
  max-width: 85%;
  margin: 0;
  padding: 9px 13px;
  transform: translate(-50%, -50%);
  border: 1px solid #ffffff24;
  border-radius: 5px;
  background: #100809e8;
  color: #f5f5f5;
  font-size: 12px;
  line-height: 1.45;
  text-align: center;
  pointer-events: none;
}

@media (max-width: 560px) {
  .bf-native-controls { padding-top: 15px; padding-bottom: 5px; }
  .bf-native-actions { gap: 1px; }
  .bf-native-actions .bf-native-button { width: 44px; height: 44px; }
  .bf-native-button svg { width: 17px; height: 17px; }
  .bf-native-center svg { width: 36%; height: 36%; }
  .bf-native-time { margin-inline: 5px 2px; font-size: 12px; }
  .bf-native-settings { bottom: calc(100% - 5px); gap: 4px; padding: 8px; }
  .bf-native-field { grid-template-columns: 53px minmax(0, 1fr); }
  .bf-native-field select { min-height: 44px; font-size: 14px; }
  .bf-native-volume { display: none; }
  .bf-native-seek { height: 28px; }
  .bf-native-controls { padding-bottom: max(8px, env(safe-area-inset-bottom)); }
}

.bf-native-embed { width: 100%; height: 100%; border: 0; }

@media (pointer: coarse) {
  .bf-native-actions .bf-native-button { min-width: 44px; min-height: 44px; }
  .bf-native-field select { min-height: 44px; font-size: 14px; }
  .bf-native-seek { height: 28px; }
}
