.home-video-choice[hidden],
.home-video-settings[hidden] { display: none !important; }

.home-video-choice,
.home-video-settings { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.home-video-settings { margin-top: .65rem; }
.home-panorama > .home-video-choice,
.home-panorama > .home-video-header-feedback {
    position: absolute;
    z-index: 4;
    top: calc(var(--panorama-head, 80px) + 8px);
    right: max(16px, env(safe-area-inset-right));
    max-width: calc(100% - 32px);
    align-items: flex-end;
}
.home-video-control {
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 7px 14px 7px 10px;
    border: 1px solid rgba(255,255,255,.75);
    border-radius: 24px;
    background: #123b56;
    color: #fff;
    font: 600 14px/1.25 var(--portal-font-family, system-ui, sans-serif);
    cursor: pointer;
}
.home-video-choice .home-video-control { background: rgba(10,37,55,.94); box-shadow: 0 2px 8px rgba(0,0,0,.22); }
.home-video-control:hover { background: #00538d; }
.home-video-control:focus-visible { outline: 3px solid #ffca52; outline-offset: 2px; }
.home-video-control:disabled { cursor: wait; }
body .call-to-action.home-video-control::before { content: none; }
.home-video-icon {
    box-sizing: border-box;
    display: inline-grid;
    place-items: center;
    width: 22px;
    height: 22px;
    flex: 0 0 22px;
    border: 1.5px solid currentColor;
    border-radius: 50%;
}
.home-video-icon::before {
    content: "";
    width: 0;
    height: 0;
    margin-left: 2px;
    border-style: solid;
    border-width: 4px 0 4px 7px;
    border-color: transparent transparent transparent currentColor;
}
.home-video-control[data-enabled="true"] .home-video-icon::before {
    box-sizing: border-box;
    width: 8px;
    height: 9px;
    margin: 0;
    border: solid currentColor;
    border-width: 0 3px;
}
.home-video-feedback:not(:empty) {
    max-width: min(29em, 100%);
    padding: 6px 10px;
    border-radius: 7px;
    background: #fff;
    color: #153449;
    box-shadow: 0 2px 8px rgba(0,0,0,.16);
    font: 500 14px/1.35 system-ui,sans-serif;
}
/* Give the two public actions a shared row outside the picture. The outer
   tracks center them and the inner tracks accommodate translated labels. */
@media (orientation: portrait) and (max-width: 599px),
       (orientation: landscape) and (max-height: 540px) and (max-width: 992px) {
    body.homepage #page .home-hero.home-panorama:has(> .home-video-choice:not([hidden])) {
        --home-actions-row: 2;
        grid-template-columns: minmax(8px,1fr) minmax(0,max-content) minmax(44px,max-content) minmax(8px,1fr);
        column-gap: 0;
    }
    body.homepage #page .home-hero.home-panorama:has(> .home-video-choice:not([hidden])) > .panorama-credit {
        grid-area: var(--home-actions-row) / 2;
        position: static;
        place-self: center end;
        min-height: 44px;
        max-width: 100%;
        margin: 4px 0;
    }
    .home-panorama > .home-video-choice {
        grid-area: var(--home-actions-row) / 3;
        position: relative;
        inset: auto;
        place-self: center start;
        max-width: min(41vw, 220px);
        min-width: 0;
        margin: 4px 0 4px 8px;
    }
    .home-video-choice .home-video-control {
        min-width: 44px;
        max-width: 100%;
        background: #123b56;
        box-shadow: 0 2px 7px rgba(0,35,62,.14);
        white-space: normal;
        overflow-wrap: anywhere;
    }
    .home-video-choice .home-video-control:hover { background: #00538d; }
    .home-video-choice .home-video-feedback {
        position: absolute;
        top: calc(100% + 3px);
        right: 0;
        width: max-content;
        max-width: min(76vw, 24em);
    }
    body.homepage #page .home-panorama[data-panorama-rendered="without-promo"] > .home-video-choice {
        grid-column: 1 / -1;
        justify-self: center;
        margin: 0;
    }
}
@media (orientation: portrait) and (max-width: 599px) {
    body.homepage #page .home-hero.home-panorama:has(> .home-video-choice:not([hidden])) :is(.panorama-photo, .panorama-intro, .home-promo-actions, .panorama-story h1, .search-box.homepage) {
        grid-column: 1 / -1;
    }
    body.homepage #page .home-hero.home-panorama[data-panorama-rendered="without-promo"]:has(> .home-video-choice:not([hidden])) {
        grid-template-rows: minmax(var(--portrait-photo-min),1fr) auto auto auto;
    }
    body.homepage #page .home-panorama[data-panorama-rendered="without-promo"]:has(> .home-video-choice:not([hidden])) .panorama-story h1 { grid-row: 3; }
    body.homepage #page .home-panorama[data-panorama-rendered="without-promo"]:has(> .home-video-choice:not([hidden])) > .search-box.homepage { grid-row: 4; }
}
@media (orientation: landscape) and (max-height: 540px) and (max-width: 992px) {
    body.homepage #page .home-hero.home-panorama:has(> .home-video-choice:not([hidden])) {
        --home-actions-row: 5;
        background: #f2f6f9;
    }
    /* The landscape photo is an absolute grid item. End it at the top of the action row. */
    body.homepage #page .home-hero.home-panorama:has(> .home-video-choice:not([hidden])) > .panorama-photo {
        grid-row: auto / 5;
    }
}
@media (min-width: 993px) and (max-height: 360px) and (orientation: landscape) {
    .home-panorama > .home-video-choice { top: calc(var(--panorama-head, 60px) + 1px); }
}
@media (max-width: 419px), (min-width: 993px) and (max-height: 360px) and (orientation: landscape) {
    .home-video-choice .home-video-control { width: 44px; padding: 0; gap: 0; }
    .home-video-choice .home-video-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
}
@media (max-width: 419px) {
    .home-video-choice .home-video-icon { border: 0; }
    .home-video-choice .home-video-icon::before { border-width: 7px 0 7px 11px; }
    .home-video-choice .home-video-control[data-enabled="true"] .home-video-icon::before { width: 12px; height: 14px; border-width: 0 4px; }
}
@media (max-width: 399px) {
    #nav-main .mobile-toolbar-row > .home-video-control { gap: 4px; }
    #nav-main .mobile-toolbar-row > .home-video-control .home-video-icon { width: 18px; height: 18px; flex-basis: 18px; }
}
