/* ================================ Guide video button + popup ================================
   GuideVideoButton.razor / GuideVideoPopup.razor. The button's icon carries its own width, height
   and fills on the <svg>, so a stale copy of this sheet costs styling, never a giant logo. */

.guide-video-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 34px;
    height: 28px;
    padding: 0;
    margin: 0;
    border: 1px solid #f1d4d4;
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    vertical-align: middle;
    line-height: 0;
    transition: background-color .15s, border-color .15s, transform .15s;
}

.guide-video-btn:hover {
    background: #fff1f1;
    border-color: #ff0000;
    transform: scale(1.06);
}

.guide-video-btn:focus-visible {
    outline: 2px solid #ff0000;
    outline-offset: 2px;
}

/* Inline after a heading's text rather than as a flex item with its own gap. */
.invoice-detail-header .guide-video-btn,
.login-form-head .guide-video-btn,
.tally-title .guide-video-btn {
    margin-left: 8px;
}

/* Settings pages have no title bar: the button gets a row of its own, right-aligned. */
.guide-video-row {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 8px;
}

/* No link yet (ShowButtonsWithoutVideo): visible but visibly unfinished. */
.guide-video-btn.guide-video-pending {
    opacity: .45;
    border-style: dashed;
}

.guide-video-btn.guide-video-pending:hover {
    opacity: .8;
}

/* In a popup: lifted into the Blazored header row, left of the close cross. Blazored's
   .blazored-modal is not positioned, so it is made the containing block here — only for a popup
   that actually holds a floating button. */
.blazored-modal:has(.guide-video-float) {
    position: relative;
}

.guide-video-btn.guide-video-float {
    position: absolute;
    top: 1.35rem;
    right: 3.6rem;
    margin: 0;
    z-index: 2;
}

/* A popup opened without the cross has nothing to step around. */
.blazored-modal:not(:has(.bm-close)) .guide-video-btn.guide-video-float {
    right: 1.5rem;
}

/* The player popup itself */
.guide-video-modal {
    width: min(960px, calc(100vw - 3.5rem));
}

.guide-video-popup {
    width: 100%;
}

.guide-video-frame {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
}

.guide-video-frame iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.guide-video-foot {
    display: flex;
    justify-content: flex-end;
    margin-top: 10px;
    font-size: 13px;
}

.guide-video-foot a {
    color: #c00;
    font-weight: 600;
    text-decoration: none;
}

.guide-video-foot a:hover {
    text-decoration: underline;
}

.guide-video-note {
    margin: 8px 0;
    font-size: 15px;
    color: #333;
}

.guide-video-key {
    margin: 0;
    font-size: 12px;
    color: #777;
}

@media (max-width: 700px) {
    .guide-video-modal {
        width: calc(100vw - 1.5rem);
    }
}
