/* Status page share button, floating pill and share sheet (status-share.js).
   WCAG 2.2 AAA: 7:1 text (#1F1F1F on DMCA green 7.58:1), 44px targets, 3px focus ring, reduced motion. */
.dmca-share-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; border: 0; cursor: pointer; font: inherit; line-height: 1.2; }
.dmca-share-btn svg { width: 18px; height: 18px; fill: currentColor; flex: 0 0 auto; }
.dmca-share-btn[hidden] { display: none !important; }
#certificate-links .dmca-share-btn, .btns-set-1 .dmca-share-btn { background: #6BC530; color: #1F1F1F; border-radius: 6px; padding: 8px 16px; font-weight: 700; }
#certificate-links .dmca-share-btn { margin-left: 8px; }
#certificate-links .dmca-share-btn:hover, .btns-set-1 .dmca-share-btn:hover { background: #1F5209; color: #fff; }
.dmca-share-btn:focus { outline: none; }
.dmca-share-btn:focus-visible { outline: 3px solid #1F1F1F; outline-offset: 3px; }

/* Long right-to-left titles and URLs on the certificate itself */
#asset-title, #asset-url { overflow-wrap: anywhere; unicode-bidi: plaintext; }

/* ---------- Share dialog ---------- */
html.dmca-share-open { overflow: hidden; }
.dmca-share-overlay { position: fixed; inset: 0; z-index: 100000; background: rgba(15, 20, 25, .6); display: flex; align-items: center; justify-content: center; padding: 12px; }
.dmca-share-overlay[hidden] { display: none; }
.dmca-share-panel { position: relative; box-sizing: border-box; background: #fff; color: #1F1F1F; width: 440px; max-width: 100%; max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px);
    overflow: auto; overscroll-behavior: contain; border-radius: 18px; padding: 16px 20px 20px; box-shadow: 0 18px 50px rgba(0, 0, 0, .25), 0 2px 8px rgba(0, 0, 0, .08);
    font: 400 16px/1.45 "Google Sans", "Open Sans", Arial, sans-serif; text-align: start; letter-spacing: normal; text-transform: none; }
.dmca-share-panel *, .dmca-share-panel *::before, .dmca-share-panel *::after { box-sizing: border-box; }
.dmca-share-panel svg { fill: currentColor; flex: 0 0 auto; }
.dmca-share-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.dmca-share-panel h2 { margin: 0; font-size: 18px; line-height: 1.3; font-weight: 700; color: #1F1F1F; }
.dmca-share-close { width: 44px; height: 44px; flex: 0 0 44px; margin: -6px; margin-inline-end: -10px; border: 0; border-radius: 50%; background: #F1F3F1; color: #1F1F1F; display: flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; }
.dmca-share-close svg { width: 22px; height: 22px; }
.dmca-share-close:hover { background: #1F1F1F; color: #fff; }

/* Preview card */
.dmca-share-card { display: flex; gap: 12px; align-items: center; padding: 10px; border: 1px solid #D5DBD2; border-radius: 14px; background: #F7F9F6; margin-bottom: 14px; min-width: 0; }
.dmca-share-thumb { display: block; width: 120px; height: auto; aspect-ratio: 1200 / 630; flex: 0 0 120px; object-fit: cover; border-radius: 8px; background: #E4E9E1; }
.dmca-share-thumb[hidden] { display: none; }
.dmca-share-meta { min-width: 0; flex: 1 1 auto; }
.dmca-share-ttl { margin: 0 0 2px; font-size: 15px; line-height: 1.35; font-weight: 700; color: #1F1F1F; unicode-bidi: plaintext; text-align: start; overflow-wrap: anywhere;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.dmca-share-url { margin: 0 0 6px; font-size: 13px; line-height: 1.35; color: #3D3D3D; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; unicode-bidi: plaintext; text-align: start; }
.dmca-share-url[hidden] { display: none; }
.dmca-share-badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 10px 2px 6px; border-radius: 999px; font-size: 13px; line-height: 20px; font-weight: 700; }
.dmca-share-badge svg { width: 16px; height: 16px; }
.dmca-share-badge.is-ok { background: #E3F2DA; color: #1F5209; }
.dmca-share-badge.is-pending { background: #FFF2CC; color: #523700; }
.dmca-share-badge.is-no { background: #FBE9E7; color: #7A1A10; }

/* Copy link */
.dmca-share-copy { display: flex; width: 100%; min-height: 52px; align-items: center; justify-content: center; gap: 10px; padding: 10px 16px; border: 0; border-radius: 12px;
    background: #6BC530; color: #1F1F1F; font: inherit; font-size: 17px; font-weight: 700; cursor: pointer; margin-bottom: 10px; }
.dmca-share-copy svg { width: 22px; height: 22px; }
.dmca-share-copy .ok { display: none; }
.dmca-share-copy.is-done .ok { display: block; }
.dmca-share-copy.is-done .i { display: none; }
.dmca-share-copy:hover, .dmca-share-copy.is-done { background: #1F5209; color: #fff; }

.dmca-share-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.dmca-share-row button { flex: 1 1 0; min-width: 120px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 8px 12px;
    border: 2px solid #1F1F1F; border-radius: 10px; background: #fff; color: #1F1F1F; font: inherit; font-size: 15px; font-weight: 700; cursor: pointer; }
.dmca-share-row button svg { width: 20px; height: 20px; }
.dmca-share-row button:hover, .dmca-share-row button[aria-expanded="true"] { background: #1F1F1F; color: #fff; }
.dmca-share-row button[hidden] { display: none; }
.dmca-share-qr { text-align: center; margin: -4px 0 14px; padding: 12px; border: 1px solid #D5DBD2; border-radius: 14px; }
.dmca-share-qr[hidden] { display: none; }
.dmca-share-qr img { width: 180px; height: 180px; display: inline-block; }
.dmca-share-qr p { margin: 6px 0 0; font-size: 14px; color: #3D3D3D; }

/* Network grid */
.dmca-share-sub { margin: 0 0 8px; font-size: 14px; line-height: 1.3; font-weight: 700; color: #3D3D3D; text-transform: none; letter-spacing: normal; }
.dmca-share-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; }
.dmca-share-grid[hidden] { display: none; }
.dmca-share-grid li { margin: 0; padding: 0; list-style: none; min-width: 0; }
.dmca-share-grid-more { margin-top: 4px; }
.dmca-share-net { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 100%; min-height: 84px; border: 0; background: none; padding: 8px 2px; border-radius: 12px;
    cursor: pointer; font: inherit; font-size: 13px; line-height: 1.25; color: #1F1F1F; }
.dmca-share-net:hover { background: #EEF2EC; }
.dmca-share-net .dot { width: 48px; height: 48px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 18px; }
.dmca-share-net .dot svg { width: 24px; height: 24px; }
.dmca-share-net .lbl { max-width: 100%; text-align: center; overflow-wrap: anywhere; }
.dmca-share-more { display: block; width: 100%; min-height: 44px; margin-top: 6px; border: 0; border-radius: 10px; background: #F1F3F1; color: #1F1F1F; font: inherit; font-size: 15px; font-weight: 700; cursor: pointer; padding: 8px; }
.dmca-share-more:hover { background: #1F1F1F; color: #fff; }

/* Confirmation toast (role=status inside the dialog) */
.dmca-share-toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); z-index: 100001; transform: translate(-50%, 12px); max-width: calc(100vw - 32px);
    padding: 12px 18px; border-radius: 12px; background: #1F1F1F; color: #fff; font-size: 15px; font-weight: 700; line-height: 1.3; opacity: 0; pointer-events: none;
    transition: opacity .2s, transform .2s; box-shadow: 0 8px 24px rgba(0, 0, 0, .25); }
.dmca-share-toast:empty { padding: 0; }
.dmca-share-toast.show { opacity: 1; transform: translate(-50%, 0); }

/* Focus: 3px dark ring with a white gap so it shows on green, white and grey */
.dmca-share-panel button:focus { outline: none; }
.dmca-share-panel button:focus-visible { outline: 3px solid #1F1F1F; outline-offset: 2px; box-shadow: 0 0 0 2px #fff; }
.dmca-share-panel:focus { outline: none; }

/* Phones: bottom sheet sized to its content */
@media (max-width: 600px) {
    .dmca-share-overlay { align-items: flex-end; padding: 0; }
    .dmca-share-panel { width: 100%; max-height: calc(100vh - 16px); max-height: calc(100dvh - 16px); border-radius: 20px 20px 0 0;
        padding: 10px max(16px, env(safe-area-inset-right)) calc(18px + env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left)); }
    .dmca-share-panel::before { content: ""; display: block; width: 40px; height: 5px; border-radius: 3px; background: #8A8F87; margin: 0 auto 8px; }
    .dmca-share-thumb { width: 96px; flex-basis: 96px; }
    .dmca-share-toast { bottom: calc(16px + env(safe-area-inset-bottom)); }
}
@media (max-width: 360px) {
    .dmca-share-thumb { width: 76px; flex-basis: 76px; }
    .dmca-share-net { font-size: 12px; }
    .dmca-share-net .dot { width: 44px; height: 44px; }
}
@media (max-width: 991.9px) {
    #certificate-links .dmca-share-btn { margin: 0 auto; }
    .btns-set-1 .dmca-share-btn { margin-bottom: 10px; }
}

/* ---------- Floating Share pill ---------- */
.dmca-share-fab { position: fixed; z-index: 99990; right: calc(var(--dmca-fab-right, 20px) + env(safe-area-inset-right)); bottom: calc(var(--dmca-fab-bottom, 20px) + env(safe-area-inset-bottom));
    display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 20px 0 16px; border: 0; border-radius: 999px;
    background: #6BC530; color: #1F1F1F; font: 700 16px/1 "Google Sans", "Open Sans", Arial, sans-serif; letter-spacing: .01em; cursor: pointer;
    box-shadow: 0 6px 18px rgba(46, 94, 16, .28), 0 2px 6px rgba(0, 0, 0, .12); -webkit-tap-highlight-color: transparent;
    transition: background-color .2s, color .2s, box-shadow .2s, transform .2s, bottom .25s, right .25s; animation: dmca-fab-in .45s cubic-bezier(.2, .9, .3, 1.2) .3s both; }
.dmca-share-fab svg { width: 20px; height: 20px; fill: currentColor; flex: 0 0 auto; }
.dmca-share-fab:hover { background: #1F5209; color: #fff; box-shadow: 0 10px 24px rgba(46, 94, 16, .32), 0 3px 8px rgba(0, 0, 0, .14); transform: translateY(-1px); }
.dmca-share-fab:active { transform: translateY(0) scale(.97); }
.dmca-share-fab:focus { outline: none; }
.dmca-share-fab:focus-visible { outline: 3px solid #1F1F1F; outline-offset: 3px; box-shadow: 0 0 0 3px #fff, 0 6px 18px rgba(46, 94, 16, .28); }
.dmca-share-fab.dmca-share-fab-pulse { animation: dmca-fab-in .45s cubic-bezier(.2, .9, .3, 1.2) both, dmca-fab-pulse 1.4s ease-out 1; }
html.dmca-share-popped .dmca-share-fab, html.dmca-share-open .dmca-share-fab { opacity: 0; pointer-events: none; transform: scale(.9); }
@keyframes dmca-fab-in { from { opacity: 0; transform: translateY(16px) scale(.92); } to { opacity: 1; transform: none; } }
@keyframes dmca-fab-pulse { 0% { box-shadow: 0 0 0 0 rgba(107, 197, 48, .55), 0 6px 18px rgba(46, 94, 16, .28); } 70% { box-shadow: 0 0 0 16px rgba(107, 197, 48, 0), 0 6px 18px rgba(46, 94, 16, .28); } 100% { box-shadow: 0 0 0 0 rgba(107, 197, 48, 0), 0 6px 18px rgba(46, 94, 16, .28); } }

/* Desktop: the dialog pops over from the floating pill */
.dmca-share-overlay.dmca-share-popover { background: transparent; display: block; padding: 0; }
.dmca-share-overlay.dmca-share-popover[hidden] { display: none; }
.dmca-share-popover .dmca-share-panel { position: fixed; right: calc(var(--dmca-fab-right, 20px) + env(safe-area-inset-right)); bottom: calc(var(--dmca-fab-bottom, 20px) + env(safe-area-inset-bottom));
    width: 400px; max-height: calc(100vh - 40px); transform-origin: bottom right; animation: dmca-pop-in .22s cubic-bezier(.2, .9, .3, 1.1) both;
    box-shadow: 0 18px 50px rgba(0, 0, 0, .25), 0 0 0 1px rgba(0, 0, 0, .06); }
.dmca-share-overlay:not(.dmca-share-popover) .dmca-share-panel { animation: dmca-sheet-in .25s ease-out both; }
@keyframes dmca-pop-in { from { opacity: 0; transform: translateY(12px) scale(.94); } to { opacity: 1; transform: none; } }
@keyframes dmca-sheet-in { from { opacity: 0; transform: translateY(32px); } to { opacity: 1; transform: none; } }
html.dmca-share-popped { overflow: auto; }

@media (max-width: 600px) {
    .dmca-share-fab { font-size: 15px; padding: 0 18px 0 14px; }
}
@media (prefers-reduced-motion: reduce) {
    .dmca-share-fab, .dmca-share-fab.dmca-share-fab-pulse, .dmca-share-popover .dmca-share-panel, .dmca-share-overlay:not(.dmca-share-popover) .dmca-share-panel, .dmca-share-toast { animation: none; transition: none; }
}

/* ---------- Floating Share: 48x48 rounded square, bottom middle next to Subscribe (status-share.js placeFab) ---------- */
.dmca-share-fab { left: calc(var(--dmca-fab-left, 50%) + env(safe-area-inset-left)) !important; right: auto !important;
    width: var(--dmca-pair-w, 132px); height: 56px; min-height: 56px; padding: 0 12px !important; justify-content: center; gap: 8px; border-radius: 12px; box-sizing: border-box; font: 700 16px/1.2 "Google Sans", "Open Sans", Arial, sans-serif; white-space: nowrap;
    border: 1px solid #4E9A23; }
.dmca-share-fab svg { width: 24px; height: 24px; }
.dmca-share-fab .lbl { position: static; overflow: hidden; text-overflow: ellipsis; }
.dmca-share-fab svg { flex: 0 0 24px; }
.dmca-share-fab::after { display: none !important; }
.dmca-share-fab::after { content: attr(data-tip); position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%);
    background: #1F1F1F; color: #fff; font: 700 14px/1 "Google Sans", "Open Sans", Arial, sans-serif; padding: 8px 10px; border-radius: 6px;
    white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity .15s; }
.dmca-share-fab:hover::after, .dmca-share-fab:focus-visible::after { opacity: 1; }
/* Subscribe adopts the Share colours, border, shadow and focus ring (Share is the source of truth) */
html body #subscribe-btn.is-visible { background: #6BC530 !important; color: #1F1F1F !important; border: 1px solid #4E9A23 !important; box-shadow: 0 6px 18px rgba(46, 94, 16, .28), 0 2px 6px rgba(0, 0, 0, .12) !important; height: 56px !important; min-height: 56px !important; max-height: 56px !important; border-radius: 12px !important;
    width: var(--dmca-pair-w, 132px) !important; max-width: none !important; box-sizing: border-box !important; padding-left: 12px !important; padding-right: 12px !important; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 16px !important; font-weight: 700 !important; }
#subscribe-btn { background: #6BC530 !important; color: #1F1F1F !important; border: 1px solid #4E9A23 !important;
    box-shadow: 0 6px 18px rgba(46, 94, 16, .28), 0 2px 6px rgba(0, 0, 0, .12) !important; min-height: 56px; line-height: 1.2;
    padding-top: 0 !important; padding-bottom: 0 !important; font-family: "Google Sans", "Open Sans", Arial, sans-serif; z-index: 99989;
    bottom: calc(16px + env(safe-area-inset-bottom)); }
html body #subscribe-btn:hover { background: #1F5209 !important; color: #fff !important; }
#subscribe-btn:focus { outline: none; }
#subscribe-btn:focus-visible { outline: 3px solid #1F1F1F; outline-offset: 3px; box-shadow: 0 0 0 3px #fff, 0 6px 18px rgba(46, 94, 16, .28) !important; }
