#fdb-bar { position: fixed; z-index: 99990; box-sizing: border-box; margin: 0; border: 1px solid rgba(0,0,0,.12); border-radius: 14px; background: rgba(255,255,255,.97); box-shadow: 0 4px 28px rgba(0,0,0,.22); padding: 10px; line-height: 1; }
#fdb-bar.fdb-bar--bottom { bottom: calc(12px + env(safe-area-inset-bottom, 0px)); left: 50%; transform: translateX(-50%); max-width: calc(100vw - 24px); }
#fdb-bar .fdb-bar__inner { display: flex; align-items: center; gap: 10px; overflow-x: auto; overscroll-behavior-inline: contain; max-width: 100%; padding: 2px; }
#fdb-bar .fdb-form { flex: 0 0 auto; display: block; margin: 0; padding: 0; border: 0; background: none; }
#fdb-bar .fdb-button { display: block; margin: 0; padding: 0; border: 0; border-radius: 8px; background: transparent; box-shadow: none; width: auto; min-height: 44px; cursor: pointer; line-height: 0; overflow: hidden; }
#fdb-bar .fdb-click { text-decoration: none; }
#fdb-bar noscript .fdb-button { line-height: 0; }
html:not(.fdb-js) #fdb-bar .fdb-click { display: none; }
#fdb-bar .fdb-button:hover { filter: brightness(1.06); }
#fdb-bar .fdb-button:focus-visible { outline: 3px solid #1674e8; outline-offset: 2px; }
#fdb-bar .fdb-button-image { display: block; height: var(--fdb-desktop-height, 300px); max-height: none; width: auto; max-width: min(1200px, calc(100vw - 52px)); min-width: 44px; object-fit: contain; margin: 0; padding: 0; border: 0; border-radius: 0; }
#fdb-bar.fdb-bar--right { right: 12px; top: 50%; transform: translateY(-50%); max-height: 75vh; max-width: calc(100vw - 24px); }
#fdb-bar.fdb-bar--right .fdb-bar__inner { flex-direction: column; max-height: calc(75vh - 24px); overflow-y: auto; }
#fdb-spacer { display: block; height: 350px; margin: 0; padding: 0; border: 0; }
@media (min-width: 769px) { body:has(#fdb-bar.fdb-bar--right) #fdb-spacer { height: 0; } }
@media (max-width: 768px) {
    #fdb-bar.fdb-bar--bottom, #fdb-bar.fdb-bar--right { top: auto; right: auto; bottom: 0; left: 0; transform: none; width: 100%; max-width: 100%; max-height: none; border-radius: 12px 12px 0 0; padding: 8px 8px calc(8px + env(safe-area-inset-bottom, 0px)); }
    #fdb-bar .fdb-bar__inner, #fdb-bar.fdb-bar--right .fdb-bar__inner { flex-direction: row; max-height: none; overflow-y: hidden; overflow-x: auto; gap: 8px; }
    #fdb-bar .fdb-button-image { height: var(--fdb-mobile-height, 240px); max-width: calc(100vw - 28px); }
    #fdb-spacer { height: calc(280px + env(safe-area-inset-bottom, 0px)); }
}
@media print { #fdb-bar, #fdb-spacer { display: none !important; } }

/* Standard right placement and dismiss control, on desktop and mobile. */
#fdb-bar[hidden],#fdb-spacer[hidden]{display:none!important}
#fdb-bar .fdb-close{position:absolute;right:0;top:-32px;width:30px;height:30px;min-height:30px;display:grid;place-items:center;padding:0;border:1px solid #fff;border-radius:50%;background:#202020;color:#fff;font:25px/1 Arial,sans-serif;cursor:pointer;z-index:2;box-shadow:0 2px 8px #0005}
html:not(.fdb-js) #fdb-bar .fdb-close{display:none}
#fdb-bar .fdb-close:focus-visible{outline:3px solid #1674e8;outline-offset:2px}
#fdb-bar.fdb-bar--right{left:auto;right:max(12px,env(safe-area-inset-right,0px));top:50%;bottom:auto;transform:translateY(-50%);width:auto;max-width:calc(100vw - 24px);max-height:75vh;border-radius:14px;padding:10px}
#fdb-bar.fdb-bar--right .fdb-bar__inner{flex-direction:column;max-height:calc(75vh - 24px);overflow-y:auto;overflow-x:hidden;gap:10px}
body:has(#fdb-bar.fdb-bar--right) #fdb-spacer{height:0}
@media(max-width:768px){#fdb-bar.fdb-bar--right{right:max(10px,env(safe-area-inset-right,0px));max-width:calc(100vw - 20px);padding:8px}#fdb-bar.fdb-bar--right .fdb-button-image{height:var(--fdb-mobile-height,240px);max-width:min(189px,calc(100vw - 40px))}#fdb-bar.fdb-bar--right .fdb-bar__inner{max-height:calc(75vh - 20px)}}

/* Compact right dock: proportional images, one active mobile entry. */
#fdb-bar.fdb-bar--right{max-width:211px}
#fdb-bar.fdb-bar--right .fdb-button-image{width:auto!important;height:auto!important;max-width:189px!important;max-height:min(var(--fdb-desktop-height,300px),267px);object-fit:contain}
#fdb-bar .fdb-label{display:block;padding:6px;background:#171717;color:#fff;font:12px/16px Arial,sans-serif;text-align:center;overflow-wrap:anywhere}
#fdb-bar .fdb-close{top:-14px;right:-4px}
#fdb-bar .fdb-switch{display:none}
@media(max-width:768px){
 #fdb-bar.fdb-bar--right{max-width:180px}
 #fdb-bar.fdb-bar--right .fdb-button-image{max-width:160px!important;max-height:min(var(--fdb-mobile-height,240px),205px)}
 html.fdb-js #fdb-bar.fdb-bar--right .fdb-form:not(.fdb-active){display:none}
 #fdb-bar .fdb-switch{display:flex;gap:4px;margin-top:6px;max-width:160px}
 #fdb-bar .fdb-switch button{flex:1;min-width:0;height:30px;padding:0 4px;border:1px solid #bbb;border-radius:6px;background:#202020;color:#fff;font-size:11px;cursor:pointer;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
 #fdb-bar .fdb-switch button[aria-pressed="true"]{background:#fff;color:#111}
}
