/* v2_quotes_css.py: media, menus and the 880 x 800 desktop player. */
.ql-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(8, 9, 12, 0) 64%, rgba(8, 9, 12, 0.58) 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}
.ql-thumb {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.ql .ql-play {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  padding: 10px;
  color: #fff;
  text-decoration: none;
}
.ql-pbtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: 999px;
  background: rgba(10, 10, 11, 0.5);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(8px);
  font-size: 13px;
  font-weight: 600;
  transition: background 0.18s ease;
}
.ql-pbtn > span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.ql-play:hover .ql-pbtn {
  background: rgba(201, 28, 66, 0.92);
  box-shadow: none;
}
.ql .ql-play:focus-visible {
  outline-offset: -3px;
  border-radius: inherit;
}
.ql-card.is-on .ql-frame {
  box-shadow:
    0 0 0 3px var(--hc-band),
    0 0 0 5px var(--hc-brand),
    0 22px 44px -26px rgba(10, 12, 22, 0.55),
    0 2px 6px -2px rgba(10, 12, 22, 0.18);
}
.ql-download {
  margin: 0;
}
.ql-download .ql-btn {
  width: 100%;
  cursor: pointer;
}
.ql button:focus-visible {
  outline: 3px solid var(--hc-focus);
  outline-offset: 2px;
}
.ql-share {
  position: relative;
  flex-shrink: 0;
}
.ql-spin-s {
  display: none;
}
.ql-spin {
  display: block;
  width: 18px;
  height: 18px;
  border-radius: 99px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  animation: ql-rot 0.8s linear infinite;
  position: absolute;
}
.ql-spin {
  position: static;
  width: 34px;
  height: 34px;
  border-width: 3px;
  color: #fff;
}
@keyframes ql-rot {
  to {
    transform: rotate(360deg);
  }
}
.ql .ql-ready {
  flex: 1;
  background: var(--hc-chip-on-bg);
  box-shadow: inset 0 0 0 1px var(--hc-chip-on-line);
  color: var(--hc-chip-on-fg);
  cursor: pointer;
}
.ql .ql-prep {
  margin: 8px 0 0;
  font-size: 13px;
  color: var(--hc-muted);
}
.ql-menu {
  position: absolute;
  z-index: 5;
  top: 52px;
  right: 0;
  min-width: 220px;
  display: flex;
  flex-direction: column;
  padding: 6px;
  border-radius: 16px;
  background: var(--hc-card);
  box-shadow:
    0 0 0 1px var(--hc-hair),
    0 18px 40px -16px rgba(0, 0, 0, 0.35);
  animation: ql-pop 0.16s ease-out;
}
.ql .ql-menu > * {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 6px 10px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--hc-text);
  font: inherit;
  font-size: 15px;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}
.ql .ql-menu > :is(:hover, :focus) {
  background: var(--hc-alt);
}
.ql-menu span {
  display: flex;
  flex-direction: column;
  line-height: 1.3;
}
.ql-menu b {
  font-weight: 600;
}
@keyframes ql-pop {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.ql-fvid video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.ql-veil {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(10, 10, 11, 0.74);
}
.ql-viewer {
  position: fixed;
  z-index: 1001;
  inset: 0;
  top: 0;
  display: flex;
  flex-direction: column;
  height: 100dvh;
  overflow-y: auto;
  background: #0a0a0b;
  color: #eef0f4;
  animation: ql-in 0.22s ease-out;
}
@keyframes ql-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
.ql-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 9 / 16;
  background: #0a0a0b;
  height: min(177.778vw, calc(100dvh - 177px));
  flex: 0 0 auto;
  min-height: 0;
  cursor: pointer;
}
.ql-video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.ql-held {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.ql .ql-toggle {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: transparent;
  cursor: pointer;
}
.ql .ql-toggle:focus-visible {
  outline-offset: -3px;
}
.ql :is(.ql-x, .ql-sound) {
  position: absolute;
  top: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 44px;
  border: 0;
  border-radius: 999px;
  background: rgba(10, 10, 11, 0.55);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
  color: #fff;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  backdrop-filter: blur(8px);
}
.ql .ql-x {
  padding: 0;
  left: 16px;
  width: 44px;
}
.ql .ql-sound {
  right: 16px;
  padding: 0 14px;
}
.ql-load,
.ql-fail {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  color: #fff;
  font-size: 15px;
  background: rgba(10, 10, 11, 0.45);
  text-align: center;
  padding: 0 40px;
}
.ql-fail {
  background: rgba(10, 10, 11, 0.86);
}
.ql-fail p {
  margin: 0;
  line-height: 1.6;
  color: #ced1d8;
}
.ql-fail .ql-fail-h {
  font-size: 20px;
  font-weight: 500;
  color: #fff;
}
.ql .ql-fail .ql-btn {
  background: #eef0f4;
  color: #12151a;
  box-shadow: none;
  margin-top: 6px;
}
.ql-vside {
  display: flex;
  flex-direction: column;
  padding: 12px 20px 16px;
  flex: 1 0 auto;
  min-width: 0;
}
.ql-vpos,
.ql-swipe,
.ql-vrow2 {
  display: none;
}
.ql-vtext,
.ql-vside .ql-meta {
  display: none;
}
.ql .ql-vapp {
  margin-top: 10px;
  font-size: 15px;
  font-weight: 600;
  color: #ffa9ad;
  text-underline-offset: 4px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.ql .ql-toast {
  position: absolute;
  z-index: 1002;
  left: 50%;
  transform: translateX(-50%);
  width: max-content;
  max-width: calc(100% - 24px);
  margin: 0;
  padding: 12px 20px;
  border-radius: 999px;
  background: var(--hc-text);
  color: var(--hc-band);
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  box-shadow: 0 12px 30px -12px rgba(0, 0, 0, 0.5);
  animation: ql-pop 0.18s ease-out;
}
.ql .ql-toast-top {
  position: fixed;
  top: 120px;
}
@media (hover: hover) {
  .ql-card:hover .ql-thumb {
    transform: scale(1.03);
  }
}
@media (min-width: 768px) {
  .ql .ql-play {
    padding: 14px;
  }
  .ql-pbtn {
    width: auto;
    height: 40px;
    padding: 0 16px 0 13px;
    gap: 7px;
    font-size: 14px;
  }
  .ql-pbtn > span {
    position: static;
    width: auto;
    height: auto;
    overflow: visible;
    clip-path: none;
  }
  .ql-pbtn .ql-i {
    width: 18px;
    height: 18px;
  }
  .ql-viewer {
    position: fixed;
    inset: auto;
    top: max(20px, calc((100dvh - 800px) / 2));
    left: 50%;
    transform: translateX(-50%);
    flex-direction: row;
    width: min(880px, calc(100% - 40px));
    height: min(800px, calc(100dvh - 40px));
    border-radius: 28px;
    overflow: visible;
    background: var(--hc-card);
    box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.6);
  }
  .ql-stage {
    width: 51.136%;
    height: min(800px, calc(100dvh - 40px));
    flex: 0 0 auto;
    border-radius: 28px 0 0 28px;
    overflow: hidden;
  }
  .ql-vside {
    padding: 40px 36px;
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
  }
  .ql-vside .ql-meta {
    display: flex;
  }
  .ql .ql-vtext {
    display: block;
    margin: 16px 0 8px;
    font-size: 22px;
    line-height: 1.6;
    color: var(--hc-text);
    white-space: pre-line;
  }
  .ql .ql-vapp {
    margin-top: 18px;
    color: var(--hc-accent);
    justify-content: flex-start;
  }
}
@media (max-width: 767px) {
  .ql-stage {
    touch-action: none;
  }
  .ql-swipe {
    position: absolute;
    z-index: 2;
    left: 50%;
    bottom: 16px;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 6px;
    height: 36px;
    margin: 0;
    padding: 0 14px 0 11px;
    border-radius: 999px;
    background: rgba(10, 10, 11, 0.62);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
    backdrop-filter: blur(8px);
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    pointer-events: none;
    animation: ql-nudge 1.6s ease-in-out 2;
  }
}
@keyframes ql-nudge {
  0%,
  100% {
    transform: translate(-50%, 0);
  }
  50% {
    transform: translate(-50%, -6px);
  }
}
@media (prefers-reduced-motion: reduce) {
  .ql-thumb {
    transition: none;
  }
  .ql-viewer,
  .ql-swipe,
  .ql-menu,
  .ql .ql-toast {
    animation: none;
  }
}
