.hypervideoThumb {
    float: left;
    position: relative;
    width: 200px;
    height: 120px;
    margin: 10px;
    background-color: #333333;
    border: 2px solid rgba(53,57,60,0.7);
    background-position: center;
    background-size: 110%;
    -webkit-transition-property: background, border;
    -webkit-transition-duration: 200ms;
    -webkit-transition-timing-function: linear;
    -moz-transition-property: background, border;
    -moz-transition-duration: 200ms;
    -moz-transition-timing-function: linear;
    -o-transition-property: background, border;
    -o-transition-duration: 200ms;
    -o-transition-timing-function: linear;
    transition-property: background, border;
    transition-duration: 200ms;
    transition-timing-function: linear;
}

.hypervideoThumb:hover {
    border-color: #f8f8f8;
    background-size: 100%;
}

.ui-tabs-panel .hypervideoThumb {
    border-color: #777777;
}

.ui-tabs-panel .hypervideoThumb:hover {
    border-color: var(--primary-bg-color);
}

.hypervideoThumb.activeHypervideo {
    border-color: var(--primary-fg-color);
}

.hypervideoThumb .hypervideoThumbContent {
    height: 100%;
    left: 0;
    position: absolute;
    top: 0;
    width: 100%;
    z-index: 2;
    box-shadow: 0 30px 75px 3px rgba(23, 28, 34, 0.6) inset;
}

.hypervideoThumb.activeHypervideo .hypervideoThumbContent {
    pointer-events: none;
}

.hypervideoThumb .hypervideoIcon {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.hypervideoThumb .hypervideoIcon [class^="icon-"]::before, .hypervideoThumb .hypervideoIcon [class*=" icon-"]::before {
    position: absolute;
    top: 50%;
    left: 50%;
    font-size: 40px;
    margin-left: -20px;
    margin-top: -24px;
    color: var(--primary-fg-color);
    background: var(--primary-bg-color);
    border-radius: 50%;
    text-shadow: 0px 0px 20px var(--primary-bg-color);
}

.hypervideoThumb.activeHypervideo .hypervideoIcon [class^="icon-"]::before, .hypervideoThumb.activeHypervideo .hypervideoIcon [class*=" icon-"]::before {
    content: "\f28b";
}

.hypervideoThumb .hypervideoTitle {
    position: absolute;
    bottom: 0;
    width: 100%;
    height: auto;
    background-color: var(--primary-bg-color);
    text-align: center;
    padding: 6px 5px 3px 5px;
    color: var(--primary-fg-color);
    -moz-box-sizing: border-box;
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
    opacity: .8;
}

.hypervideoThumb:hover .hypervideoTitle {
    opacity: 1;
}

.hypervideoThumb.ui-draggable-dragging {
    outline: 1px solid #FF9919;
    border-color: var(--primary-bg-color);
    box-shadow: 0 0 3px 2px rgba(100,100,110,.7);
}

.hypervideoThumb.ui-draggable {
    cursor: move;
}

.hypervideoThumb.ui-draggable .hypervideoIcon {
    pointer-events: none;
}

/*
 * Shown whenever they exist, not only on hover: there is no hover on a touch
 * screen, so a hover-gated control is simply unreachable there. Nothing is
 * given away by showing them, because they are only built at all for someone
 * who may edit this hypervideo — see ViewOverview.initList() and
 * ViewOverviewMap.openPopup(), both of which require admin-or-owner, edit mode
 * and a writable target. The map's resize handles are ungated for the same
 * reason.
 */
.hypervideoThumb .hypervideoOptions {
    position: absolute;
    top: 0;
    right: 0;
    z-index: 3;
    display: flex;
}

/*
 * These edit, delete and un-place the hypervideo — they act on it rather than
 * present it, so they wear the editing palette (see --editing-* in
 * variables.css) and not the theme's. Opaque, because they sit on top of an
 * arbitrary thumbnail image and a translucent button over one is barely
 * visible. Hover inverts, matching the sidebar and titlebar in edit mode.
 */
.hypervideoThumb .hypervideoOptions button {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--editing-bg-color);
    border-color: var(--editing-fg-color);
    border-radius: 50%;
    height: 40px;
    width: 40px;
    color: var(--editing-fg-color);
    margin: 8px 8px 8px 0;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
}

.hypervideoThumb .hypervideoOptions button:hover {
    background-color: var(--editing-fg-color);
    color: var(--editing-bg-color);
    border-color: var(--editing-bg-color);
}

/*
 * Centre the glyph, not the line box around it — the same correction the map
 * toolbar makes, and for the same reason: the icon span's line box carries the
 * strut of the inherited 14px UI font, roughly 2px of descender space below the
 * baseline that the 20px icon box never uses, so align-items:center leaves the
 * glyph about a pixel high. This used to be cancelled with margin-top: 2px,
 * which overshot by a third of a pixel and only held for this exact pairing of
 * font and size.
 */
.hypervideoThumb .hypervideoOptions button > span[class^="icon-"],
.hypervideoThumb .hypervideoOptions button > span[class*=" icon-"] {
    display: flex;
    align-items: center;
    justify-content: center;
}

.hypervideoThumb .hypervideoOptions button [class^="icon-"]::before, .ui-tabs-panel .hypervideoThumb .hypervideoOptions button [class*=" icon-"]::before {
    display: block;
    font-size: 20px;
    width: 22px;
    margin: 0;
}