/* VotRite ASL Mode — player panel styles.
   Fixed, high-contrast colours so the panel stays visible under every
   page contrast/theme the site offers. */

#aslPanel {
  position: fixed;
  right: 18px;
  bottom: 18px;
  width: 300px;
  max-width: calc(100vw - 24px);
  background: #16233f;
  color: #fff;
  border: 2px solid #f0c419;
  border-radius: 12px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.45);
  z-index: 100000;
  font-family: Arial, Helvetica, sans-serif;
  overflow: hidden;
  display: none;            /* shown by JS when ASL Mode is on */
}
#aslPanel.asl-visible { display: block; }

#aslPanel .asl-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #22407c;
  padding: 8px 10px;
  cursor: move;             /* draggable */
  user-select: none;
}
#aslPanel .asl-title {
  font-weight: bold;
  font-size: 15px;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 8px;
}
#aslPanel .asl-badge {
  background: #f0c419;
  color: #16233f;
  font-size: 11px;
  font-weight: bold;
  padding: 1px 7px;
  border-radius: 10px;
}
#aslPanel .asl-head-btns { display: flex; gap: 6px; }
#aslPanel .asl-head-btns button {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.5);
  color: #fff;
  width: 26px;
  height: 26px;
  border-radius: 6px;
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
}
#aslPanel .asl-head-btns button:hover { background: rgba(255, 255, 255, 0.15); }

#aslPanel .asl-body { padding: 10px; }
#aslPanel video {
  width: 100%;
  display: block;
  background: #000;
  border-radius: 6px;
}
#aslPanel .asl-caption {
  text-align: center;
  font-size: 15px;
  font-weight: bold;
  margin: 8px 0 2px;
  min-height: 20px;
}
#aslPanel .asl-sub {
  text-align: center;
  font-size: 12px;
  color: #f0c419;
  margin-bottom: 8px;
}
#aslPanel .asl-controls {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: center;
}
#aslPanel .asl-controls button {
  background: #22407c;
  border: 1px solid #4a6bb0;
  color: #fff;
  padding: 6px 12px;
  border-radius: 18px;
  font-size: 13px;
  cursor: pointer;
}
#aslPanel .asl-controls button:hover { background: #2d539b; }
#aslPanel .asl-controls button:disabled { opacity: 0.4; cursor: default; }

/* Minimised state: only the header bar shows */
#aslPanel.asl-min .asl-body { display: none; }
#aslPanel.asl-min { width: 210px; }

/* When an interactive item is the current ASL focus, outline it so the
   voter can see what the signer is describing. */
.asl-focus-target {
  outline: 3px solid #f0c419 !important;
  outline-offset: 2px;
  border-radius: 4px;
}

/* The ASL Mode toggle row inside the Accessibility modal */
.asl-toggle-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 8px;
}
.asl-switch { position: relative; display: inline-block; width: 58px; height: 30px; }
.asl-switch input { opacity: 0; width: 0; height: 0; }
.asl-slider {
  position: absolute; cursor: pointer; inset: 0;
  background: #bbb; border-radius: 30px; transition: 0.2s;
}
.asl-slider:before {
  content: ""; position: absolute; height: 24px; width: 24px;
  left: 3px; bottom: 3px; background: #fff; border-radius: 50%; transition: 0.2s;
}
.asl-switch input:checked + .asl-slider { background: #22407c; }
.asl-switch input:checked + .asl-slider:before { transform: translateX(28px); }

@media (max-width: 520px) {
  #aslPanel { width: calc(100vw - 24px); right: 12px; bottom: 12px; }
}
