/* AMAR share (mu-plugins/amar-share): the Share button in every page head, the round share button on items, and the panel.
   Loaded only where the feature is on for the viewer (AMAR_SHARE_LIVE, the team, or ?amar_share=1). */

/* ================================================================ the icon: an arrow rising out of an open box
   (a mask, so it takes the text colour; not ↗, which already means "leaves the site") */
.amar-share-btn::before, .amar-share-i::before {
	content: ""; flex: none; width: 18px; height: 18px; background: currentColor;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 14.5V3.5'/%3E%3Cpath d='M8 7.5l4-4 4 4'/%3E%3Cpath d='M8.5 10.5H7a2 2 0 0 0-2 2V19a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2v-6.5a2 2 0 0 0-2-2h-1.5'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 14.5V3.5'/%3E%3Cpath d='M8 7.5l4-4 4 4'/%3E%3Cpath d='M8.5 10.5H7a2 2 0 0 0-2 2V19a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2v-6.5a2 2 0 0 0-2-2h-1.5'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* ================================================================ the page's button, at the end of the head's tools row
   (the head-tools rule: bottom-aligned at rest, docked and stuck; never folded behind Filters) */
.amar-share-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 42px; margin: 0; padding: 0 16px; padding-inline-start: 13px;
	border-radius: 999px; border: 1px solid var(--sec-tool-line, rgba(255, 255, 255, .38)); background: var(--sec-tool, transparent); color: var(--sec-fg, inherit);
	font: inherit; font-size: 14px; font-weight: 600; line-height: 1; white-space: nowrap; cursor: pointer; pointer-events: auto;
}
.lang-ar .amar-share-btn { font-size: 15px; }
.amar-share-btn:hover { border-color: var(--sec-fg); }
.amar-share-btn[aria-expanded="true"] { background: var(--sec-fg); border-color: var(--sec-fg); color: var(--sec-bg); }
.amar-share-btn:focus-visible { outline: 2px solid var(--sec-fg); outline-offset: 2px; }
.ed-strip.is-stuck .amar-share-btn { height: 36px; padding: 0 14px; padding-inline-start: 11px; font-size: 13px; }
.lang-ar .ed-strip.is-stuck .amar-share-btn { font-size: 14px; }

/* tools | Filters | Share */
.ed-strip.has-share .ed-strip__tools { grid-template-columns: minmax(0, 1fr) auto auto; }
.ed-strip.has-share .amar-share-btn { grid-column: 3; grid-row: 1; align-self: end; }
/* a head without tools: the button gets the row to itself, at its end: the bottom of the head */
.ed-strip.has-share:not(.has-tools) { height: auto; margin-bottom: 28px; }
.ed-strip.has-share:not(.has-tools) .ed-strip__tools {
	display: grid; padding-block: 0 18px; border-top: 0;
	background: var(--sec-bg); box-shadow: 0 0 0 100vmax var(--sec-bg), 0 -2px 0 0 var(--sec-bg); clip-path: inset(-2px -100vmax 0 -100vmax);
}
.ed-strip.has-share:not(.has-tools) .ed-strip__tools-in:empty { display: block; min-height: 0; }
@media (min-width: 1024px) { .ed-htools .ed-strip.has-share .ed-strip__tools { padding-inline: var(--ph-s, 0) var(--ph-e, 0); } }
/* …and once stuck, it goes up beside the small title: the row folds to nothing and stops clipping (its colour is not
   needed there). Under the links column (.has-rail) the row keeps its height and colour, and the button stays in it. */
.ed-strip.has-share.is-stuck:not(.has-tools):not(.has-rail) .amar-share-btn { position: absolute; z-index: 3; inset-inline-end: 0; top: calc(9px - var(--strip-t)); }
@media (min-width: 1024px) { .ed-strip.has-share.is-stuck:not(.has-tools):not(.has-rail) .amar-share-btn { inset-inline-end: var(--ph-e, 0); top: calc(13px - var(--strip-t)); } }
.ed-strip.has-share.is-stuck:not(.has-tools):not(.has-rail) .ed-strip__tools { padding-block: 0; min-height: 0; clip-path: none; box-shadow: none; background: none; }
.ed-strip.has-share.is-stuck.has-rail:not(.has-tools) .ed-strip__tools { padding-block: 0 10px; }
.ed-strip.has-share:not(.has-tools):not(.has-rail) .ed-strip__titles { padding-inline-end: 132px; }
.lang-ar .ed-strip.has-share:not(.has-tools):not(.has-rail) .ed-strip__titles { padding-inline-end: 140px; }

/* the home (no head strip): under the opening's text, at its end, on the ink ground */
.hg-share-slot { display: flex; justify-content: flex-end; margin-top: 18px; --sec-fg: #fff; --sec-bg: #1f1f1d; --sec-tool: rgba(255, 255, 255, .1); --sec-tool-line: rgba(255, 255, 255, .45); }
.hg-share-slot:empty { display: none; }

/* phones: once stuck, the icon alone (its accessible name stays "Share") */
@media (max-width: 640px) {
	.ed-strip.is-stuck .amar-share-btn { width: 36px; padding: 0; }
	.ed-strip.is-stuck .amar-share-btn__l { display: none; }
	.ed-strip.has-share:not(.has-tools):not(.has-rail) .ed-strip__titles, .lang-ar .ed-strip.has-share:not(.has-tools):not(.has-rail) .ed-strip__titles { padding-inline-end: 48px; }
	.ed-strip.has-share:not(.has-tools) .ed-strip__tools { padding-block: 0 14px; }
}

/* ================================================================ an item's button (apps print it hidden; shown here) */
.amar-share-i[hidden] { display: inline-grid; }
.amar-share-i {
	display: inline-grid; place-items: center; flex: none; width: 36px; height: 36px; margin: 0; padding: 0; border-radius: 50%;
	border: 1.5px solid currentColor; background: transparent; color: inherit; cursor: pointer; vertical-align: middle;
}
.amar-share-i:hover { background: rgba(128, 128, 128, .16); }
.amar-share-i[aria-expanded="true"] { box-shadow: inset 0 0 0 1.5px currentColor; background: rgba(128, 128, 128, .22); }
.amar-share-i:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
.amar-share-i--s { width: 30px; height: 30px; border-width: 1px; }
.amar-share-i--s::before { width: 15px; height: 15px; }
.amar-share-i--l { width: 44px; height: 44px; }
.amar-share-i--l::before { width: 20px; height: 20px; }

/* where the apps put it (their own files only print the button) */
.pd-share { margin-inline-start: 4px; color: inherit; }                                      /* Press: an open piece */
.tl-timeline .tl-share { display: inline-grid; margin: 2px 0 12px; color: var(--navy, #32365f); } /* Timeline: under the name */

/* ================================================================ the panel */
.ash {
	position: fixed; z-index: 100001; top: 0; left: 0; width: min(372px, calc(100vw - 24px)); box-sizing: border-box;
	display: flex; flex-direction: column; gap: 14px; padding: 16px 18px; background: #fff; color: #22221f;
	box-shadow: 0 0 0 1px rgba(34, 34, 31, .1), 0 18px 48px rgba(34, 34, 31, .26);
	font-family: var(--font, Manrope, system-ui, sans-serif); font-size: 14px; line-height: 1.4; text-align: start;
}
.ash[lang="ar"] { font-family: var(--font-ar, "Noto Sans Arabic", system-ui, sans-serif); }
.ash[hidden], .ash-scrim[hidden], .ash [hidden] { display: none !important; }
.ash *, .ash *::before, .ash *::after { box-sizing: border-box; }
.ash__caret {
	position: absolute; top: -7px; left: var(--caret-x, 40px); width: 14px; height: 14px; background: #fff; transform: rotate(45deg);
	box-shadow: -1px -1px 0 rgba(34, 34, 31, .1);
}
.ash.is-above .ash__caret { top: auto; bottom: -7px; box-shadow: 1px 1px 0 rgba(34, 34, 31, .1); }
.ash__grip { display: none; }
.ash__top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ash__h { margin: 0; color: inherit; font: inherit; font-size: 12.5px; font-weight: 800; line-height: 1.2; letter-spacing: .08em; text-transform: uppercase; }
.ash[lang="ar"] .ash__h { font-size: 14.5px; letter-spacing: 0; text-transform: none; }
.ash__x { display: grid; place-items: center; width: 32px; height: 32px; margin: 0; padding: 0; border: 0; border-radius: 50%; background: transparent; color: inherit; cursor: pointer; }
.ash__x svg { width: 16px; height: 16px; }
.ash__x:hover { background: #f1f0ec; }
.ash__pv { display: flex; align-items: center; gap: 14px; padding: 10px; background: #f1f0ec; }
.ash__img { display: block; flex: none; width: 72px; height: 72px; object-fit: cover; background: #e4e2db; }
.ash__pvt { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.ash__kind { color: #a83d24; font-size: 11px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.ash[lang="ar"] .ash__kind { font-size: 12.5px; letter-spacing: 0; text-transform: none; }
.ash__t { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 3; font-size: 15.5px; font-weight: 700; line-height: 1.3; }
.ash__dom { color: #5f5e58; font-size: 12px; }
.ash[dir="rtl"] .ash__dom { text-align: right; }
.ash__ch { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; }
.ash__c {
	display: flex; flex-direction: column; align-items: center; gap: 7px; margin: 0; padding: 10px 4px 8px; border: 0; border-radius: 4px;
	background: transparent; color: #22221f; font: inherit; font-size: 12.5px; font-weight: 600; line-height: 1.25; text-align: center; text-decoration: none; cursor: pointer;
}
.ash[lang="ar"] .ash__c { font-size: 13.5px; }
.ash__c:hover, .ash__c:focus { color: #22221f; text-decoration: none; }
.ash__i { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; background: #f1f0ec; color: #22221f; transition: background-color .15s ease, color .15s ease; }
.ash__i svg { width: 22px; height: 22px; }
.ash__c:hover .ash__i, .ash__c:focus-visible .ash__i, .ash.is-copied [data-c="copy"] .ash__i { background: #22221f; color: #fff; }
.ash__c:focus-visible, .ash__copy:focus-visible, .ash__x:focus-visible, .ash__more:focus-visible { outline: 2px solid #32365f; outline-offset: 2px; }
.ash__note { margin: 0; color: #5c5b55; font-size: 13px; }
.ash__url { display: flex; align-items: center; gap: 8px; }
.ash__u {
	flex: 1; min-width: 0; height: 40px; margin: 0; padding: 0 12px; border: 1px solid rgba(34, 34, 31, .22); border-radius: 0; background: #fff; box-shadow: none;
	color: #22221f; font: 500 13.5px/1 Manrope, system-ui, sans-serif;
}
.ash__u:focus { outline: 2px solid #32365f; outline-offset: 0; }
.ash__copy {
	height: 40px; margin: 0; padding: 0 16px; border: 0; border-radius: 20px; background: #22221f; color: #fff;
	font: inherit; font-size: 13.5px; font-weight: 700; line-height: 1; white-space: nowrap; cursor: pointer;
}
.ash__msg { margin: -6px 0 0; color: #5c5b55; font-size: 12.5px; }
.ash__msg:empty { display: none; }
.ash__more {
	display: flex; align-items: center; gap: 10px; margin: 0; padding: 12px 2px 0; border: 0; border-top: 1px solid rgba(34, 34, 31, .12);
	background: transparent; color: #22221f; font: inherit; font-size: 13px; text-align: start; cursor: pointer;
}
.ash__more svg { flex: none; width: 18px; height: 18px; }
.ash__more small { color: #5f5e58; font-size: 12.5px; }
.ash__sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
/* a private page: its own link, for the team */
.ash.is-team .ash__pv, .ash.is-team .ash__ch, .ash.is-team .ash__more { display: none; }

/* phones without a share menu: a sheet from the bottom */
.ash-scrim { position: fixed; z-index: 100000; inset: 0; background: rgba(20, 20, 18, .5); }
.ash.is-sheet {
	inset: auto 0 0 0 !important; width: 100%; padding: 8px 16px calc(22px + env(safe-area-inset-bottom, 0px)); border-radius: 18px 18px 0 0;
	max-height: calc(100vh - 40px); overflow-y: auto;
}
.ash.is-sheet .ash__caret { display: none; }
.ash.is-sheet .ash__grip { display: block; align-self: center; width: 38px; height: 5px; border-radius: 3px; background: rgba(34, 34, 31, .22); }
.ash.is-sheet .ash__x { width: 44px; height: 44px; background: #f1f0ec; }
.ash.is-sheet .ash__i { width: 54px; height: 54px; }
.ash.is-sheet .ash__i svg { width: 24px; height: 24px; }
.ash.is-sheet .ash__c { font-size: 13px; }
.ash.is-sheet .ash__u, .ash.is-sheet .ash__copy { height: 44px; }
.ash.is-sheet .ash__copy { border-radius: 22px; }
@media (prefers-reduced-motion: no-preference) {
	.ash { animation: ash-in .14s ease-out; }
	.ash.is-sheet { animation: ash-up .2s ease-out; }
}
@keyframes ash-in { from { opacity: 0; transform: translateY(-4px); } }
@keyframes ash-up { from { transform: translateY(40px); opacity: .4; } }
@media print { .amar-share-btn, .amar-share-i, .ash, .ash-scrim { display: none !important; } }
