/* BomberoFlash animaciones v3. Estilos aislados, sin fuentes ni dependencias.
   Interruptor: adaptación de elijahwgummer-poc / giant-panda-93.
   CTA: impulso, aro, flecha y barrido propios. */
.bf-controls {
  --bf-ui-accent: #245ce5;
  --bf-ui-accent-hover: #1d50cf;
  --bf-ui-text: #34425b;
  --bf-ui-muted: #66768f;
  --bf-ui-track-off: #dce3ed;
  --bf-ui-focus: #204dbd;
}

.bf-switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-block-size: 58px;
  cursor: pointer;
  color: var(--bf-ui-text, #34425b);
}

.bf-switch-copy {
  display: grid;
  gap: 3px;
  min-inline-size: 0;
}

.bf-switch-name {
  font: inherit;
  font-weight: 650;
}

.bf-switch-description {
  font-size: .875rem;
  color: var(--bf-ui-muted, #66768f);
  line-height: 1.4;
}

.bf-switch {
  position: relative;
  display: inline-grid;
  place-items: center;
  flex: 0 0 60px;
  inline-size: 60px;
  block-size: 46px;
}

.bf-switch__input {
  position: absolute;
  inset: 0;
  opacity: 0;
  margin: 0;
  inline-size: 100%;
  block-size: 100%;
  z-index: 1;
  cursor: pointer;
}

.bf-switch__track {
  display: block;
  position: relative;
  inline-size: 60px;
  block-size: 34px;
  background: var(--bf-ui-track-off, #dce3ed);
  border-radius: 34px;
  transition: background-color 300ms ease;
  pointer-events: none;
}

.bf-switch__track::before {
  content: '';
  position: absolute;
  inline-size: 26px;
  block-size: 26px;
  inset-inline-start: 4px;
  top: 4px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 4px rgba(20, 40, 80, .17);
  transition: transform 300ms cubic-bezier(.68, -.55, .27, 1.55);
}

.bf-switch__input:checked + .bf-switch__track {
  background: var(--bf-ui-accent, #245ce5);
}

.bf-switch__input:checked + .bf-switch__track::before {
  transform: translateX(26px);
}

.bf-switch__input:focus-visible + .bf-switch__track {
  outline: 3px solid var(--bf-ui-focus, #204dbd);
  outline-offset: 4px;
}

.bf-switch__input:disabled {
  cursor: not-allowed;
}

.bf-switch__input:disabled + .bf-switch__track {
  opacity: .5;
}

.bf-start {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  inline-size: 100%;
  min-block-size: 72px;
  padding: 14px 16px;
  color: #fff;
  background: var(--bf-ui-accent, #245ce5);
  border: 1px solid transparent;
  border-radius: 20px;
  font: inherit;
  font-weight: 720;
  font-size: 1.125rem;
  box-shadow: 0 8px 20px rgba(36, 92, 229, .22);
  cursor: pointer;
  transition: background-color 200ms ease, box-shadow 200ms ease;
}

.bf-start > span {
  position: relative;
  z-index: 2;
}

.bf-start__play,
.bf-start__end {
  display: inline-grid;
  place-items: center;
  inline-size: 36px;
  block-size: 36px;
  flex: 0 0 36px;
  border-radius: 12px;
  background: rgba(255, 255, 255, .14);
  transition: background-color 200ms ease, color 200ms ease;
}

.bf-start__play > svg {
  display: block;
  inline-size: 22px;
  block-size: 22px;
  transform-origin: center;
}

.bf-start__play::before {
  content: '';
  position: absolute;
  inset: -2px;
  border: 1px solid rgba(255, 255, 255, .9);
  border-radius: 50%;
  opacity: 0;
  pointer-events: none;
  transform: scale(.5);
}

.bf-start__end {
  border-radius: 50%;
}

.bf-start__label,
.bf-start__busy-label {
  flex: 1 1 auto;
  min-inline-size: 0;
  text-align: center;
  line-height: 1.3;
}

.bf-start__busy-label {
  display: none;
}

.bf-start__arrow {
  position: relative;
  display: block;
  inline-size: 17px;
  block-size: 2px;
  background: currentColor;
  transition: transform 220ms ease;
}

.bf-start__arrow::before {
  content: '';
  position: absolute;
  inline-size: 7px;
  block-size: 7px;
  border-block-start: 2px solid currentColor;
  border-inline-end: 2px solid currentColor;
  right: 0;
  top: -3.5px;
  transform: rotate(45deg);
}

.bf-start::before {
  content: '';
  pointer-events: none;
  position: absolute;
  z-index: 1;
  top: -70%;
  bottom: -70%;
  left: 0;
  width: 38%;
  opacity: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .38), transparent);
  transform: translateX(-150%) skewX(-18deg);
}

.bf-start::after {
  content: '';
  pointer-events: none;
  position: absolute;
  z-index: 0;
  inset: -25%;
  background: radial-gradient(ellipse at 18% 50%, rgba(255, 255, 255, .32), rgba(115, 211, 255, .18) 34%, transparent 68%);
  opacity: 0;
  transform-origin: 18% 50%;
  transform: scale(.25);
}

@media (hover: hover) and (pointer: fine) {
  .bf-start:hover:not(:disabled):not([aria-disabled='true']) {
    background: var(--bf-ui-accent-hover, #1d50cf);
    box-shadow: 0 9px 26px rgba(36, 92, 229, .32);
  }

  .bf-start:hover:not(:disabled):not([aria-disabled='true']) .bf-start__end {
    background: #fff;
    color: var(--bf-ui-accent, #245ce5);
  }

  .bf-start:hover:not(:disabled):not([aria-disabled='true']) .bf-start__arrow {
    transform: translateX(2px);
  }
}

.bf-start:focus-visible {
  outline: 3px solid var(--bf-ui-focus, #204dbd);
  outline-offset: 4px;
}

.bf-start:active:not(:disabled):not([aria-disabled='true']) {
  box-shadow: 0 3px 10px rgba(36, 92, 229, .25);
}

.bf-start--tap::before {
  animation: bf-start-sheen 240ms ease-out 1 both;
}

.bf-start--tap::after {
  animation: none;
}

.bf-start--tap .bf-start__play > svg {
  animation: none;
}

.bf-start--tap .bf-start__play::before {
  animation: none;
}

.bf-start--tap .bf-start__arrow {
  animation: none;
}

.bf-start:disabled,
.bf-start[aria-disabled='true'] {
  cursor: wait;
}

.bf-start:disabled:not([aria-busy='true']) {
  opacity: .55;
  cursor: not-allowed;
}

.bf-start[aria-busy='true'] .bf-start__label {
  display: none;
}

.bf-start[aria-busy='true'] .bf-start__busy-label {
  display: block;
}

.bf-start[aria-busy='true'] .bf-start__end {
  opacity: .7;
}

@keyframes bf-start-sheen {
  0% { opacity: 0; transform: translateX(-150%) skewX(-18deg); }
  30%, 65% { opacity: .6; }
  100% { opacity: 0; transform: translateX(390%) skewX(-18deg); }
}

@media (prefers-reduced-motion: reduce) {
  .bf-switch__track,
  .bf-switch__track::before,
  .bf-start,
  .bf-start__arrow,
  .bf-start__arrow::before {
    transition: none;
  }

  .bf-start--tap::before,
  .bf-start--tap::after,
  .bf-start--tap .bf-start__arrow,
  .bf-start--tap .bf-start__play > svg,
  .bf-start--tap .bf-start__play::before {
    animation: none;
  }

  .bf-start--tap {
    background: var(--bf-ui-accent-hover, #1d50cf);
  }

  .bf-start__play,
  .bf-start__end {
    transition: none;
  }
}

@media (forced-colors: active) {
  .bf-switch__track {
    outline: 1px solid ButtonText;
    background: Canvas;
  }

  .bf-switch__track::before {
    background: ButtonText;
    forced-color-adjust: none;
  }

  .bf-switch__input:checked + .bf-switch__track {
    background: Highlight;
    forced-color-adjust: none;
  }

  .bf-start {
    border: 1px solid ButtonText;
  }
}
