/**
 * AdminEase — Sticky Notes pad (loaded on every WP admin page).
 *
 * These selectors sit outside .pwp-app, so nothing here may use a --pwp-* token.
 * Instead the pad follows core the same way the native admin lists do: white, grey hairlines,
 * no colour of its own, and every coloured part of the pad - the panel header, the launcher,
 * the markers, the number badge on a note, the accent bar on the row being edited - is painted
 * with --wp-admin-theme-color, so the pad follows the Administration Colour Scheme the user
 * picked in their profile.
 * Core declares that property per body.admin-color-* class and has no block for the default
 * scheme, so the fallback here is #2271b1, which is exactly the default scheme's own accent.
 * Radii, gaps and font sizes are --wpds-* tokens with the WordPress 7.1 value as the fallback.
 *
 * The stylesheet declares no dependency of its own. wp-base-styles, which publishes
 * --wp-admin-theme-color, is already a dependency of core's wp-admin handle and so is on
 * every admin screen anyway, and custom properties resolve independently of source order.
 * wp-theme, which publishes the --wpds-* layer, is a 9KB file core only loads with the
 * block editor, so it is deliberately left out and the fallbacks below carry the
 * WordPress 7.1 values instead. The pad renders identically either way.
 *
 * Three z-index bands keep the pieces apart: markers sit at 9997 so they never cover the
 * floating launcher at 9999, and the panel sits at 99998, under core's admin bar at 99999
 * so the toolbar stays usable while the panel is open.
 */


/* ── Launcher, shared ─────────────────────────────────────────────── */
.ae-notes-launcher {
	position: relative;
}

.ae-notes-launcher-btn {
	position: relative;
	cursor: pointer;
}

.ae-notes-launcher-btn:focus-visible {
	outline: var(--wpds-border-width-focus, 2px) solid var(--wp-admin-theme-color, #2271b1);
	outline-offset: 2px;
}

.ae-notes-count {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 19px;
    height: 19px;
	background: var(--wpds-color-foreground-content-error-weak, #cc1818);
	border-radius: 50px;
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	line-height: 19px;
	text-align: center;
}

.ae-notes-count[hidden] {
	display: none;
}


/* ── Launcher, floating ───────────────────────────────────────────── */
.ae-notes-launcher--floating {
	position: fixed;
	right: 24px;
	bottom: 24px;
	z-index: 9999;
	transition: right 0.2s ease;
}

.ae-notes-launcher--floating .ae-notes-launcher-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	padding: 0;
	background: var(--wp-admin-theme-color, #2271b1);
	border: 0;
	border-radius: 50%;
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.22);
	color: #fff;
	transition: transform 0.15s ease, filter 0.15s ease;
}

.ae-notes-launcher--floating .ae-notes-launcher-btn:hover,
.ae-notes-launcher--floating .ae-notes-launcher-btn:focus {
	color: #fff;
	filter: brightness(0.9);
	transform: translateY(-2px);
}

.ae-notes-launcher--floating .ae-notes-launcher-btn svg {
	width: 20px;
	height: 20px;
}

.ae-notes-launcher--floating .ae-notes-count {
	position: absolute;
	top: -4px;
	right: -4px;
}

body.ae-notes-open .ae-notes-launcher--floating {
	right: 364px;
}


/* ── Launcher, admin bar ──────────────────────────────────────────── */

/*
 * Core resets every descendant of #wpadminbar with `#wpadminbar *`, which zeroes
 * position, padding, height, border-radius and box-sizing at a specificity a plain
 * class cannot beat. Every rule in this section is therefore prefixed, and restates
 * the properties that reset would otherwise take back.
 */
#wpadminbar .ae-notes-launcher--bar {
	position: relative;
}

#wpadminbar .ae-notes-launcher--bar > .ab-item {
	display: flex;
	align-items: center;
}

#wpadminbar .ae-notes-launcher--bar .ae-notes-launcher-btn {
	display: flex;
	align-items: center;
	gap: 6px;
	box-sizing: border-box;
	height: 32px;
	padding: 0;
	background: none;
	border: 0;
	color: inherit;
	line-height: 1;
}

#wpadminbar .ae-notes-launcher--bar .ae-notes-launcher-btn svg {
	flex: 0 0 auto;
	width: 18px;
	height: 18px;
}

#wpadminbar .ae-notes-launcher--bar .ae-notes-count {
	box-sizing: border-box;
	min-width: 18px;
	height: 18px;
	padding: 0 5px;
	border-radius: 9px;
	font-size: 11px;
	font-weight: 600;
	line-height: 18px;
	text-align: center;
}


/* ── The panel ────────────────────────────────────────────────────── */

/*
 * The panel is kept out of the flow and slid in from the right edge. It is never given
 * the hidden attribute, because the slide has to animate; visibility carries the same
 * meaning for assistive technology and for the tab order, and animates cleanly.
 */
.ae-notes-panel {
	position: fixed;
	top: 32px;
	right: 0;
	bottom: 0;
	z-index: 99998;
	display: flex;
	flex-direction: column;
	box-sizing: border-box;
	width: 340px;
	max-width: calc(100vw - 32px);
	background: #fff;
	border-left: 1px solid #c3c4c7;
	box-shadow: -6px 0 24px rgba(0, 0, 0, 0.14);
	color: #1d2327;
	font-size: var(--wpds-typography-font-size-md, 13px);
	line-height: 1.5;
	transform: translateX(100%);
	transition: transform 0.2s ease, visibility 0.2s ease;
	visibility: hidden;
}

.ae-notes-panel.is-open {
	transform: translateX(0);
	visibility: visible;
}

.ae-notes-panel:focus {
	outline: 0;
}

.ae-notes-panel-head {
	display: flex;
	align-items: center;
	gap: var(--wpds-dimension-gap-xs, 4px);
	flex: 0 0 auto;
	padding: var(--wpds-dimension-padding-sm, 8px) var(--wpds-dimension-padding-md, 12px);
	background: var(--wp-admin-theme-color, #2271b1);
	color: #fff;
}

.ae-notes-panel-title {
	flex: 1 1 auto;
	font-size: var(--wpds-typography-font-size-lg, 15px);
	font-weight: 600;
}

.ae-notes-panel-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	box-sizing: border-box;
	width: 26px;
	height: 26px;
	padding: 0;
	background: none;
	border: 0;
	border-radius: var(--wpds-border-radius-sm, 2px);
	color: #fff;
	cursor: pointer;
	opacity: 0.85;
}

.ae-notes-panel-btn:hover,
.ae-notes-panel-btn:focus {
	background: rgba(255, 255, 255, 0.25);
	color: #fff;
	opacity: 1;
}

.ae-notes-panel-btn:focus-visible {
	outline: var(--wpds-border-width-focus, 2px) solid #fff;
	outline-offset: -1px;
}

.ae-notes-panel-btn.is-busy {
	cursor: default;
	opacity: 1;
}

.ae-notes-panel-btn.is-busy svg {
	display: none;
}

/*
 * The head sits on the accent colour, so the spinner that takes the add icon's place
 * while a note is being written is drawn in white rather than the grey it wears in
 * the list below.
 */
.ae-notes-panel-btn .ae-notes-spinner {
	width: 14px;
	height: 14px;
	border-color: rgba(255, 255, 255, 0.4);
	border-top-color: #fff;
}

/*
 * The filter bar is the whole of what used to be a board on the AdminEase dashboard. It
 * is laid out in two rows rather than one because 340px will not hold a segmented
 * control, a search field and a status menu side by side without making all three too
 * small to hit. The screen the panel was opened on is the title of the first scope
 * button rather than a line of its own, which buys back a row.
 */
.ae-notes-panel-filters {
	display: flex;
	flex-direction: column;
	flex: 0 0 auto;
	gap: var(--wpds-dimension-gap-sm, 8px);
	padding: var(--wpds-dimension-padding-sm, 8px) var(--wpds-dimension-padding-md, 12px);
	background: #f6f7f7;
	border-bottom: 1px solid #dcdcde;
}

.ae-notes-scope {
	display: flex;
	background: #fff;
	border: 1px solid #c3c4c7;
	border-radius: var(--wpds-border-radius-md, 4px);
	overflow: hidden;
}

.ae-notes-scope-btn {
	flex: 1 1 50%;
	min-width: 0;
	margin: 0;
	padding: 3px var(--wpds-dimension-padding-sm, 8px);
	background: none;
	border: 0;
	color: #50575e;
	cursor: pointer;
	font-family: inherit;
	font-size: var(--wpds-typography-font-size-sm, 12px);
	line-height: 22px;
	overflow: hidden;
	text-align: center;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.ae-notes-scope-btn + .ae-notes-scope-btn {
	border-left: 1px solid #c3c4c7;
}

.ae-notes-scope-btn:hover {
	background: #f0f0f1;
	color: #1d2327;
}

.ae-notes-scope-btn.is-on {
	background: var(--wp-admin-theme-color, #2271b1);
	color: #fff;
}

.ae-notes-scope-btn:focus-visible {
	outline: var(--wpds-border-width-focus, 2px) solid var(--wp-admin-theme-color, #2271b1);
	outline-offset: -2px;
}

.ae-notes-find {
	display: flex;
	gap: var(--wpds-dimension-gap-sm, 8px);
}

/*
 * Prefixed with the panel's id, not its class. Core styles these two by tag and
 * attribute, and PrecisionWP.css styles them again under the pwp-app body class at a
 * specificity no class of ours can beat, which put the admin form metrics back on the
 * AdminEase screen alone: a full width select and a search box squeezed to its padding.
 */
#adminease-notes-panel .ae-notes-search,
#adminease-notes-panel .ae-notes-status {
	box-sizing: border-box;
	min-height: 28px;
	margin: 0;
	padding: 0 var(--wpds-dimension-padding-sm, 8px);
	background: #fff;
	border: 1px solid #8c8f94;
	border-radius: var(--wpds-border-radius-md, 4px);
	color: #2c3338;
	font-family: inherit;
	font-size: var(--wpds-typography-font-size-sm, 12px);
	line-height: 26px;
}

#adminease-notes-panel .ae-notes-search {
	flex: 1 1 auto;
	width: auto;
	min-width: 0;
}

#adminease-notes-panel .ae-notes-status {
	flex: 0 0 auto;
	width: auto;
	max-width: 40%;
}

#adminease-notes-panel .ae-notes-search:focus,
#adminease-notes-panel .ae-notes-status:focus {
	border-color: var(--wp-admin-theme-color, #2271b1);
	box-shadow: 0 0 0 1px var(--wp-admin-theme-color, #2271b1);
	outline: 0;
}

/*
 * The notes are a list, not a deck of cards: no gap and no padding here, so each row
 * runs the full width of the panel and the hairline on the row is the only thing
 * between one note and the next.
 */
.ae-notes-panel-list {
	display: flex;
	flex-direction: column;
	flex: 1 1 auto;
	background: #fff;
	overflow-y: auto;
}

.ae-notes-empty {
	margin: 0;
	padding: 28px var(--wpds-dimension-padding-lg, 16px);
	color: #787c82;
	text-align: center;
}

/*
 * The list is paged by growing, so the button sits at the very bottom of the rows it will
 * extend rather than beside page numbers, and reads as another row of the list.
 */
.ae-notes-more {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: var(--wpds-dimension-gap-sm, 8px);
	flex: 0 0 auto;
	box-sizing: border-box;
	width: 100%;
	margin: 0;
	padding: var(--wpds-dimension-padding-md, 12px);
	background: none;
	border: 0;
	border-top: 1px solid #f0f0f1;
	color: var(--wp-admin-theme-color, #2271b1);
	cursor: pointer;
	font-size: var(--wpds-typography-font-size-md, 13px);
	font-weight: 600;
}

.ae-notes-more:hover {
	background: #f6f7f7;
}

.ae-notes-more:focus-visible {
	outline: var(--wpds-border-width-focus, 2px) solid var(--wp-admin-theme-color, #2271b1);
	outline-offset: -2px;
}

.ae-notes-more[disabled] {
	cursor: default;
}

.ae-notes-more .ae-notes-spinner {
	width: 14px;
	height: 14px;
}

/*
 * One spinner serves both places a request is waited on: the middle of the list while it
 * is being refilled, and a row action that has been clicked, which hides its icon and
 * spins in the same box so nothing in the row moves.
 */
.ae-notes-busy {
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 0;
	padding: 28px var(--wpds-dimension-padding-lg, 16px);
}

.ae-notes-spinner {
	display: block;
	box-sizing: border-box;
	width: 16px;
	height: 16px;
	border: 2px solid #dcdcde;
	border-top-color: var(--wp-admin-theme-color, #2271b1);
	border-radius: 50%;
	animation: ae-notes-spin 0.7s linear infinite;
}

@keyframes ae-notes-spin {

	to {
		transform: rotate(360deg);
	}
}


/* ── Page markers ─────────────────────────────────────────────────── */

/*
 * A rounded square rotated a quarter turn gives the map-pin outline in one element,
 * so the number inside has to be turned back the other way to read straight. The
 * translate puts the tip of the pin on the stored coordinate rather than its corner.
 */
.ae-notes-marker {
	position: fixed;
	z-index: 9997;
	display: flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	width: 28px;
	height: 28px;
	margin: 0;
	padding: 0;
	background: var(--wp-admin-theme-color, #2271b1);
	border: 2px solid #fff;
	border-radius: 50% 50% 50% 0;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
	color: #fff;
	cursor: grab;
	font-size: 11px;
	font-weight: 700;
	line-height: 1;
	transform: translate(-50%, -100%) rotate(-45deg);
}

.ae-notes-marker span {
	transform: rotate(45deg);
}

.ae-notes-marker:hover,
.ae-notes-marker.is-active {
	z-index: 9998;
	color: #fff;
	filter: brightness(0.88);
}

.ae-notes-marker:focus-visible {
	outline: var(--wpds-border-width-focus, 2px) solid var(--wp-admin-theme-color, #2271b1);
	outline-offset: 2px;
}

.ae-notes-marker.is-dragging {
	cursor: grabbing;
	opacity: 0.85;
}


/* ── A single note ────────────────────────────────────────────────── */
/*
 * The notes are an accordion: a row is a header with a number, a one-line preview and a
 * chevron, and only the open row shows its editor, marked by a bar of the accent colour
 * down its left edge. A row has no border of its own beyond the hairline that divides it
 * from the next.
 * A note used to be a floating window with a solid accent head, because that head was
 * also the drag handle. Stacked, that read as a wall of colour, so the accent survives
 * on the one small badge that ties a row to its marker on the page.
 */
.ae-note {
	display: flex;
	flex-direction: column;
	background: #fff;
	border-bottom: 1px solid #e8e8e9;
	color: #1d2327;
	font-size: var(--wpds-typography-font-size-md, 13px);
	line-height: 1.5;
}

.ae-note:last-child {
	border-bottom: 0;
}

.ae-note.is-open {
	box-shadow: inset 3px 0 0 var(--wp-admin-theme-color, #2271b1);
}

.ae-note.is-saving {
	opacity: 0.7;
}

.ae-note-head {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 2px;
	min-height: 26px;
	padding: 0 6px 0 0;
	background: transparent;
	color: #787c82;
	transition: background 0.15s ease;
}

.ae-note:hover .ae-note-head,
.ae-note.is-open .ae-note-head {
	background: #f6f7f7;
}

/*
 * The header is the accordion control, so the toggle takes the whole left side of the
 * row and the two icon buttons stay outside it: a button cannot be nested in a button,
 * and marking a note done should never be a click away from opening it by accident.
 */
.ae-note-toggle {
	display: flex;
	align-items: center;
	flex: 1 1 auto;
	gap: var(--wpds-dimension-gap-sm, 8px);
	min-width: 0;
	margin: 0;
	padding: 7px 4px 7px var(--wpds-dimension-padding-md, 12px);
	background: none;
	border: 0;
	color: #1d2327;
	cursor: pointer;
	font-family: inherit;
	font-size: var(--wpds-typography-font-size-md, 13px);
	line-height: 1.4;
	text-align: left;
}

.ae-note-toggle:focus-visible {
	outline: var(--wpds-border-width-focus, 2px) solid var(--wp-admin-theme-color, #2271b1);
	outline-offset: -2px;
}

.ae-note-title {
	flex: 1 1 auto;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.ae-note-caret {
	display: flex;
	flex: 0 0 auto;
	color: #a7aaad;
	transition: transform 0.15s ease;
}

.ae-note-caret svg {
	width: 14px;
	height: 14px;
}

.ae-note.is-open .ae-note-caret {
	transform: rotate(180deg);
}

.ae-note-editor {
	display: none;
}

.ae-note.is-open .ae-note-editor {
	display: block;
}

.ae-note-index {
	display: flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	box-sizing: border-box;
	min-width: 20px;
	height: 20px;
	padding: 0 6px;
	background: var(--wp-admin-theme-color, #2271b1);
	border-radius: 10px;
	color: #fff;
	font-size: 11px;
	font-weight: 600;
	line-height: 1;
}

.ae-note-action {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 22px;
	height: 22px;
	padding: 0;
	background: none;
	border: 0;
	border-radius: var(--wpds-border-radius-sm, 2px);
	color: #787c82;
	cursor: pointer;
	transition: background 0.15s ease, color 0.15s ease;
}

.ae-note-action:hover {
	background: #f0f0f1;
	color: #1d2327;
}

.ae-note-action[data-action="status"]:hover {
	color: var(--wp-admin-theme-color, #2271b1);
}

.ae-note-action[data-action="delete"]:hover {
	background: #fcf0f1;
	color: #d63638;
}

.ae-note-action:focus-visible {
	outline: var(--wpds-border-width-focus, 2px) solid var(--wp-admin-theme-color, #2271b1);
	outline-offset: -1px;
}

.ae-note-action svg {
	width: 14px;
	height: 14px;
}

.ae-note-action.is-busy {
	cursor: default;
}

.ae-note-action.is-busy svg {
	display: none;
}

.ae-note-action .ae-notes-spinner {
	width: 14px;
	height: 14px;
}

/*
 * The textarea is grown to fit its content by the script, so it carries no scrollbar and
 * no drag handle, and its minimum is only a couple of lines: a one-line note should take
 * one line of the list. The focus ring it would normally draw is dropped in favour of the
 * accent bar down the left edge of the open row, which says the same thing without
 * boxing in a field that has no border of its own.
 */
.ae-note-body {
	box-sizing: border-box;
	width: 100%;
	min-height: 36px;
	margin: 0;
	padding: 0 var(--wpds-dimension-padding-md, 12px) 6px;
	background: transparent;
	border: 0;
	box-shadow: none;
	color: inherit;
	font-family: inherit;
	font-size: var(--wpds-typography-font-size-md, 13px);
	line-height: 1.6;
	overflow: hidden;
	resize: none;
}

.ae-note-body:focus {
	background: transparent;
	border: 0;
	box-shadow: none;
	outline: 0;
}

.ae-note-body::placeholder {
	color: #8c8f94;
}

.ae-note-body[readonly] {
	cursor: default;
}

.ae-note-extra {
	display: flex;
	flex-direction: column;
	gap: 6px;
	padding: 0 var(--wpds-dimension-padding-md, 12px) 6px;
}

.ae-note-extra:empty {
	display: none;
}

.ae-note-row {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: var(--wpds-typography-font-size-sm, 12px);
}

.ae-note-row label {
	flex: 0 0 auto;
	color: #646970;
	font-size: var(--wpds-typography-font-size-sm, 12px);
}

/*
 * Same reason as the filter bar above: the id is what keeps a select the height it is
 * given here. A bare class loses to both core's select rule and PrecisionWP's, and the
 * second of those pads by 10px, which is what made these twice the height of the date
 * field beside them. The height is stated rather than left to a minimum so the two
 * controls cannot drift apart again.
 */
#adminease-notes-panel .ae-note-row select,
#adminease-notes-panel .ae-note-row input[type="date"] {
	flex: 1 1 auto;
	box-sizing: border-box;
	width: auto;
	height: 26px;
	min-height: 26px;
	max-width: 100%;
	margin: 0;
	padding: 0 var(--wpds-dimension-padding-xs, 4px);
	border: 1px solid #8c8f94;
	border-radius: var(--wpds-border-radius-md, 4px);
	background: #fff;
	color: #2c3338;
	font-family: inherit;
	font-size: var(--wpds-typography-font-size-sm, 12px);
	line-height: 24px;
}

/*
 * The arrow has to be handed back to the browser. Core hides the native one and draws
 * its own as a background image, and every rule here sets a flat white background, so
 * without this a select in the panel has no arrow at all.
 */
#adminease-notes-panel .ae-notes-status,
#adminease-notes-panel .ae-note-row select {
	-webkit-appearance: auto;
	-moz-appearance: auto;
	appearance: auto;
	cursor: pointer;
}

/*
 * On the AdminEase dashboard screen <body> carries .pwp-app (Plugin::admin_body_class()),
 * and PrecisionWP.css forces its own chevron background-image on every select under it,
 * !important, regardless of nesting. The native arrow restored above then draws on top
 * of that image. Since this panel sits outside .pwp-app by design (see file header),
 * cancel the native arrow only in that leaked context so PrecisionWP's chevron is the
 * sole arrow instead of a second one.
 */
.pwp-app #adminease-notes-panel .ae-notes-status,
.pwp-app #adminease-notes-panel .ae-note-row select {
	-webkit-appearance: none;
	-moz-appearance: none;
	appearance: none;
}

.ae-note-checklist {
	display: flex;
	flex-direction: column;
	gap: var(--wpds-dimension-gap-xs, 4px);
}

.ae-note-add-item {
	align-self: flex-start;
}

.ae-note-check {
	display: flex;
	align-items: center;
	gap: 6px;
}

#adminease-notes-panel .ae-note-check input[type="text"] {
	flex: 1 1 auto;
	min-height: 24px;
	padding: 0 var(--wpds-dimension-padding-xs, 4px);
	border: 1px solid #8c8f94;
	border-radius: var(--wpds-border-radius-md, 4px);
	background: #fff;
	color: #2c3338;
	font-size: var(--wpds-typography-font-size-sm, 12px);
}

.ae-note-check input[type="checkbox"]:checked + input[type="text"] {
	color: #646970;
	text-decoration: line-through;
}

/*
 * Stacked rather than strung along one line, so a due date and a shared badge each get
 * their own line instead of fighting the timestamp for room in a 340px panel. Laying it
 * out as a column is also what keeps a chip only as wide as its own text.
 */
.ae-note-foot {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: var(--wpds-dimension-gap-xs, 4px);
	padding: 0 var(--wpds-dimension-padding-md, 12px) var(--wpds-dimension-padding-sm, 8px);
	background: transparent;
	color: #8c8f94;
	font-size: 11px;
}

/*
 * Only drawn on a note that was written on another screen, which is why it is a link and
 * not a label: in the All notes view it is the way back to where the note belongs.
 */
.ae-note-link {
	display: inline-flex;
	align-items: center;
	gap: var(--wpds-dimension-gap-xs, 4px);
	max-width: 100%;
	color: var(--wp-admin-theme-color, #2271b1);
	font-size: 11px;
	overflow: hidden;
	text-decoration: none;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.ae-note-link:hover {
	text-decoration: underline;
}

.ae-note-link svg {
	width: 12px;
	height: 12px;
	flex: 0 0 auto;
}

.ae-note-chip {
	padding: 1px 6px;
	border-radius: 9px;
	background: #f0f0f1;
	color: #50575e;
	font-size: 10px;
	font-weight: 600;
	text-transform: uppercase;
}

.ae-note-chip[data-state="overdue"] {
	background: #d63638;
	color: #fff;
}


/* ── Small screens ────────────────────────────────────────────────── */
@media screen and (max-width: 782px) {

	.ae-notes-launcher--floating {
		right: 14px;
		bottom: 14px;
	}

	#wpadminbar .ae-notes-launcher--bar .ae-notes-launcher-btn {
		height: 46px;
	}

	#wpadminbar .ae-notes-launcher--bar .ae-notes-launcher-btn svg {
		width: 22px;
		height: 22px;
	}

	body.ae-notes-open .ae-notes-launcher--floating {
		right: 14px;
		visibility: hidden;
	}

	.ae-notes-panel {
		width: 320px;
		max-width: calc(100vw - 16px);
	}
}

/* ── RTL ──────────────────────────────────────────────────────────────
 * The panel is anchored to a physical edge and slid in with a physical
 * translateX, so neither follows the text direction on its own. Page
 * markers are excluded on purpose: their coordinates are stored per note
 * and written as inline styles, so mirroring them here would move every
 * existing marker away from the thing it was pinned to.
 */
[dir="rtl"] .ae-notes-launcher--floating {
	right: auto;
	left: 24px;
}

[dir="rtl"] .ae-notes-launcher--floating .ae-notes-count {
	right: auto;
	left: -4px;
}

[dir="rtl"] body.ae-notes-open .ae-notes-launcher--floating {
	right: auto;
	left: 364px;
}

[dir="rtl"] .ae-notes-panel {
	right: auto;
	left: 0;
	border-right: 1px solid #c3c4c7;
	border-left: 0;
	box-shadow: 6px 0 24px rgba(0, 0, 0, 0.14);
	transform: translateX(-100%);
}

[dir="rtl"] .ae-notes-panel.is-open {
	transform: translateX(0);
}

[dir="rtl"] .ae-notes-scope-btn + .ae-notes-scope-btn {
	border-right: 1px solid #c3c4c7;
	border-left: 0;
}

[dir="rtl"] .ae-note-toggle {
	padding: 7px var(--wpds-dimension-padding-md, 12px) 7px 4px;
	text-align: right;
}

@media screen and (max-width: 782px) {

	[dir="rtl"] .ae-notes-launcher--floating,
	[dir="rtl"] body.ae-notes-open .ae-notes-launcher--floating {
		right: auto;
		left: 14px;
	}
}
