/* Image Download & Share – one connected toolbar attached to its image */
.idsh-wrap{position:relative;display:inline-block;vertical-align:top;max-width:100%;box-sizing:border-box;margin:0;padding:0;line-height:0}
.idsh-wrap.aligncenter{display:block;width:fit-content;margin-left:auto;margin-right:auto}
.idsh-wrap.alignleft{float:left}
.idsh-wrap.alignright{float:right}
.idsh-wrap>a{display:block;margin:0;padding:0;line-height:0}
.idsh-wrap img{display:block;float:none;max-width:100%;height:auto;margin:0!important;padding:0}

.idsh-bar{position:relative;display:flex;width:100%;box-sizing:border-box;margin:0;padding:0;
	border:1px solid var(--idsh-border,#cfd6dc);border-radius:0 0 var(--idsh-radius,8px) var(--idsh-radius,8px);
	font-family:system-ui,-apple-system,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;line-height:1.2;text-align:center}

.idsh-bar .idsh-btn{flex:1 1 0;min-width:0;display:inline-flex;align-items:center;justify-content:center;gap:6px;
	box-sizing:border-box;margin:0;padding:var(--idsh-pad,8px) 10px;min-height:36px;border:0;border-radius:0;
	background:var(--idsh-dl-bg,#dcebdc);color:var(--idsh-text,#1f2937);
	font-family:inherit;font-size:13px;font-weight:600;line-height:1.2;letter-spacing:0;text-transform:none;text-decoration:none;
	box-shadow:none;cursor:pointer;-webkit-appearance:none;appearance:none;-webkit-tap-highlight-color:transparent;
	transition:filter .15s ease}
.idsh-bar .idsh-btn-sh{background:var(--idsh-sh-bg,#e4e2f3)}
.idsh-bar .idsh-btn+.idsh-btn{border-left:1px solid var(--idsh-border,#cfd6dc)}
.idsh-bar .idsh-btn:first-of-type{border-bottom-left-radius:calc(var(--idsh-radius,8px) - 1px)}
.idsh-bar .idsh-btn:last-of-type{border-bottom-right-radius:calc(var(--idsh-radius,8px) - 1px)}
.idsh-bar .idsh-ico{flex:none;width:16px;height:16px}
.idsh-bar .idsh-label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

@media (hover:hover){.idsh-bar .idsh-btn:hover{filter:brightness(.95)}}
.idsh-bar .idsh-btn:active{filter:brightness(.9)}
.idsh-bar .idsh-btn:focus-visible{outline:2px solid var(--idsh-text,#1f2937);outline-offset:-3px}
.idsh-bar .idsh-btn.idsh-busy{opacity:.6;cursor:progress}
@media (pointer:coarse){.idsh-bar .idsh-btn{min-height:40px}}
@media (max-width:360px){.idsh-bar .idsh-btn{font-size:12px;gap:4px;padding-left:6px;padding-right:6px}}
@media (prefers-reduced-motion:reduce){.idsh-bar .idsh-btn{transition:none}}

/* Status message overlays the bar (no layout shift) */
.idsh-bar .idsh-msg{position:absolute;top:0;right:0;bottom:0;left:0;z-index:2;display:flex;align-items:center;justify-content:center;
	padding:0 10px;background:#1f2937;color:#fff;font-size:13px;font-weight:500;
	border-radius:0 0 calc(var(--idsh-radius,8px) - 1px) calc(var(--idsh-radius,8px) - 1px)}
.idsh-bar .idsh-msg:empty{display:none}
.idsh-bar .idsh-msg--error{background:#9b1c1c}
.idsh-bar .idsh-msg--success{background:#166534}

/* Fallback menu (only when image-file sharing is unavailable) */
.idsh-bar .idsh-menu{position:absolute;left:0;right:0;bottom:100%;margin-bottom:4px;z-index:3;display:flex;flex-direction:column;gap:4px;
	box-sizing:border-box;padding:8px;background:#fff;color:#111827;border:1px solid var(--idsh-border,#cfd6dc);border-radius:8px;
	box-shadow:0 4px 14px rgba(0,0,0,.15);font-size:13px;line-height:1.35;text-align:left}
.idsh-bar .idsh-menu[hidden]{display:none}
.idsh-bar .idsh-menu-note{margin:0 0 2px}
.idsh-bar .idsh-mbtn{display:block;width:100%;box-sizing:border-box;margin:0;padding:8px 10px;border:0;border-radius:6px;background:#f3f4f6;color:#111827;
	font:inherit;font-weight:600;text-align:left;text-transform:none;letter-spacing:0;cursor:pointer;box-shadow:none}
.idsh-bar .idsh-mbtn:hover{background:#e5e7eb}
.idsh-bar .idsh-mbtn:focus-visible{outline:2px solid #111827;outline-offset:1px}
