/* Witney Map content office: the component kit. ONE definition per component, used by the plugin's screens and by
 * WordPress's own (Media, Users, Profile, Layers, the photo picker, the activity log). Loaded last on every admin
 * screen and the sign-in page; values come from tokens.css only. The living reference is Settings → Components
 * (admin.php?page=witney-components). A screen that needs something new adds it here, not in its own file.
 *
 *   Button      primary · secondary (default) · danger · icon; one size (40, 44 on touch) plus small (32) for dense rows
 *   Field       text, search, select, textarea: 40 high, 12 corners, 14px, the same edge, hover and focus
 *   Tabs        one segmented bar for every switch: our filters, WordPress's view links, the picker's two tabs
 *   Pill        status and labels: 24 high, 12px semibold, a soft fill per meaning
 *   Table       one card with a tinted header row, no stripes, a hover tint
 *   Card        white, 1px edge, 20 corners, no shadow; the filter bar is a card too
 *   Pagination  round 40px steps, the current page filled
 *   Dialog      20 corners, no focus frame round the whole dialog, the same tabs and filter bar inside
 */

/* ---------------------------------------------------------------- Focus: one ring everywhere */
.wp-admin :focus-visible, .login :focus-visible { outline: 2px solid var(--wm-focus); outline-offset: 2px; box-shadow: none; }
/* WordPress squares every focused link (a:focus: 2px corners and its own ring): no ring on click, the shape stays */
.wp-admin a:focus { box-shadow: none; }
.wm-iconbtn, .wm-iconbtn:focus, .wm-iconbtn:focus-visible { border-radius: var(--wm-pill); }
/* Things focused by a script so screen readers start there (a dialog, a page heading), not by Tab: no frame round them */
.wp-admin [tabindex="-1"]:focus, .wp-admin .media-modal:focus, .wp-admin .media-modal-content:focus, .wp-admin .media-frame-content:focus { outline: none; box-shadow: none; }

/* ---------------------------------------------------------------- Page: as tall as its content (a short page doesn't scroll), no footer line */
.witney-app #wpfooter { display: none; }
.witney-app #wpbody-content { padding-bottom: 40px; }

/* ---------------------------------------------------------------- Navigation (WordPress's admin menu, theme.css): the edge line is drawn
 * over the rows, so a selected, hovered or focused row never hides it; no pointer triangles beside a row. */
#adminmenuwrap { position: relative; }
#adminmenuwrap::after { content: ""; position: absolute; top: 0; right: 0; bottom: 0; width: 1px; background: var(--wm-line); pointer-events: none; z-index: 2; }
#adminmenu li.menu-top::after, #adminmenu li.menu-top > a::after { display: none !important; }

/* ---------------------------------------------------------------- Button */
.wp-core-ui .button, .wp-core-ui .button-secondary, .wp-core-ui .button-primary, .wp-admin .page-title-action,
.wp-core-ui .button.button-large, .wp-core-ui .button.button-hero, .wp-core-ui .button-group.button-large .button, .wp-core-ui .button.button-compact {
	box-sizing: border-box; min-height: var(--wm-tap); height: auto; margin: 0; padding: 0 18px; border: 1px solid var(--wm-line-2); border-radius: var(--wm-pill);
	background: var(--wm-surface); color: var(--wm-primary-dark); box-shadow: none; text-shadow: none; vertical-align: middle; cursor: pointer;
	font: 600 var(--wm-fs-body)/calc(var(--wm-tap) - 2px) var(--wm-font); white-space: nowrap; text-decoration: none;
	transition: background-color var(--wm-fast) var(--wm-ease), border-color var(--wm-fast) var(--wm-ease), color var(--wm-fast) var(--wm-ease);
}
.wp-admin .page-title-action { display: inline-flex; align-items: center; top: 0; }
/* WordPress restyles buttons while hovered, focused or pressed (2px corners, 13px text, 32px high, a sunken border):
 * the kit's shape and size hold in every state, so nothing jumps when clicked */
.wrap .page-title-action:is(:hover, :focus, :active), .wp-core-ui .button:not(.button-small):is(:hover, :focus, :active), .wp-core-ui .button-primary:not(.button-small):is(:hover, :focus, :active) {
	min-height: var(--wm-tap); padding: 0 18px; border-style: solid; border-radius: var(--wm-pill); font-size: var(--wm-fs-body); font-weight: 600; line-height: calc(var(--wm-tap) - 2px);
}
.wp-core-ui .button.button-small:is(:hover, :focus, :active) { min-height: var(--wm-tap-sm); padding: 0 12px; border-style: solid; border-radius: var(--wm-pill); line-height: calc(var(--wm-tap-sm) - 2px); }
.wp-core-ui .button:hover, .wp-core-ui .button-secondary:hover, .wp-admin .page-title-action:hover,
.wp-core-ui .button:active { border-color: var(--wm-green); background: var(--wm-primary-soft); color: var(--wm-primary-dark); box-shadow: none; }
.wp-core-ui .button:focus, .wp-core-ui .button-primary:focus, .wp-admin .page-title-action:focus { box-shadow: none; outline: none; }
.wp-core-ui .button:focus-visible, .wp-core-ui .button-primary:focus-visible, .wp-admin .page-title-action:focus-visible { outline: 2px solid var(--wm-focus); outline-offset: 2px; }

/* primary: one per screen or panel, the thing you came to do */
.wp-core-ui .button-primary, .wp-core-ui .button.button-primary {
	border-color: var(--wm-green); background: var(--wm-green); color: var(--wm-on-primary);
}
.wp-core-ui .button-primary:hover, .wp-core-ui .button.button-primary:hover, .wp-core-ui .button-primary:active {
	border-color: var(--wm-primary-dark); background: var(--wm-primary-dark); color: var(--wm-on-primary);
}
/* add: the one way to add something (a place, a walk, a layer, a person, photos): primary, with a plus */
.wp-admin :is(.wm-add-btn, .wm-add-layer, .page-title-action[href*="user-new.php"], .page-title-action[href*="media-new.php"], .page-title-action[href*="post-new.php"]) {
	display: inline-flex; align-items: center; gap: 8px; padding-left: 14px; border-color: var(--wm-green); background: var(--wm-green); color: var(--wm-on-primary);
}
.wp-admin .wrap :is(.wm-add-btn, .wm-add-layer, .page-title-action[href*="user-new.php"], .page-title-action[href*="media-new.php"], .page-title-action[href*="post-new.php"]):is(:hover, :focus, :active) { padding-left: 14px; }
.wp-admin :is(.wm-add-btn, .wm-add-layer, .page-title-action[href*="user-new.php"], .page-title-action[href*="media-new.php"], .page-title-action[href*="post-new.php"])::before {
	content: ""; flex: none; width: 18px; height: 18px; background: currentColor; -webkit-mask: url(../icons/plus-regular.svg) center / contain no-repeat; mask: url(../icons/plus-regular.svg) center / contain no-repeat;
}
.wp-admin :is(.wm-add-btn, .wm-add-layer, .page-title-action[href*="user-new.php"], .page-title-action[href*="media-new.php"], .page-title-action[href*="post-new.php"]):hover {
	border-color: var(--wm-primary-dark); background: var(--wm-primary-dark); color: var(--wm-on-primary);
}
/* danger: removes or rejects something */
.wp-core-ui .button.wm-danger, .wp-core-ui .button.button-link-delete, .wp-core-ui .media-toolbar .delete-selected-button:not(:disabled) {
	border-color: var(--wm-danger); background: var(--wm-surface); color: var(--wm-danger);
}
.wp-core-ui .button.wm-danger:hover, .wp-core-ui .button.button-link-delete:hover, .wp-core-ui .media-toolbar .delete-selected-button:not(:disabled):hover {
	border-color: var(--wm-danger-dark); background: var(--wm-danger-soft); color: var(--wm-danger-dark);
}
/* small: inside dense rows only */
.wp-core-ui .button.button-small, .wp-core-ui .button-small { min-height: var(--wm-tap-sm); padding: 0 12px; line-height: calc(var(--wm-tap-sm) - 2px); font-size: var(--wm-fs-para); }
/* disabled: still readable, clearly not available */
.wp-core-ui .button:disabled, .wp-core-ui .button[disabled], .wp-core-ui .button.disabled, .wp-core-ui .button-primary:disabled, .wp-core-ui .button-primary[disabled], .wp-core-ui .button-primary.disabled, .wp-core-ui .button-primary-disabled {
	border-color: var(--wm-line) !important; background: var(--wm-surface-2) !important; color: var(--wm-muted) !important; cursor: not-allowed; box-shadow: none !important; text-shadow: none !important;
}
/* an icon inside a button */
.wp-core-ui .button .wm-icon { width: 16px; height: 16px; margin: 0 6px 0 -2px; vertical-align: -3px; }
/* text button: an action that reads as a link */
.wp-core-ui .button-link { padding: 0; border: 0; border-radius: 4px; background: none; color: var(--wm-primary-dark); font: inherit; font-weight: 600; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.wp-core-ui .button-link:hover { color: var(--wm-ink); }
/* icon button: a round 40px target; its name in aria-label and title */
.wm-iconbtn { display: inline-grid; place-items: center; width: var(--wm-tap); height: var(--wm-tap); padding: 0; border: 0; border-radius: var(--wm-pill); background: none; color: var(--wm-ink-2); text-decoration: none; cursor: pointer; transition: background-color var(--wm-fast), color var(--wm-fast); }
.wm-iconbtn .wm-icon { width: 20px; height: 20px; }
.wm-iconbtn:hover { background: var(--wm-primary-soft); color: var(--wm-primary-dark); }
.wm-iconbtn--close { font: 400 calc(24px * var(--wm-ts))/1 var(--wm-font); } /* the × of a dialog */

/* ---------------------------------------------------------------- Field */
.wp-admin :is(input[type="text"], input[type="search"], input[type="url"], input[type="email"], input[type="password"], input[type="number"], input[type="date"], input[type="time"], input[type="tel"], input[type="datetime-local"]),
.wp-admin select:not([multiple]),
.login :is(input[type="text"], input[type="password"], input[type="email"]) {
	box-sizing: border-box; height: var(--wm-tap); min-height: var(--wm-tap); margin: 0; padding: 0 14px; border: 1px solid var(--wm-field); border-radius: var(--wm-radius-sm);
	background-color: var(--wm-surface); color: var(--wm-ink); box-shadow: none; font: 400 var(--wm-fs-body)/1.3 var(--wm-font); vertical-align: middle;
	transition: border-color var(--wm-fast), box-shadow var(--wm-fast);
}
.wp-admin select:not([multiple]) { max-width: 100%; padding-right: 36px; background-position: right 12px top 55%; background-size: 16px 16px; cursor: pointer; text-overflow: ellipsis; }
.wp-admin select[multiple] { padding: 6px; border: 1px solid var(--wm-field); border-radius: var(--wm-radius-sm); font-size: var(--wm-fs-body); }
.wp-admin textarea { box-sizing: border-box; min-height: 88px; padding: 10px 14px; border: 1px solid var(--wm-field); border-radius: var(--wm-radius-sm); background: var(--wm-surface); color: var(--wm-ink); box-shadow: none; font: 400 var(--wm-fs-body)/1.5 var(--wm-font); }
.wp-admin input.small-text { padding: 0 10px; text-align: center; }
.wp-admin :is(input, select, textarea):not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]):hover { border-color: var(--wm-field-hover); }
.wp-admin :is(input[type="text"], input[type="search"], input[type="url"], input[type="email"], input[type="password"], input[type="number"], input[type="date"], input[type="time"], input[type="tel"], input[type="datetime-local"], select, textarea):focus,
.login :is(input[type="text"], input[type="password"], input[type="email"]):focus {
	border-color: var(--wm-green); box-shadow: 0 0 0 1px var(--wm-green), 0 0 0 4px rgba(57, 106, 63, .16); outline: 2px solid transparent;
}
.wp-admin :is(input, select, textarea):disabled, .wp-admin :is(input, textarea)[readonly] { border-color: var(--wm-line); background-color: var(--wm-surface-2); color: var(--wm-muted); }
.wp-admin ::placeholder { color: var(--wm-muted); opacity: 1; font-weight: 400; }
/* date and time fields: a button that opens the calendar or clock (assets/js/pickers.js), drawn as a field */
.wp-admin .wm-pick { box-sizing: border-box; min-height: var(--wm-tap); padding: 0 12px 0 14px; border: 1px solid var(--wm-field); border-radius: var(--wm-radius-sm); background: var(--wm-surface); color: var(--wm-ink); font: 400 var(--wm-fs-body)/1.3 var(--wm-font); }
.wp-admin .wm-pick:hover { border-color: var(--wm-field-hover); }
.wp-admin .wm-pick:focus-visible, .wp-admin .wm-pick[aria-expanded="true"] { border-color: var(--wm-green); box-shadow: 0 0 0 1px var(--wm-green), 0 0 0 4px rgba(57, 106, 63, .16); outline: 2px solid transparent; }
/* search: a magnifier inside the field (WordPress's search boxes and ours) */
.wp-admin :is(.search-box, .search-form, .media-toolbar-primary) input[type="search"], .wp-admin input#media-search-input {
	padding-left: 40px; background: var(--wm-surface) no-repeat 14px 50% / 16px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256' fill='%235E5D75'%3E%3Cpath d='M229.66 218.34l-50.07-50.06a88.11 88.11 0 1 0-11.31 11.31l50.06 50.07a8 8 0 0 0 11.32-11.32ZM40 112a72 72 0 1 1 72 72 72.08 72.08 0 0 1-72-72Z'/%3E%3C/svg%3E");
}
/* phones: 16px so the phone doesn't zoom into the field */
@media screen and (max-width: 782px) {
	.wp-admin :is(input[type="text"], input[type="search"], input[type="url"], input[type="email"], input[type="password"], input[type="number"], input[type="date"], input[type="time"], input[type="tel"], select, textarea) { font-size: calc(16px * var(--wm-ts)); }
}

/* ---------------------------------------------------------------- Dropdown (in the field style above)
 * WordPress's selects keep their round field; where the browser supports styleable selects (Chrome, Edge 135+), the
 * list opens as a white card in the same style as the menu: flat rows, the chosen option a soft green row with the
 * green line. Elsewhere the browser's own list appears. A Phosphor caret everywhere. */
.wp-admin select:not([multiple]), .login select { background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNTYgMjU2IiBmaWxsPSIjNUU1RDc1Ij48cGF0aCBkPSJNMjEzLjY2LDEwMS42NmwtODAsODBhOCw4LDAsMCwxLTExLjMyLDBsLTgwLTgwQTgsOCwwLDAsMSw1My42Niw5MC4zNEwxMjgsMTY0LjY5bDc0LjM0LTc0LjM1YTgsOCwwLDAsMSwxMS4zMiwxMS4zMloiLz48L3N2Zz4=") !important; background-size: 14px !important; background-position: right 14px center !important; background-repeat: no-repeat !important; }
@supports (appearance: base-select) {
	.wp-admin select:not([multiple]), .wp-admin select:not([multiple])::picker(select) { appearance: base-select; }
	.wp-admin select:not([multiple]) { display: inline-flex; align-items: center; } /* the chosen text in the middle of the field */
	.wp-admin select:not([multiple]) option { border-radius: var(--wm-radius-xs); margin: 0 6px; transition: background-color var(--wm-fast); }
	.wp-admin select:not([multiple])::picker-icon { display: none; }
	/* The chosen text, cut short with … before the arrow (admin-fixes.js adds <button><selectedcontent>). */
	.wp-admin select:not([multiple]) > button { display: flex; align-items: center; width: 100%; min-width: 0; overflow: hidden; padding: 0; border: 0; background: none; color: inherit; font: inherit; }
	.wp-admin select:not([multiple]) selectedcontent { display: block; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
	.wp-admin select:not([multiple])::picker(select) { min-width: anchor-size(width); max-height: min(420px, 60vh); overflow-y: auto; margin-top: 6px; padding: 6px 0; border: 1px solid var(--wm-line); border-radius: var(--wm-radius-sm); background: #fff; box-shadow: var(--wm-shadow-lg); }
	.wp-admin select:not([multiple]) option { display: flex; align-items: center; min-height: var(--wm-tap); padding: 0 16px; color: var(--wm-ink-2); font: 500 var(--wm-fs-body) var(--wm-font); }
	.wp-admin select:not([multiple]) option::checkmark { display: none; }
	.wp-admin select:not([multiple]) option:hover, .wp-admin select:not([multiple]) option:focus-visible { background: var(--wm-hover); color: var(--wm-primary-dark); outline: none; }
	.wp-admin select:not([multiple]) option:checked { background: var(--wm-menu-on); color: var(--wm-primary-dark); font-weight: 600; }
	/* Groups in the list (Places / Walks, walk themes, quarters): a small grey heading in line with the options, and a
	   line between one group and the next. */
	.wp-admin select:not([multiple]) optgroup { margin: 0; padding: 8px 0 0; color: var(--wm-muted); font: 600 var(--wm-fs-detail)/2 var(--wm-font); text-indent: 16px; } /* in line with the options' text */
	.wp-admin select:not([multiple]) optgroup > option { text-indent: 0; }
	.wp-admin select:not([multiple]) :is(option, optgroup) + optgroup { margin-top: 6px; border-top: 1px solid var(--wm-line); }
}

/* ---------------------------------------------------------------- Option tile: one choice among several, shown as a tile
 * (a layer's pin icon, its colour, a place's icon). Light edge; hover darkens it; the chosen one is green. */
.wm-iconpick__opt, .wm-icon-tile, .wm-colour-swatch { border: 1px solid var(--wm-line-2); border-radius: var(--wm-radius-sm); background: var(--wm-surface); cursor: pointer; transition: border-color var(--wm-fast), background-color var(--wm-fast); }
.wm-iconpick__opt:hover, .wm-icon-tile:hover, .wm-colour-swatch:hover { border-color: var(--wm-field); background: var(--wm-surface-2); }
.wm-iconpick__opt:has(input:checked), .wm-icon-tile[aria-checked="true"], .wm-colour-swatch[aria-checked="true"] {
	border-color: var(--wm-green); background: var(--wm-primary-soft); box-shadow: inset 0 0 0 1px var(--wm-green); color: var(--wm-primary-dark); font-weight: 600;
}
.wm-iconpick__opt:has(input:focus-visible) { outline: 2px solid var(--wm-focus); outline-offset: 2px; }

/* ---------------------------------------------------------------- Pop-ups (status menu, calendar, dropdown list): white, 12 corners, a shadow */
.wm-status-menu__list, .wm-pick-pop { border: 1px solid var(--wm-line); border-radius: var(--wm-radius-sm); background: var(--wm-surface); box-shadow: var(--wm-shadow-lg); }

/* ---------------------------------------------------------------- Tabs: one segmented bar for every switch */
.wm-seg, .wp-admin ul.subsubsub, .media-modal .media-router, .wp-admin .nav-tab-wrapper, .upload-php .view-switch {
	display: inline-flex; flex-wrap: nowrap; align-items: center; gap: 2px; max-width: 100%; box-sizing: border-box; height: var(--wm-tap); margin: 0; padding: 3px; overflow-x: auto;
	border: 1px solid var(--wm-line-2); border-radius: var(--wm-pill); background: var(--wm-surface); box-shadow: var(--wm-shadow-raised); float: none; scrollbar-width: none; list-style: none;
	flex: none; width: max-content; align-self: flex-start;
}
.wm-seg::-webkit-scrollbar, .wp-admin ul.subsubsub::-webkit-scrollbar { display: none; }
.wp-admin ul.subsubsub > li { margin: 0; padding: 0; font-size: 0; white-space: nowrap; } /* WordPress puts a "|" between its links: hidden */
.wm-seg a, .wm-seg button, .wp-admin ul.subsubsub a, .media-modal .media-router .media-menu-item, .wp-admin .nav-tab-wrapper .nav-tab {
	position: relative; display: inline-flex; flex: none; align-items: center; gap: 6px; box-sizing: border-box; height: calc(var(--wm-tap) - 8px); min-height: 0; margin: 0; padding: 0 14px;
	border: 0 !important; border-radius: var(--wm-pill); background: none; box-shadow: none; color: var(--wm-ink); font: 600 var(--wm-fs-body)/1 var(--wm-font); text-decoration: none; white-space: nowrap; cursor: pointer;
	transition: background-color var(--wm-fast), color var(--wm-fast);
}
.wm-seg a:hover, .wm-seg button:hover, .wp-admin ul.subsubsub a:hover, .media-modal .media-router .media-menu-item:hover, .wp-admin .nav-tab-wrapper .nav-tab:hover { background: var(--wm-primary-soft); color: var(--wm-primary-dark); }
.wm-seg a[aria-current], .wm-seg [aria-pressed="true"], .wp-admin ul.subsubsub a.current, .media-modal .media-router .media-menu-item.active, .media-modal .media-router .media-menu-item[aria-selected="true"], .wp-admin .nav-tab-wrapper .nav-tab-active {
	background: var(--wm-green); color: var(--wm-on-primary);
}
.wm-seg a:focus-visible, .wp-admin ul.subsubsub a:focus-visible, .media-modal .media-router .media-menu-item:focus-visible { outline: 2px solid var(--wm-focus); outline-offset: -2px; box-shadow: inset 0 0 0 4px var(--wm-surface); }
/* counts inside a tab */
.wm-seg__n, .wp-admin ul.subsubsub .count { color: var(--wm-muted); font-size: var(--wm-fs-detail); font-weight: 500; }
:is(.wm-seg a[aria-current], .wp-admin ul.subsubsub a.current) :is(.wm-seg__n, .count) { color: #D6E6D7; }
/* icon tabs (Media: list / grid) */
.upload-php .view-switch a { display: grid; place-items: center; width: 40px; height: calc(var(--wm-tap) - 8px); border-radius: var(--wm-pill); box-shadow: none; }
.upload-php .view-switch a.current { background: var(--wm-green); box-shadow: none; }
.upload-php .view-switch a.current::before { filter: brightness(0) invert(1); }
.upload-php .view-switch a:not(.current):hover { background: var(--wm-primary-soft); }
@media (forced-colors: active) { :is(.wm-seg a[aria-current], .wp-admin ul.subsubsub a.current, .media-router .media-menu-item.active) { border: 2px solid Highlight !important; } }
/* More tabs than the width holds: they wrap onto a second line rather than scroll out of sight. */
.wm-seg { flex-wrap: wrap; height: auto; min-height: var(--wm-tap); border-radius: calc(var(--wm-tap) / 2); }
@media (max-width: 1023px) { .wm-seg { width: 100%; } }
/* ---------------------------------------------------------------- Pill: status and labels */
.wm-status {
	display: inline-flex; align-items: center; gap: 6px; box-sizing: border-box; height: 24px; padding: 0 10px; border-radius: var(--wm-pill);
	background: var(--wm-neutral-soft); color: var(--wm-ink-2); font: 600 var(--wm-fs-detail)/1 var(--wm-font); white-space: nowrap; vertical-align: middle;
}
.wm-status--live { background: var(--wm-ok-soft); color: var(--wm-ok); }
.wm-status--waiting, .wm-status--scheduled { background: var(--wm-warn-soft); color: var(--wm-warn); }
.wm-status--returned { background: var(--wm-danger-soft); color: var(--wm-danger-dark); }
.wm-status--info { background: var(--wm-info-soft); color: var(--wm-info); }
.wm-status--off, .wm-status--draft { background: var(--wm-neutral-soft); color: var(--wm-ink-2); }
/* ---------------------------------------------------------------- Card (and the filter bar, which is a card) */
.wm-card, .wp-admin .postbox, .wp-admin .card, .wp-admin .stuffbox {
	border: 1px solid var(--wm-line); border-radius: var(--wm-radius); background: var(--wm-surface); box-shadow: var(--wm-shadow-card);
}
.wp-admin .wp-filter { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 16px 0; padding: 0; border: 0; background: none; box-shadow: none; } /* the filter bar sits on the page, search first, as on Places */
.wp-admin .wp-filter :is(.search-form, .media-toolbar-primary) { order: -1; margin: 0; }
.wp-admin .wp-filter.wp-filter { justify-content: flex-start; padding: 0; border: 0; background: none; box-shadow: none; } /* WordPress's media styles pad and frame it */
.wp-admin .wp-filter > * { margin: 0 !important; padding: 0 !important; float: none !important; } /* left-aligned like Places, whatever WordPress floats */
.wp-admin .wp-filter input[type="search"] { width: 360px; }
.wp-admin .wp-filter :is(.filter-items, .media-toolbar-secondary) { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; float: none; margin: 0; }
.wp-admin .wp-filter :is(.media-toolbar-primary, .search-form) { display: flex; align-items: center; gap: 12px; float: none; margin: 0; }
.wp-admin .wp-filter :is(select, .button, input, .view-switch) { margin: 0 !important; }
.wp-admin .wp-filter select { min-width: 160px; }
/* labels WordPress prints above its filters: the controls say what they are (All media items, All dates) */
.wp-admin .wp-filter :is(.media-search-input-label, label[for="media-attachment-filters"], label[for="media-attachment-date-filters"], .attachment-filters-label),
.media-modal .media-toolbar :is(.media-search-input-label, label.screen-reader-text, .media-attachment-filters-label, label[for^="media-attachment-"]) {
	position: absolute !important; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.media-modal .media-toolbar input[type="search"] { width: 300px; max-width: 100%; }
.wp-admin .wp-filter input[type="search"] { max-width: 100%; }

/* ---------------------------------------------------------------- Table: the ONE table
 * WordPress's list-table markup everywhere: our tables come from witney_map_table() (components.php), WordPress's own
 * screens (Users, Layers, Media, Plugins) already print it. One frame, one header row, one row height, no stripes.
 * Screens may set column widths (.column-<key>), nothing else. Menus inside a cell can open past the table's edge. */
.wp-admin .wp-list-table, .wp-admin table.widefat {
	overflow: visible; border: 1px solid var(--wm-line); border-radius: var(--wm-radius); border-collapse: separate; border-spacing: 0; background: var(--wm-surface); box-shadow: none;
}
.wp-admin .wp-list-table thead tr, .wp-admin .wp-list-table tfoot tr { background: var(--wm-surface-2); }
.wp-admin .wp-list-table :is(th, td) { box-sizing: border-box; } /* a column's width includes its padding */
@media screen and (min-width: 783px) { .wp-admin .wp-list-table > :is(thead, tfoot) > tr > :is(th, td):not(.hidden) { display: table-cell; } } /* header cells line up with their columns (phones use WordPress's stacked rows) */
.wp-admin .wp-list-table :is(thead, tfoot) :is(th.sortable, th.sorted) a { display: inline-flex; align-items: center; gap: 4px; padding: 0; color: inherit; }
.wp-admin .wp-list-table :is(thead, tfoot) :is(th.sortable, th.sorted) { padding-top: 12px; padding-bottom: 12px; }
.wp-admin .wp-list-table :is(thead, tfoot) :is(th, td), .wp-admin table.widefat :is(thead, tfoot) :is(th, td) {
	padding: 12px 16px; background: var(--wm-surface-2); color: var(--wm-ink-2); font: 600 var(--wm-fs-para)/1.3 var(--wm-font); text-align: left; white-space: nowrap;
}
.wp-admin .wp-list-table thead :is(th, td) { border-bottom: 1px solid var(--wm-line); }
.wp-admin .wp-list-table tfoot :is(th, td) { border-top: 1px solid var(--wm-line); }
.wp-admin .wp-list-table :is(thead, tfoot) :is(th, td) a { color: inherit; }
.wp-admin .wp-list-table tbody > tr > :is(td, th) { padding: 14px 16px; border-top: 1px solid var(--wm-line); color: var(--wm-ink-2); font-size: var(--wm-fs-body); line-height: 1.45; vertical-align: middle; }
.wp-admin .wp-list-table tbody > tr:first-child > :is(td, th) { border-top: 0; }
/* rounded corners on the corner cells (the table itself doesn't clip, so menus can open past it) */
.wp-admin .wp-list-table > :first-child > tr:first-child > :first-child { border-top-left-radius: calc(var(--wm-radius) - 1px); }
.wp-admin .wp-list-table > :first-child > tr:first-child > :last-child { border-top-right-radius: calc(var(--wm-radius) - 1px); }
.wp-admin .wp-list-table > caption + thead > tr:first-child > :first-child { border-top-left-radius: calc(var(--wm-radius) - 1px); }
.wp-admin .wp-list-table > caption + thead > tr:first-child > :last-child { border-top-right-radius: calc(var(--wm-radius) - 1px); }
.wp-admin .wp-list-table > :last-child > tr:last-child > :first-child { border-bottom-left-radius: calc(var(--wm-radius) - 1px); }
.wp-admin .wp-list-table > :last-child > tr:last-child > :last-child { border-bottom-right-radius: calc(var(--wm-radius) - 1px); }
.wp-admin .striped > tbody > :nth-child(odd), .wp-admin .alternate { background: transparent; }
.wp-admin .wp-list-table tbody tr { transition: background-color var(--wm-fast); }
.wp-admin .wp-list-table tbody tr:hover { background: #F8FAF7; }
.wp-admin .wp-list-table tbody tr:has(> .check-column input:checked) { background: var(--wm-primary-soft); }
.wp-admin .wp-list-table tbody tr.is-bad > td { background: var(--wm-danger-soft); }
/* cells */
.wp-admin .wp-list-table .row-title { color: var(--wm-ink); font-size: var(--wm-fs-body) !important; font-weight: 600; text-decoration: none; } /* core sets 14px !important: this follows Text size */
.wp-admin .wp-list-table a.row-title:hover { color: var(--wm-primary-dark); text-decoration: underline; text-underline-offset: 2px; }
.wm-cell-name { display: flex; align-items: center; gap: 12px; min-width: 0; }
.wm-cell-name__text { display: flex; flex-direction: column; min-width: 0; }
.wm-cell-name .wm-me { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--wm-primary-soft); color: var(--wm-primary-dark); font: 600 var(--wm-fs-para)/1 var(--wm-font); } /* a person's initials */
.wp-admin .wp-list-table td.column-actions, .wp-admin .wp-list-table td.column-witney_actions { white-space: nowrap; text-align: right; }
.wp-admin .wp-list-table .wm-inline { display: inline-flex; margin: 0 0 0 4px; vertical-align: middle; }
.wp-admin .wp-list-table th.column-witney_actions { text-align: right; }
.wp-admin .wp-list-table .column-witney_actions { width: 112px; }
.wm-cell-sub { display: block; margin-top: 2px; overflow: hidden; color: var(--wm-muted); font-size: var(--wm-fs-para); font-weight: 400; text-overflow: ellipsis; white-space: nowrap; }
.wp-admin .wp-list-table .wm-dot { margin-right: 8px; vertical-align: 1px; }
.wp-admin .wp-list-table :is(th, td).num { text-align: right; font-variant-numeric: tabular-nums; }
.wp-admin .wp-list-table :is(th, td).column-actions { text-align: right; white-space: nowrap; }
.wp-admin .wp-list-table td.column-actions { padding-top: 8px; padding-bottom: 8px; }
/* the checkbox column */
.wp-admin .wp-list-table :is(thead, tbody, tfoot) .check-column { width: 44px; padding: 0 0 0 16px; vertical-align: middle; }
.wp-admin .wp-list-table .check-column input[type="checkbox"] { width: 20px; height: 20px; margin: 0; }
.wp-admin .wp-list-table .check-column label { display: inline-flex; min-width: 24px; min-height: 24px; align-items: center; justify-content: center; }
/* nothing in it: one plain sentence */
.wp-admin .wp-list-table:has(tr.no-items) :is(thead, tfoot) { display: none; }
.wp-admin .wp-list-table tr.no-items td { padding: 40px 24px; color: var(--wm-muted); text-align: center; }
/* loading (a filter or page change on a long list) */
.wp-admin .wp-list-table[data-skeleton].is-loading tbody { opacity: .45; transition: opacity var(--wm-med); }
/* Places and Walks: column widths */
.wp-admin .wm-list--items { table-layout: fixed; }
.wm-list--items .column-layer { width: 20%; }
.wm-stories.wm-list--items .column-layer, .wm-stories .wm-list--items .column-layer { width: 110px; } /* Walks: "6 stops" needs little room; the name has the rest */
.wm-list--items .column-org { width: 18%; } /* "Witney Chamber of Commerce" in full once the page is at its widest */
.wm-list--items .column-status { width: 136px; } /* the longest tag, "Not on the map", and the cell's padding */
.wm-list--items .column-updated { width: 140px; }
.wm-list--items .column-actions { width: 112px; } /* Edit and the ⋯ menu: two 40px round buttons */
.wm-list--items :is(.column-org, .column-layer, .column-updated) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wm-list--items .column-updated { color: var(--wm-muted); }
/* Laptops: Updated gives way so the name keeps its room (the list is still in that order, and it shows in the place
   itself). Small laptops and tablets in landscape: Organisation too. Both show on phones in the row's details. */
@media (min-width: 783px) and (max-width: 1599px) {
	.wp-admin .wm-list--items > :is(thead, tbody, tfoot) > tr > :is(th, td).column-updated { display: none; }
	.wm-list--items .column-layer { width: 24%; }
	.wm-list--items .column-org { width: 22%; }
}
@media (min-width: 783px) and (max-width: 1199px) {
	.wp-admin .wm-list--items > :is(thead, tbody, tfoot) > tr > :is(th, td).column-org { display: none; }
	.wm-list--items .column-layer { width: 30%; } /* some of Organisation's room: "Accessibility and facilities" in full */
}
/* Media, Layers and Users: column widths (the name column takes the rest) */
.upload-php .wp-list-table .column-witney_author { width: 17%; }
.upload-php .wp-list-table .column-witney_place { width: 20%; }
.upload-php .wp-list-table .column-date { width: 140px; }
.taxonomy-witney_layer .wp-list-table .column-posts { width: 100px; }
.wm-cell-name .row-title { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } /* one line: every row the same height */
.wp-admin :is(.wm-list, .upload-php .wp-list-table, .taxonomy-witney_layer .wp-list-table, .users-php .wp-list-table) { table-layout: fixed; }
.wp-admin :is(.wm-list, .upload-php .wp-list-table, .taxonomy-witney_layer .wp-list-table, .users-php .wp-list-table) tbody td:not(.column-actions):not(.column-witney_actions):not(.column-status) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* A larger text size (Text size, in the top bar): nothing is cut short. Text wraps, and rows grow to fit it. */
body.wm-text-large.wp-admin .wp-list-table tbody td:not(.column-actions):not(.column-witney_actions):not(.column-status), body.wm-text-large.wp-admin .wp-list-table :is(.row-title, .wm-cell-sub, .wm-cell-name .row-title) { overflow: visible; text-overflow: clip; white-space: normal; overflow-wrap: break-word; }
.taxonomy-witney_layer .wp-list-table .column-witney_shown { width: 22%; }
.taxonomy-witney_layer .wp-list-table .column-witney_added { width: 130px; color: var(--wm-muted); }
.wp-admin.taxonomy-witney_layer .wp-list-table tbody td.column-witney_shown { white-space: normal !important; text-overflow: clip !important; } /* "Shown when the map opens" wraps rather than being cut off (beats the lists' one-line rule above) */
/* Laptops and tablets: the name keeps its room. Added gives way (it is on the layer's own page). */
@media (min-width: 783px) and (max-width: 1279px) {
	.taxonomy-witney_layer .wp-list-table .column-witney_shown { width: 150px; }
	.taxonomy-witney_layer .wp-list-table .column-posts { width: 72px; }
	.wp-admin.taxonomy-witney_layer .wp-list-table :is(th, td).column-witney_added { display: none; }
}
.users-php .wp-list-table .column-witney_person { width: 34%; }
.users-php .wp-list-table .column-witney_org { width: 28%; }
/* Visitor suggestions */
.wp-admin .wm-list--suggestions { width: 100%; table-layout: fixed; }
.wm-list--suggestions .column-place { width: 24%; }
.wm-list--suggestions .column-reply { width: 18%; }
.wm-list--suggestions .column-when { width: 120px; }
.wm-list--suggestions .column-actions { width: 120px; } /* Edit the place and Dealt with: two 40px round buttons, 4px apart */
.wm-done-btn:is(:hover, :focus-visible) { background: var(--wm-ok-soft); color: var(--wm-ok); } /* green: it closes the report */
.wm-list--suggestions td.column-actions > * { vertical-align: middle; } /* the pencil and Dealt with on one centre line */
.wm-list--suggestions td.column-actions .wm-inline { display: inline-block; margin: 0 0 0 4px; }
/* a table inside a card that has its own heading: the card is the frame */
.wm-card--flush > .wp-list-table { border: 0; border-radius: 0; }
.wm-card--flush > .wp-list-table > * > tr > * { border-radius: 0 !important; }

/* ---------------------------------------------------------------- List: links inside a card (witney_map_list()) */
.wm-rows { margin: 0; padding: 0; list-style: none; }
.wm-row { margin: 0; border-top: 1px solid var(--wm-line); }
.wm-rows > .wm-row:first-child { border-top: 0; }
.wm-row__link { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px; min-height: 56px; padding: 8px 20px; box-sizing: border-box; color: var(--wm-ink); text-decoration: none; transition: background-color var(--wm-fast); }
a.wm-row__link:hover { background: var(--wm-surface-2); }
a.wm-row__link:hover .wm-row__title { color: var(--wm-primary-dark); }
.wp-admin a.wm-row__link:focus-visible { outline-offset: -2px; }
.wm-row__name { display: flex; align-items: center; gap: 12px; min-width: 0; }
.wm-row__main { display: flex; flex-direction: column; min-width: 0; }
.wm-row__title { display: -webkit-box; overflow: hidden; font-size: var(--wm-fs-body); font-weight: 600; line-height: 1.35; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow-wrap: break-word; }
/* up to three lines, then "…": one line cut the date and the advice off on phones ("Leaves the map on 29 Novembe…") */
.wm-row__sub { display: -webkit-box; overflow: hidden; color: var(--wm-muted); font-size: var(--wm-fs-para); line-height: 1.45; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; }
.wm-row__sub .wm-dot { margin-right: 6px; vertical-align: 1px; }
.wm-row__sub strong { color: var(--wm-ink-2); font-weight: 600; }
.wm-row__chev { width: 16px; height: 16px; color: var(--wm-muted); }
@media screen and (max-width: 782px) { .wm-row__link { padding: 8px 16px; } }

/* ---------------------------------------------------------------- Pagination: the ONE pager (WordPress's « ‹ [page] of N › »; witney_map_pagination() prints the same) */
.wp-admin .tablenav { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; height: auto; margin: 12px 0; padding: 0; }
.wp-admin .tablenav :is(.actions, .bulkactions) { display: flex; align-items: center; gap: 8px; float: none; padding: 0; overflow: visible; }
.wp-admin .tablenav .tablenav-pages { display: flex; align-items: center; gap: 6px; float: none; margin: 0 0 0 auto; color: var(--wm-ink-2); font-size: var(--wm-fs-body); }
.wp-admin .tablenav .tablenav-pages :is(.pagination-links) { display: inline-flex; align-items: center; gap: 6px; }
.wp-admin .tablenav .tablenav-pages :is(.button, .tablenav-pages-navspan) { display: inline-grid; place-items: center; width: var(--wm-tap); min-width: 0; height: var(--wm-tap); min-height: 0; padding: 0; line-height: 1; font-size: calc(16px * var(--wm-ts)); }
.wp-admin .tablenav .tablenav-pages .tablenav-pages-navspan { border: 1px solid var(--wm-line); border-radius: var(--wm-pill); background: var(--wm-surface-2); color: var(--wm-faint); }
.wp-admin .tablenav .tablenav-paging-text, .wp-admin .tablenav .paging-input { display: inline-flex; align-items: center; gap: 6px; }
.wp-admin .tablenav .current-page { width: 56px; text-align: center; }
.wp-admin .tablenav .displaying-num { margin-right: 6px; color: var(--wm-muted); }
.wp-admin .tablenav br.clear { display: none; }
.wm-listbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 12px; margin: 0 0 12px; }
.wm-listbar .tablenav, .wp-admin form.tablenav.bottom { margin: 12px 0 0; }
.wm-listbar .tablenav { margin: 0; }
.wp-admin form.tablenav { justify-content: flex-end; }
.wp-admin .tablenav .one-page .pagination-links { display: none; } /* one page: no steps */
.wp-admin .tablenav.bottom { display: none; } /* one pager and one set of bulk actions per list, at the top */
.wp-admin .wp-list-table tfoot { display: none; } /* no repeated header row under a table */
body.upload-php:not(.wm-ticked) .tablenav.top .bulkactions { display: none; } /* bulk actions once something is ticked */
.upload-php .view-switch, .js.upload-php #post-query-submit, .js.upload-php #search-submit { display: none; } /* one view; filters and search apply by themselves */
.users-php .search-box, .users-php .tablenav .tablenav-pages { display: none; } /* a handful of people */

/* ---------------------------------------------------------------- Dialog: the photo picker (WordPress's media modal) */
.media-modal .media-modal-content { overflow: hidden; border-radius: var(--wm-radius); }
.media-modal .media-frame-title h1 { padding: 0 24px; color: var(--wm-ink); font: 600 var(--wm-fs-section)/56px var(--wm-font); letter-spacing: -.01em; }
.media-modal .media-frame-title { left: 0; height: 56px; }
.media-modal .media-frame-router { left: 0; }
.media-modal .media-frame-router { top: 56px; height: 52px; padding: 0 24px; display: flex; align-items: center; border-bottom: 1px solid var(--wm-line); box-sizing: border-box; }
.media-modal .media-frame-router .media-router { margin: 0; }
.media-modal .media-frame-content { top: 108px; left: 0; border-top: 0; }
.media-modal .media-frame.hide-router .media-frame-content { top: 56px; }
.media-modal .media-modal-close { top: 8px; right: 12px; width: var(--wm-tap); height: var(--wm-tap); border-radius: var(--wm-pill); }
.media-modal .media-modal-close:hover { background: var(--wm-hover); }
.media-modal .attachments-browser .media-toolbar { display: flex; align-items: center; gap: 12px; height: auto; min-height: 64px; padding: 12px 24px; box-sizing: border-box; border-bottom: 1px solid var(--wm-line); background: var(--wm-surface); }
.media-modal .attachments-browser .media-toolbar :is(.media-toolbar-secondary, .media-toolbar-primary) { display: flex; align-items: center; gap: 12px; float: none; height: auto; margin: 0; }
.media-modal .attachments-browser .media-toolbar .media-toolbar-primary { margin-left: auto; }
.media-modal .attachments-browser .media-toolbar :is(select, input) { margin: 0; }
.media-modal .attachments-browser .media-toolbar .spinner { display: none; }
.media-modal .media-frame-toolbar .media-toolbar { padding: 0 24px; border-top: 1px solid var(--wm-line); }
.media-modal .media-frame-toolbar .media-toolbar-primary .button { margin-top: 12px; }
.wm-seg--inline { margin: 0 0 16px; }
.witney-app #col-right .col-wrap { padding-left: 0; padding-right: 0; } /* the table lines up with the page title */

/* ---------------------------------------------------------------- Accordion: WordPress-native <details class="wm-acc"> */
.wm-acc { border-top: 1px solid var(--wm-line); }
.wm-acc:first-of-type { border-top: 0; }
.wm-acc summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; padding: 4px 0; color: var(--wm-ink); font: 600 var(--wm-fs-body)/1.4 var(--wm-font); list-style: none; cursor: pointer; transition: color var(--wm-fast); }
.wm-acc summary::-webkit-details-marker { display: none; }
.wm-acc summary::after { content: ""; flex: none; width: 8px; height: 8px; margin-right: 4px; border: solid var(--wm-muted); border-width: 0 2px 2px 0; transform: rotate(45deg) translateY(-2px); transition: transform var(--wm-med) var(--wm-ease), border-color var(--wm-fast); }
.wm-acc[open] summary::after { transform: rotate(-135deg) translateY(-2px); }
.wm-acc summary:hover { color: var(--wm-primary-dark); }
.wm-acc summary:hover::after { border-color: var(--wm-primary-dark); }
.wm-acc summary:focus-visible { outline: 2px solid var(--wm-focus); outline-offset: 2px; border-radius: var(--wm-radius-xs); }
.wm-acc :is(ul, p) { margin: 0 0 14px; color: var(--wm-ink-2); font-size: var(--wm-fs-body); line-height: 1.55; }
.wm-acc ul { padding-left: 20px; list-style: disc; }
.wm-acc li + li { margin-top: 6px; }

/* ---------------------------------------------------------------- Motion: short, only for state changes, none if asked */
@keyframes wm-pop { from { opacity: 0; transform: translateY(-4px) scale(.98); } }
@media (prefers-reduced-motion: no-preference) {
	.wp-core-ui .button:active:not(:disabled), .wp-admin .page-title-action:active, .wm-iconbtn:active, .wm-seg a:active, .wp-admin ul.subsubsub a:active { transform: translateY(1px); }
	.wm-status-menu[open] .wm-status-menu__list, .wm-pick-pop { animation: wm-pop var(--wm-med) var(--wm-ease); }
	/* accordions and the status menu open smoothly where the browser can animate to "auto" (Chrome, Edge); elsewhere they simply open */
	:root { interpolate-size: allow-keywords; }
	.wm-acc::details-content { block-size: 0; overflow: hidden; opacity: 0; transition: block-size var(--wm-med) var(--wm-ease), opacity var(--wm-med) var(--wm-ease), content-visibility var(--wm-med) allow-discrete; }
	.wm-acc[open]::details-content { block-size: auto; opacity: 1; }
	.wm-seg a, .wp-admin ul.subsubsub a, .media-modal .media-router .media-menu-item { transition: background-color var(--wm-med) var(--wm-ease), color var(--wm-med) var(--wm-ease), transform var(--wm-fast); }
	.wm-card a.wm-stat__box, .wm-stat a.wm-stat__box { transition: border-color var(--wm-fast), box-shadow var(--wm-med) var(--wm-ease); }
	.wm-toast { transition: opacity var(--wm-med) var(--wm-ease), transform var(--wm-med) var(--wm-ease); }
	@supports (appearance: base-select) { .wp-admin select:not([multiple])::picker(select):popover-open { animation: wm-pop var(--wm-med) var(--wm-ease); } }
}

/* ---------------------------------------------------------------- Edit screens (a place, a walk, a layer) */
/* back to the list the item belongs to; no Add button and no Move to bin while editing */
.wm-back { display: inline-flex; align-items: center; gap: 2px; margin: 0 0 6px; color: var(--wm-ink-2); font-size: var(--wm-fs-body); font-weight: 600; text-decoration: none; }
.wm-back:hover { color: var(--wm-primary-dark); text-decoration: underline; text-underline-offset: 2px; }
.wrap > .wm-back { display: flex; width: max-content; }
body:is(.post-php.post-type-witney_place, .post-php.post-type-witney_story, .term-php) .wrap > .page-title-action { display: none; }
body:is(.post-type-witney_place, .post-type-witney_story) #delete-action { display: none; }
/* section links: the kit's tab bar, kept in view */
/* panels open and close from their heading; a chevron that turns, no box or circle round it */
.wp-admin .postbox .postbox-header .hndle { cursor: pointer; }
.wp-admin .postbox .handle-order-higher, .wp-admin .postbox .handle-order-lower { display: none; }
.wp-admin .postbox .handlediv { display: grid; place-items: center; width: var(--wm-tap); height: var(--wm-tap); margin-right: 4px; border: 0; border-radius: var(--wm-pill); background: none; color: var(--wm-muted); box-shadow: none; }
.wp-admin .postbox .handlediv:hover { background: var(--wm-hover); color: var(--wm-ink); }
.wp-admin .postbox .handlediv:focus { box-shadow: none; outline: none; }
.wp-admin .postbox .handlediv:focus-visible { outline: 2px solid var(--wm-focus); outline-offset: 2px; }
.wp-admin .postbox .handlediv .toggle-indicator { display: block; width: 16px; height: 16px; }
.wp-admin .postbox .handlediv .toggle-indicator::before { content: ""; display: block; width: 16px; height: 16px; background: currentColor; -webkit-mask: url(../icons/caret-down-regular.svg) center / contain no-repeat; mask: url(../icons/caret-down-regular.svg) center / contain no-repeat; transform: rotate(180deg); transition: transform var(--wm-med) var(--wm-ease); }
.wp-admin .postbox.closed .handlediv .toggle-indicator::before { transform: rotate(0deg); }
/* pin icon: the choice, and Change opens every icon in a dialog */
.wm-iconpick__now { display: inline-flex; align-items: center; gap: 10px; box-sizing: border-box; min-width: 200px; height: var(--wm-tap); padding: 0 14px; border: 1px solid var(--wm-field); border-radius: var(--wm-radius-sm); background: var(--wm-surface); color: var(--wm-ink); }
.wm-iconpick__now .wm-icon { width: 20px; height: 20px; }
/* inside the one-field button: no box of its own, the icon in a circle of the layer's colour (as Pin colour shows it) */
.wm-icon-field .wm-iconpick__now { min-width: 0; height: auto; padding: 0; border: 0; background: none; font-weight: 500; }
.wm-icon-field .wm-iconpick__now > .wm-icon { box-sizing: border-box; flex: none; width: 30px; height: 30px; padding: 6px; border-radius: 50%; background: color-mix(in srgb, var(--wm-tint) 14%, #fff); color: var(--wm-tint); }
.wm-dialog.wm-dialog--wide { width: min(720px, calc(100% - 32px)); }
/* Form dialog (a one- or two-field form on the page that opens it): never more than 60% of the screen on tablets and
   computers, the page's width less its 16px edges on phones. Main button first, then Cancel; the fields fill the width. */
.wm-dialog.wm-dialog--form { box-sizing: border-box; width: calc(100% - 32px); max-width: 480px; padding: 20px; }
@media (min-width: 600px) { .wm-dialog.wm-dialog--form { width: min(480px, 60vw); } }
.wm-dialog--form .wm-dialog__head { margin: 0 0 12px; }
.wm-dialog--form .description { margin: 0 0 12px; }
.wm-dialog--form .witney-field { margin: 0 0 16px; }
.wm-dialog--form .witney-field label { display: block; margin: 0 0 6px; font-weight: 600; }
.wm-dialog--form .witney-field :is(textarea, input[type="file"]) { box-sizing: border-box; width: 100%; max-width: 100%; }
.wm-dialog--form .witney-field .description { display: block; margin: 6px 0 0; }
.wm-dialog__actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin: 16px 0 0; } /* Cancel, then the action, on the right */
.wm-dialog .wm-iconpick__grid { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 0; padding: 0; border: 0; }
.wm-hours__rm.wm-iconbtn { color: var(--wm-muted); }
.wm-hours__rm.wm-iconbtn:hover { background: var(--wm-danger-soft); color: var(--wm-danger); }

/* ---------------------------------------------------------------- Forms: sections, the "i" help, advanced parts */
.wm-form-section { padding: 4px 0 20px; }
.wm-form-section + .wm-form-section, .wm-form-section + .wm-checks { padding-top: 20px; border-top: 1px solid var(--wm-line); }
.wm-form-section__title { display: flex; align-items: center; gap: 6px; margin: 0 0 14px; padding: 0; color: var(--wm-ink); font: 600 var(--wm-fs-card)/1.3 var(--wm-font); }
.wm-label-row { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; }
.wm-label-row > .wm-info { margin-block: -4px; } /* the "i" never makes its label taller than a plain one: fields line up across columns */
.witney-app .witney-field .wm-label-row :is(label, span.wm-label) { display: inline; margin: 0; } /* label and its "i" on one line */
.witney-field > .wm-label-row + :is(input, textarea, select) { margin-top: 0; }
/* the "i": a quiet round button; its note opens just under it */
.wm-info { position: relative; display: inline-flex; }
.wm-info > summary { display: grid; place-items: center; width: 24px; height: 24px; border-radius: var(--wm-pill); color: var(--wm-muted); list-style: none; cursor: pointer; transition: background-color var(--wm-fast), color var(--wm-fast); }
.wm-info > summary::-webkit-details-marker { display: none; }
.wm-info > summary .wm-icon { width: 16px; height: 16px; }
.wm-info > summary:hover, .wm-info[open] > summary { background: var(--wm-primary-soft); color: var(--wm-primary-dark); }
.wm-info > summary:focus-visible { outline: 2px solid var(--wm-focus); outline-offset: 2px; }
.wm-info__pop { position: absolute; z-index: 30; top: calc(100% + 6px); left: -8px; width: max-content; max-width: min(320px, calc(100vw - 32px)); padding: 10px 12px; border: 1px solid var(--wm-line); border-radius: var(--wm-radius-sm); background: var(--wm-surface); box-shadow: var(--wm-shadow-lg); color: var(--wm-ink-2); font: 400 var(--wm-fs-para)/1.5 var(--wm-font); white-space: normal; }
/* parts most people never need (the "open now" code, photo credit): folded away */
.wm-advanced { margin: 4px 0 0; }
.wm-advanced > summary { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; color: var(--wm-primary-dark); font-weight: 600; list-style: none; cursor: pointer; }
.wm-advanced > summary::-webkit-details-marker { display: none; }
.wm-advanced > summary::before { content: ""; width: 14px; height: 14px; background: currentColor; -webkit-mask: url(../icons/caret-down-regular.svg) center / contain no-repeat; mask: url(../icons/caret-down-regular.svg) center / contain no-repeat; transform: rotate(-90deg); transition: transform var(--wm-med) var(--wm-ease); }
.wm-advanced[open] > summary::before { transform: rotate(0deg); }
.wm-advanced > :not(summary) { margin-top: 12px; }
/* checkbox lists */
.wm-checks { margin: 0; padding: 0 0 4px; border: 0; } /* its section draws the divider */
.witney-app .wm-checks > legend { float: left; width: 100%; display: flex; margin: 0 0 12px; padding: 0; } /* a heading, not text sitting on the line */
.wm-checks > legend + * { clear: both; }
.witney-app .wm-checks .wm-check-opt { display: inline-flex; align-items: center; gap: 8px; margin: 4px 20px 8px 0; color: var(--wm-ink); }
/* Every tick box and round button with its words: 12px between them on every screen (it was 0, 1, 4, 8 or 12px
   depending on how the screen built it). The box keeps to the first line when the words wrap. Controls whose input is
   hidden inside a tile or chip (layer tiles, day toggles, the icon picker, Share's "where it will go", table ticks)
   are not this component. */
.wp-admin #wpbody-content label:has(> input:is([type="checkbox"], [type="radio"])):not(.wm-tile, .wm-day, .wm-share__chip, .wm-iconpick__opt, .check-column label) { display: inline-flex; align-items: flex-start; gap: 12px; color: var(--wm-ink); font-size: var(--wm-fs-body); font-weight: 400; } /* the words read as text (400, 14px), on every screen; the field's own label above is the bold line */
.wp-admin #wpbody-content label:has(> input:is([type="checkbox"], [type="radio"])):not(.wm-tile, .wm-day, .wm-share__chip, .wm-iconpick__opt, .check-column label) > input { flex: none; margin: 0; }
/* ...and where the words are a separate label beside the box (WordPress's Add user): the same 12px */
.wp-admin #wpbody-content :is(input[type="checkbox"], input[type="radio"]):not(.check-column input) + label { margin-left: 8px; } /* 8px plus the space between them */
.wp-admin #wpbody-content :is(input[type="checkbox"], input[type="radio"]):not(.check-column input):has(+ label) { margin-right: 0; }
/* opening hours builder: part of the section, not a link to open */
#wm-hours-builder { margin: 0 0 16px; }

/* ---------------------------------------------------------------- Panels open and close smoothly (where the browser can animate to "auto") */
@media (prefers-reduced-motion: no-preference) {
	.wp-admin .postbox .inside { overflow: hidden; transition: height var(--wm-slow) var(--wm-ease), opacity var(--wm-slow) var(--wm-ease), visibility 0s; }
	.wp-admin .postbox.closed .inside { display: block !important; height: 0; margin-top: 0 !important; padding-top: 0; padding-bottom: 0; opacity: 0; visibility: hidden; transition: height var(--wm-slow) var(--wm-ease), opacity var(--wm-med) var(--wm-ease), padding var(--wm-slow) var(--wm-ease), visibility 0s var(--wm-slow); }
	.wm-advanced::details-content, .wm-acc::details-content { block-size: 0; overflow: hidden; opacity: 0; transition: block-size var(--wm-slow) var(--wm-ease), opacity var(--wm-slow) var(--wm-ease), content-visibility var(--wm-slow) allow-discrete; }
	.wm-advanced[open]::details-content, .wm-acc[open]::details-content { block-size: auto; opacity: 1; }
	.wm-info[open] .wm-info__pop { animation: wm-pop var(--wm-med) var(--wm-ease); }
}
.taxonomy-witney_layer #edittag .term-slug-wrap { display: none; } /* the slug follows the name */

/* ---------------------------------------------------------------- Publish panel (places and walks) */
body:is(.post-type-witney_place, .post-type-witney_story) #submitdiv :is(.misc-pub-post-status, .misc-pub-curtime, .misc-pub-visibility, #preview-action) { display: none; }
body:is(.post-type-witney_place, .post-type-witney_story) #submitdiv #submitpost { display: flex; flex-direction: column; }
body:is(.post-type-witney_place, .post-type-witney_story) #submitdiv #minor-publishing { display: contents; } /* its parts take their places in the order below */
body:is(.post-type-witney_place, .post-type-witney_story) #submitdiv #misc-publishing-actions { order: 1; padding: 0; }
body:is(.post-type-witney_place, .post-type-witney_story) #submitdiv #misc-publishing-actions .misc-pub-section { padding: 12px 16px; border: 0; }
body:is(.post-type-witney_place, .post-type-witney_story) #submitdiv #major-publishing-actions { order: 2; display: flex; flex-direction: column; gap: 8px; padding: 4px 16px 8px; border: 0; background: none; }
body:is(.post-type-witney_place, .post-type-witney_story) #submitdiv #publishing-action { display: flex; flex-direction: row-reverse; align-items: center; gap: 8px; float: none; width: 100%; text-align: left; line-height: 1; }
body:is(.post-type-witney_place, .post-type-witney_story) #submitdiv #publishing-action .button { flex: 1; }
body:is(.post-type-witney_place, .post-type-witney_story) #submitdiv #publishing-action { position: relative; }
body:is(.post-type-witney_place, .post-type-witney_story) #submitdiv #publishing-action .spinner { position: absolute; right: 12px; top: 50%; float: none; margin: -10px 0 0; } /* over the button while saving, no space of its own */
body:is(.post-type-witney_place, .post-type-witney_story) #submitdiv #minor-publishing-actions { order: 3; display: flex; padding: 0 16px 16px; }
body:is(.post-type-witney_place, .post-type-witney_story) #submitdiv #save-action { display: flex; float: none; width: 100%; }
body:is(.post-type-witney_place, .post-type-witney_story) #submitdiv #save-action { position: relative; }
body:is(.post-type-witney_place, .post-type-witney_story) #submitdiv #save-action .spinner { position: absolute; right: 12px; top: 50%; float: none; margin: -10px 0 0; }
body:is(.post-type-witney_place, .post-type-witney_story) #submitdiv #save-action .button { flex: 1; }
body:is(.post-type-witney_place, .post-type-witney_story) #submitdiv :is(#major-publishing-actions, #minor-publishing-actions) .clear { display: none; }
/* When the box is wide (one column on tablets and smaller laptops), Save Draft and the main button sit side by side on
   the right, secondary first, as in every dialog, instead of two bars the width of the page. In the narrow sidebar of
   a wide screen they stay stacked, full width. Measured on the box itself, so it holds at any screen size. */
body:is(.post-type-witney_place, .post-type-witney_story) #submitdiv .inside { container: wm-publish / inline-size; }
/* Phones and narrow boxes: the two buttons share the row in equal halves (Save Draft first); a single one is full width. */
@container wm-publish (min-width: 300px) and (max-width: 559px) {
	body:is(.post-type-witney_place, .post-type-witney_story) #submitdiv #submitpost { flex-direction: row; flex-wrap: wrap; gap: 8px; padding: 0 16px 16px; }
	body:is(.post-type-witney_place, .post-type-witney_story) #submitdiv #misc-publishing-actions { flex: 1 1 100%; margin: 0 -16px; }
	body:is(.post-type-witney_place, .post-type-witney_story) #submitdiv :is(#minor-publishing-actions, #major-publishing-actions) { flex: 1 1 0; padding: 0; border: 0; background: none; }
	body:is(.post-type-witney_place, .post-type-witney_story) #submitdiv #minor-publishing-actions { order: 2; }
	body:is(.post-type-witney_place, .post-type-witney_story) #submitdiv #major-publishing-actions { order: 3; }
	body:is(.post-type-witney_place, .post-type-witney_story) #submitdiv #minor-publishing-actions:not(:has(.button)) { display: none; }
}
@container wm-publish (min-width: 560px) {
	body:is(.post-type-witney_place, .post-type-witney_story) #submitdiv #submitpost { flex-direction: row; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 8px; padding: 0 16px 16px; }
	body:is(.post-type-witney_place, .post-type-witney_story) #submitdiv #misc-publishing-actions { flex: 1 1 100%; margin: 0 -16px; }
	body:is(.post-type-witney_place, .post-type-witney_story) #submitdiv #minor-publishing-actions { order: 2; padding: 0; }
	body:is(.post-type-witney_place, .post-type-witney_story) #submitdiv #major-publishing-actions { order: 3; padding: 0; border: 0; background: none; }
	body:is(.post-type-witney_place, .post-type-witney_story) #submitdiv :is(#save-action, #publishing-action) { width: auto; }
	body:is(.post-type-witney_place, .post-type-witney_story) #submitdiv :is(#save-action, #publishing-action) .button { flex: none; min-width: 168px; }
	body:is(.post-type-witney_place, .post-type-witney_story) #submitdiv #minor-publishing-actions:not(:has(.button)) { display: none; } /* a live item has no Save Draft: the one button alone, on the right */
}
.wm-pub-status { display: grid; gap: 8px; }
.wm-pub-status > .wm-status { justify-self: start; }
.wm-pub-status .wm-onmap { margin: 0; color: var(--wm-ink-2); font-size: var(--wm-fs-body); }
.wm-pub-status p:empty { display: none; }
.wm-pub-tools { display: flex; gap: 16px; }

/* ---------------------------------------------------------------- Photo drop areas: a dashed box to click or drop on */
.wp-admin button.wm-drop__zone { width: 100%; font: inherit; cursor: pointer; }
.wm-drop__zone, #postimagediv #set-post-thumbnail:not(:has(img)) { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; box-sizing: border-box; min-height: 128px; padding: 20px; border: 1px dashed var(--wm-field); border-radius: var(--wm-radius-sm); background: var(--wm-surface-2); color: var(--wm-ink); text-align: center; text-decoration: none; transition: border-color var(--wm-fast), background-color var(--wm-fast); }
.wm-drop__zone .wm-icon { width: 28px; height: 28px; margin-bottom: 4px; color: var(--wm-muted); }
.wm-drop__zone strong { color: var(--wm-ink); font-size: var(--wm-fs-body); font-weight: 600; }
.wm-drop__zone span { color: var(--wm-muted); font-size: var(--wm-fs-para); }
.wm-drop__zone:hover, .wm-drop__zone.is-over, .wm-drop.is-over .wm-drop__zone, #postimagediv #set-post-thumbnail:not(:has(img)):hover { border-color: var(--wm-green); background: var(--wm-primary-soft); }
.wm-drop__zone:focus-visible, #postimagediv #set-post-thumbnail:focus-visible { outline: 2px solid var(--wm-focus); outline-offset: 2px; }
#postimagediv #set-post-thumbnail:not(:has(img))::before { content: ""; width: 28px; height: 28px; margin-bottom: 4px; background: var(--wm-muted); -webkit-mask: url(../icons/camera.svg) center / contain no-repeat; mask: url(../icons/camera.svg) center / contain no-repeat; }
#postimagediv #set-post-thumbnail:not(:has(img)) { font-weight: 600; }

/* ---------------------------------------------------------------- Required items and what is missing */
.witney-req { color: var(--wm-danger); font-weight: 600; }
/* required choices without a text label of their own: the * on the choice itself (the layer types, the main photo box) */
body.post-type-witney_place #witney_layerchecklist > .wm-layer-group:first-child::after, body.post-type-witney_place #postimagediv #set-post-thumbnail:not(:has(img))::after { content: " *"; color: var(--wm-danger); font-weight: 600; }
/* the edit screens' page title: the name field already says what this is (kept for screen readers) */
body:is(.post-php, .post-new-php):is(.post-type-witney_place, .post-type-witney_story) .wrap > h1.wp-heading-inline { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
/* what's missing: one line of links, each to its field */
.wm-missing-notice { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; }
.wm-missing-notice > p { margin: 0 !important; padding: 0 !important; }
.wm-missing { display: inline-flex; flex-wrap: wrap; gap: 4px 0; margin: 0; padding: 0; list-style: none; }
.wm-missing li { margin: 0; }
.wm-missing li + li::before { content: "·"; margin: 0 8px; color: var(--wm-muted); }
.wm-missing a { color: var(--wm-primary-dark); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }

/* A suggested update to a live place: what it is, then the changes so far */
.witney-suggestion > p { margin: 0; }
.witney-suggestion__title { color: var(--wm-ink); font-weight: 600; }
.witney-suggestion__text { margin-top: 2px !important; color: var(--wm-ink-2); }
.witney-suggestion .witney-diff { margin: 8px 0 2px; }

/* Live preview card: an empty photo shows the layer's icon in the middle; a website shows its name, one line */
.wm-pcard .wm-pcard__img.wm-tile-lg { display: grid; place-items: center; aspect-ratio: 16 / 9; background: var(--wm-surface-2); }
.wm-pcard li > span { min-width: 0; overflow-wrap: anywhere; }
.wm-pcard li[data-p="website"] > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Edit place: the name is the first field of About; the form needs no heading of its own (its sections have them) */
body.wm-name-moved #titlediv { display: none; }
.wm-name-field #title { width: 100%; height: var(--wm-tap); min-height: var(--wm-tap); padding: 0 14px; border-radius: var(--wm-radius-sm); font-size: var(--wm-fs-card); font-weight: 600; }
:is(#witney_place_details, #witney_story_details) > .postbox-header { display: none; }
:is(#witney_place_details, #witney_story_details) > .inside { margin-top: 0 !important; padding-top: 20px; }

/* When it shows: the two dates side by side; Feature and its end date on one row */
#witney_place_visibility .witney-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 20px; }
#witney_place_visibility .wm-feature-row { align-items: end; }
#witney_place_visibility .wm-feature-check { display: flex; align-items: center; min-height: var(--wm-tap); }
#witney_place_visibility .wm-feature-check label { display: inline-flex !important; align-items: center; gap: 8px; margin: 0; font-weight: 600; }
#witney_place_visibility > .inside > .description:first-child { margin: 0 0 16px; }
@media (max-width: 782px) { #witney_place_visibility .witney-grid { grid-template-columns: minmax(0, 1fr); } }

/* The changes in a suggested update: long text wraps inside its box */
.witney-diff :is(del, ins) { overflow-wrap: anywhere; }
.witney-suggestion__changes { margin-top: 6px; }
/* Publish panel: Revisions (WordPress's history link) last, under the status and links */
body:is(.post-type-witney_place, .post-type-witney_story) #submitdiv #misc-publishing-actions { display: flex; flex-direction: column; }
body:is(.post-type-witney_place, .post-type-witney_story) #submitdiv .misc-pub-revisions { order: 9; padding-top: 0; color: var(--wm-muted); font-size: var(--wm-fs-para); }

/* Edit screens below 1280px: the side column goes under the form (Publish first), so nothing is cut off */
@media screen and (max-width: 1279px) {
	body:is(.post-php, .post-new-php) #poststuff #post-body.columns-2 { margin-right: 0; }
	body:is(.post-php, .post-new-php) #poststuff #post-body.columns-2 #postbox-container-1 { float: none; width: 100%; margin-right: 0; }
	body:is(.post-php, .post-new-php) #poststuff #post-body.columns-2 #side-sortables { width: auto; min-height: 0; }
	body:is(.post-php, .post-new-php) #poststuff #post-body.columns-2 #postbox-container-2 { float: none; width: 100%; }
}
/* the main photo's * on the same line as "Choose main photo" */
body.post-type-witney_place #postimagediv #set-post-thumbnail:not(:has(img)) { flex-flow: row wrap; }
body.post-type-witney_place #postimagediv #set-post-thumbnail:not(:has(img))::before { flex-basis: 100%; height: 28px; margin: 0 0 8px; -webkit-mask-size: 28px; mask-size: 28px; }
/* the preview's Directions: a picture of the button, not a second main button */
.wm-pcard__actions .button.button-primary { border-color: var(--wm-line-2); background: var(--wm-surface); color: var(--wm-primary-dark); }
/* Owned by: part of the status */
.wm-pub-status .witney-org { margin: 0; color: var(--wm-muted); font-size: var(--wm-fs-para); }
.wm-pub-status .witney-org strong { color: var(--wm-ink-2); font-weight: 600; }
/* the name field: the same size as every field */
.wm-name-field #title { font-size: var(--wm-fs-body); }
/* back link: a chevron with room */
.wm-back > span[aria-hidden] { display: inline-block; width: 16px; height: 16px; margin-right: 4px; background: currentColor; -webkit-mask: url(../icons/caret-down-regular.svg) center / contain no-repeat; mask: url(../icons/caret-down-regular.svg) center / contain no-repeat; transform: rotate(90deg); font-size: 0; }

/* ---------------------------------------------------------------- Form fields: ONE pattern on every form
 * (places, walks, layers, Add a place, Settings, Import, Insights, Users, Profile)
 *   label above the field: 13px semibold ink, 6px gap · field 40px, 14px · help under it: 13px grey, 6px gap
 *   16px between fields · WordPress's side-label tables (Settings, Users, Profile) stack the same way */
.wp-admin #wpbody-content :is(.witney-field, .form-field, .wm-label-row, .wm-hours__time) > :is(label, legend):not(:has(input[type="checkbox"], input[type="radio"]), .wm-form-section__title),
.wp-admin #wpbody-content .wm-label-row > label, .wp-admin #wpbody-content .wm-label, .wp-admin #wpbody-content .form-table th, .wp-admin #wpbody-content .witney-stop__label {
	display: block; margin: 0 0 6px; padding: 0; color: var(--wm-ink); font: 600 var(--wm-fs-para)/1.4 var(--wm-font); text-align: left; width: auto;
}
.wp-admin #wpbody-content .wm-label-row > :is(label, .wm-label) { display: inline; margin: 0; }
#wpbody-content .form-table, #wpbody-content .form-table :where(tbody, tr, th, td) { display: block; width: auto; } /* light enough that a rule hiding a row still wins */
.wp-admin #wpbody-content .form-table { margin: 0; }
.wp-admin #wpbody-content .form-table tr { margin: 0 0 16px; }
.wp-admin #wpbody-content .form-table :is(th, td) { padding: 0; }
.wp-admin #wpbody-content :is(.witney-field, .form-field) { margin: 0 0 16px; }
.wp-admin #wpbody-content .form-field :is(input[type="text"], textarea, select) { width: 100%; max-width: 100%; }
/* help under a field */
.wp-admin #wpbody-content :is(.witney-field, .form-field, .form-table td, .wm-hours) .description:not([hidden]),
.wp-admin #wpbody-content .witney-field .wm-optional:not([hidden]) { display: block; margin: 6px 0 0; color: var(--wm-muted); font: 400 var(--wm-fs-para)/1.5 var(--wm-font); }
/* fields: one size; the name is a field like the rest */
.wm-name-field #title { font-weight: 400; }
.wp-admin #wpbody-content input.small-text { width: 96px; padding: 0 14px; text-align: left; }
.wp-admin #wpbody-content textarea { min-height: 88px; }
.wm-iconpick__now { font-size: var(--wm-fs-body); }
.wp-admin :is(.wm-colour-field, .wm-icon-field) { display: flex; width: 100%; box-sizing: border-box; min-height: var(--wm-tap); padding: 4px 14px 4px 4px; border-radius: var(--wm-radius-sm); font-weight: 500; } /* a field: as wide and tall as the inputs beside it */
.wp-admin :is(.wm-colour-field, .wm-icon-field) :is(.wm-colour-pin, .wm-icon-swatch) { flex: none; width: 30px; height: 30px; }
.wp-admin :is(.wm-colour-field, .wm-icon-field) > :is(.wm-icon-change, :last-child) { margin-left: auto; } /* only the field's own last item: not the glyph inside the circle */
.wp-admin :is(.wm-colour-field, .wm-icon-field) :is(.wm-colour-pin, .wm-icon-swatch) .wm-icon-glyph { width: 18px; height: 18px; }
/* the opening-hours builder's Opens/Closes, the import file and the review note: ordinary labels */
.wp-admin #wpbody-content :is(.wm-hours__time label, .wm-import label[for], .witney-return label, .witney-review-card label[for]) { display: block; margin: 0 0 6px; color: var(--wm-ink); font: 600 var(--wm-fs-para)/1.4 var(--wm-font); }
/* notes that belong to a panel or section (not to one field): 13px grey, 12px from what's around them */
.wp-admin #wpbody-content :is(.postbox .inside, .wm-card, .wm-form-section) > p.description { margin: 12px 0; font-size: var(--wm-fs-para); }
.wp-admin #wpbody-content :is(.postbox .inside, .wm-card, .wm-form-section) > p.description:first-child,
.wp-admin #wpbody-content .wm-form-section > .wm-form-section__title + p.description { margin-top: 0; }
/* A section title that is a fieldset's legend looks like the others (the form's label rules would make it a small block). */
.wp-admin #wpbody-content legend.wm-form-section__title { display: flex; align-items: center; gap: 6px; margin: 0 0 14px; color: var(--wm-ink); font: 600 var(--wm-fs-card)/1.3 var(--wm-font); }
.wp-admin #wpbody-content :is(.postbox .inside, .wm-card, .wm-form-section) > p.description:last-child { margin-bottom: 0; }
.wp-admin #wpbody-content .wm-hours label[id$="-label"] { color: var(--wm-ink); }
.wp-admin #wpbody-content :is(.wm-pub-status, #witney_place_location .inside) .description { margin: 6px 0 0; }
/* Users and Profile: their sections are cards; the stacked fields sit inside with the card's padding */
body:is(.profile-php, .user-edit-php, .user-new-php) #wpbody-content .form-table { box-sizing: border-box; padding: 20px 20px 4px; }

/* ---------------------------------------------------------------- Two columns where there is room: short fields side by side,
 * long ones (passwords, sessions, descriptions, choices of colour or icon) across the full width */
#wpbody-content .wm-details-grid > tbody, #wpbody-content #edittag .form-table > tbody { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 20px; }
#wpbody-content .wm-details-grid > tbody > tr:is(.user-pass1-wrap, .user-pass2-wrap, #password, .pw-weak, .user-sessions-wrap, .user-generate-reset-link-wrap, .user-description-wrap),
#wpbody-content .wm-details-grid > tbody > tr:is(.pw-weak, :has(#send_user_notification)),
#wpbody-content #edittag .form-table > tbody > tr:is(.term-description-wrap, :has(textarea)) { grid-column: 1 / -1; }
@media (max-width: 960px) { #wpbody-content .wm-details-grid > tbody, #wpbody-content #edittag .form-table > tbody { grid-template-columns: minmax(0, 1fr); } }
/* in the two-column cards, fields fill their column */
#wpbody-content .wm-details-grid :is(input[type="text"], input[type="email"], input[type="url"], input[type="password"], select), #wpbody-content #edittag .form-table :is(input[type="text"], input[type="number"], select, .wm-pick) { width: 100%; max-width: 100%; }
/* Add user: the form is a card like Profile's; "(required)" stays beside its label */
.user-new-php #wpbody-content #createuser .form-table { box-sizing: border-box; margin: 0 0 20px; padding: 20px 20px 4px; border: 1px solid var(--wm-line); border-radius: var(--wm-radius); background: var(--wm-surface); }
.wp-admin #wpbody-content .form-table th .description:not([hidden]) { display: inline; margin: 0; font-weight: 400; }
/* Edit layer: the slug follows the name, never shown */
.taxonomy-witney_layer #edittag .form-table tr.term-slug-wrap { display: none !important; }

/* ================================================================= Add a place: Publish card
   The same job and place as the edit screen's Publish panel: what is left, then Publish and Save draft. Wide screens: the
   right column, above the visitor preview. Narrower: stuck to the top of the form. Phones: the buttons stick to the bottom. */
.wm-publish { position: sticky; top: var(--wm-top); z-index: 6; display: grid; gap: 16px; padding: 16px 20px; border: 1px solid var(--wm-line); border-radius: var(--wm-radius); background: var(--wm-surface); }
.wm-check__top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.wm-check__title { margin: 0; color: var(--wm-ink); font-size: var(--wm-fs-card); font-weight: 600; }
.wm-check__count { color: var(--wm-muted); font-size: var(--wm-fs-para); font-variant-numeric: tabular-nums; white-space: nowrap; }
.wm-check__bar { margin: 12px 0; }
.wm-publish__actions { display: grid; gap: 8px; }
.wm-publish__actions .button { width: 100%; justify-content: center; }
.wm-publish .wm-why { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; } /* the list says it; kept for screen readers */
.wm-check__saved { margin: 0; color: var(--wm-muted); font-size: var(--wm-fs-para); text-align: center; }
.wm-check__saved:empty { display: none; }
.wp-core-ui .wm-publish .button-primary[aria-disabled="true"] { opacity: 1; border-color: var(--wm-line-2); background: var(--wm-surface-2); color: var(--wm-muted); cursor: not-allowed; }
@media (min-width: 1200px) { .wm-publish { position: static; } .wm-side .wm-check__list { gap: 10px; } }
@media (max-width: 1199px) { /* one column: the card is the top of the form card, not a card inside it */
	.wm-publish { border: 0; border-bottom: 1px solid var(--wm-line); border-radius: var(--wm-radius) var(--wm-radius) 0 0; }
	.wm-guided > .wm-side { margin-bottom: 0; }
}
@media (max-width: 1199px) { /* one row: progress, then the buttons; the list itself is the wide screen's right column */
	.wm-check__list { display: none; }
	.wm-check__bar { margin: 10px 0 0; }
}
@media (min-width: 782px) and (max-width: 1199px) {
	.wm-publish { grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: 24px; }
	.wm-publish__actions { display: flex; flex-direction: row-reverse; align-items: center; }
	.wm-publish__actions .button { width: auto; }
	.wm-check__saved { order: 9; }
}
@media (max-width: 781px) { /* phones: the buttons stay in reach at the bottom of the screen */
	.wm-publish__actions { position: fixed; left: 0; right: 0; bottom: 0; z-index: 9989; display: flex; flex-direction: row-reverse; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: var(--wm-surface); box-shadow: var(--wm-shadow-island); }
	.wm-publish__actions .button { flex: 1 1 0; }
	.wm-publish { position: static; }
	.wm-check__saved { display: none; }
	.witney-quick { padding-bottom: 80px; }
}

/* ================================================================= Page head: one rhythm on every screen
   Back link, 6px, title; title to its one-line lede 4px; title (or lede) to the content 20px. */
.witney-app .wrap > h1 ~ #edittag, .witney-app .wrap > h1 + nav.wm-seg { margin-top: 20px; }
.witney-app .wrap > h1 + nav.wm-seg + p.description { margin-top: 0; }
.witney-app .wrap > #add-new-user + p { margin: 4px 0 20px; }

/* Help dialog: its sections line up with the dialog's title (no second indent), group names in sentence case. */
.wm-help-dialog__body .wm-guide__section { padding: 0; }
.wm-help-dialog__body .wm-guide__section:first-child h3 { margin-top: 8px; }
.wm-help-dialog__body .wm-guide__section + .wm-guide__section { margin-top: 8px; }

/* Edit layer: fields in pairs that belong together, checkbox text at body weight (labels are the bold line above). */
#edittag .form-table > tbody > tr.term-name-wrap { order: 0; }
#edittag .form-table > tbody > tr { order: 2; }
.wp-admin .form-table td label:has(> input[type="checkbox"]) { display: inline-flex; align-items: flex-start; gap: 8px; color: var(--wm-ink); font-weight: 400; }
.wp-admin .form-table td label:has(> input[type="checkbox"]) > input { flex: none; margin: 0; } /* 20px box on a 20px line */

/* Field help with a character count: one baseline. */
.wm-help-row { align-items: baseline; }

.wp-admin #wpbody-content .description:empty { display: none; }

/* Password (Add user, Profile): the field with its show/hide eye inside, the strength as a word under it, and Confirm
   password below; Generate password beside it. One column wide, like every other field. */
.wp-admin #wpbody-content tr.user-pass1-wrap td:has(> .wp-pwd:is(.is-open, :not(.hide-if-js))) { display: grid !important; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 20px; align-items: start; }
.wp-admin #wpbody-content tr.user-pass1-wrap td > .wp-pwd:is(.is-open, :not(.hide-if-js)) { grid-column: 1; grid-row: 1; }
.wp-admin #wpbody-content tr.user-pass1-wrap td > .wp-generate-pw { grid-column: 2; grid-row: 1; justify-self: start; margin: 0; }
.wp-admin #wpbody-content .wp-pwd { position: relative; margin: 0; }
.wp-admin #wpbody-content .wp-pwd .password-input-wrapper { display: block; width: 100%; }
.wp-admin #wpbody-content .wp-pwd #pass1 { width: 100%; max-width: none; padding-right: 48px; font-family: var(--wm-font); }
.wp-core-ui #wpbody-content .wp-pwd .button.wp-hide-pw, .wp-core-ui #wpbody-content .wp-pwd .button.wp-hide-pw:is(:hover, :focus, :active) { position: absolute; top: 0; right: 0; display: grid; place-items: center; width: 44px; min-height: var(--wm-tap); padding: 0; border: 0; border-radius: var(--wm-radius-sm); background: none; box-shadow: none; color: var(--wm-muted); }
.wp-core-ui #wpbody-content .wp-pwd .button.wp-hide-pw:hover { color: var(--wm-ink); }
.wp-core-ui #wpbody-content .wp-pwd .button.wp-hide-pw:focus-visible { outline: 2px solid var(--wm-focus); outline-offset: -2px; }
.wp-pwd .wp-hide-pw .dashicons { top: 0; }
.wp-pwd .wp-hide-pw .text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wp-admin #wpbody-content #pass-strength-result { display: block; width: auto; margin: 6px 0 0; padding: 0; border: 0; background: none; color: var(--wm-muted); font: 600 var(--wm-fs-para)/1.4 var(--wm-font); text-align: left; }
.wp-admin #wpbody-content #pass-strength-result:empty { display: none; }
.wp-admin #wpbody-content #pass-strength-result:is(.short, .bad) { color: var(--wm-danger); }
.wp-admin #wpbody-content #pass-strength-result.good { color: #8A5A00; }
.wp-admin #wpbody-content #pass-strength-result.strong { color: var(--wm-ok); }
.wm-pass2 { margin-top: 16px; }
.wp-admin #wpbody-content .wm-pass2 label { display: block; margin: 0 0 6px; color: var(--wm-ink); font-size: var(--wm-fs-para); font-weight: 600; }
.wp-admin #wpbody-content .wm-pass2 input { width: 100%; }
.wm-pass2__msg { margin: 6px 0 0; color: var(--wm-danger); font-size: var(--wm-fs-para); }
.wm-pass2__msg:empty { display: none; }
.wp-core-ui #wpbody-content .wp-pwd .wp-cancel-pw { margin-top: 12px; }
@media (max-width: 960px) { .wp-admin #wpbody-content tr.user-pass1-wrap td:has(> .wp-pwd) { grid-template-columns: minmax(0, 1fr); } .wp-admin #wpbody-content tr.user-pass1-wrap td > .wp-generate-pw { grid-column: 1; grid-row: 2; margin-top: 12px; } }
/* Profile: the new password field is always open (empty keeps the current one), so there is nothing to cancel. */
.wp-core-ui #wpbody-content .wp-pwd .wp-cancel-pw { display: none; }
/* A label with its "i": the row holds the one 6px gap (not the label, not the table cell too), and the "i" is centred
   on the label's line without making it taller, so the field lines up with its neighbour. */
.wp-admin #wpbody-content .wm-label-row > label:not(.a):not(.b):not(.c) { margin: 0; }
.wp-admin #wpbody-content .form-table th:has(> .wm-label-row) { margin-bottom: 0; }
.wm-label-row > .wm-info { margin-block: -3px; }
/* Layers: the visitor map never shows a layer's description, so it isn't asked for. */
.taxonomy-witney_layer :is(#edittag, #addtag) .term-description-wrap { display: none !important; }
/* Icon dialog: its search is a field like every other (and stays inside the dialog). */
body.wp-admin dialog.wm-icon-dialog input.wm-icon-find { box-sizing: border-box; width: calc(100% - 40px); max-width: none; min-height: var(--wm-tap); margin: 0 20px 8px; border: 1px solid var(--wm-field); border-radius: var(--wm-radius-sm); }
/* Edit place / walk: the name now lives in the form, so the empty title area above it takes no room (the form and the
   Publish panel start on the same line). */
body.wm-name-moved #post-body-content { margin-bottom: 0; }

/* Edit / Add layer: pairs that belong together (Name and what kind of layer; colour and icon; the two on/off options;
   the two dates), every row the same 20px apart, a tick sitting on the same line as the field beside it.
   The introduction is asked for only once it is a story layer: it is shown only above a story's places. */
#wpbody-content #edittag .form-table > tbody { row-gap: 20px; }
#wpbody-content #edittag .form-table > tbody > tr, #wpbody-content #edittag .form-table > tbody > tr > td { margin: 0; }
.wp-admin #wpbody-content #edittag .form-table td label:has(> input[type="checkbox"]),
.wp-admin #wpbody-content #addtag .form-field label:has(> input[type="checkbox"]) { box-sizing: border-box; min-height: var(--wm-tap); padding-top: 10px; align-items: flex-start; } /* one line sits in the middle of the field row beside it; two lines keep the tick on the first */
.wp-admin #wpbody-content :is(#edittag, #addtag) label:has(> input[type="checkbox"]) > input { margin: 0; }
:is(#edittag, #addtag):not(:has(#witney_story:checked)) :is(tr, .form-field):has(#witney_intro) { display: none; }
#wpbody-content #edittag .form-table > tbody > tr:has(#witney_intro) { grid-column: 1 / -1; }

/* Layers table: the map's order, set by dragging the handle (or up / down on it). */
.wm-list .column-witney_move, .wp-list-table .column-witney_move { width: 44px; padding-right: 0; }
.wp-core-ui .wm-drag { cursor: grab; color: var(--wm-ink-2); }
.wm-drag-help { margin: 0 0 12px; color: var(--wm-muted); font-size: var(--wm-fs-para); }
.wp-core-ui .wm-drag:hover { color: var(--wm-ink); }
.wp-core-ui .wm-drag:active { cursor: grabbing; }
.tablenav .wm-drag-help { float: left; margin: 0; line-height: 40px; }

/* Reorder menu (click a handle): the same popover look as the status menu. */
.wm-move-menu { position: absolute; z-index: 100000; display: grid; min-width: 180px; padding: 6px; border: 1px solid var(--wm-line); border-radius: var(--wm-radius-sm); background: var(--wm-surface); box-shadow: var(--wm-shadow-lg); }
.wm-move-menu[hidden] { display: none; }
.wm-move-menu button { min-height: 36px; padding: 0 12px; border: 0; border-radius: 8px; background: none; color: var(--wm-ink); font: 500 var(--wm-fs-body)/1 var(--wm-font); text-align: left; cursor: pointer; }
.wm-move-menu button:hover:not(:disabled), .wm-move-menu button:focus-visible { background: var(--wm-primary-soft); color: var(--wm-primary-dark); outline: 0; }
.wm-move-menu button:focus-visible { outline: 2px solid var(--wm-primary-dark); outline-offset: -2px; } /* a tint alone is too faint for keyboard focus (WCAG 1.4.11) */
.wm-move-menu button:disabled { color: var(--wm-muted); opacity: .5; cursor: default; }
.wm-list .column-move { width: 44px; padding-right: 0; }
.wm-listbar:has(.wm-drag-help) { justify-content: space-between; align-items: center; }

/* While a row is dragged: it lifts slightly; a dashed gap shows where it will land. */
table:has(.wm-drag) { position: relative; } /* the moving row is placed against the table, not the page */
.wm-list tbody tr.is-dragging, .wp-list-table tbody tr.is-dragging { background: var(--wm-surface); box-shadow: var(--wm-shadow-lg); }
tr.wm-sort-gap td { height: 64px; padding: 0; border: 2px dashed var(--wm-line-2); background: var(--wm-surface-2); }

/* Events: "When it's on" (events.php). Weekdays are the same round chips as the opening-hours days, here as real
   checkboxes so they post with the form. */
.wm-days { margin: 0 0 16px; padding: 0; border: 0; min-width: 0; }
.wm-days > legend { margin: 0 0 6px; padding: 0; color: var(--wm-ink); font-size: var(--wm-fs-para); font-weight: 600; }
/* Shown only for the repeat that needs it; the field and help rules elsewhere set display, so hidden must win here. */
:is([data-event-days], [data-event-until], [data-event-monthly])[hidden] { display: none !important; }
#wm-dates > .description { margin: 0 0 16px; }
.wp-admin #wpbody-content .wm-days > label.wm-day { position: relative; display: inline-grid; place-items: center; width: auto; min-width: 52px; min-height: 36px; margin: 0 6px 6px 0; padding: 0 12px; box-sizing: border-box; font-size: var(--wm-fs-para); font-weight: 600; }
.wm-days .wm-day input { position: absolute; inset: 0; margin: 0; opacity: 0; cursor: pointer; }
.wm-days .wm-day:has(input:checked) { border-color: var(--wm-primary); background: var(--wm-primary); color: #fff; }
.wm-days .wm-day:has(input:focus-visible) { outline: 2px solid var(--wm-focus); outline-offset: 2px; }
.wm-event__grid input[type="time"] { font-variant-numeric: tabular-nums; }
.wm-form-section[hidden] { display: none; }

/* Layer form: the featured dates belong to "On when the map opens", so they show only when it is ticked. */
:is(#edittag, #addtag):not(:has(#witney_default_on:checked)) :is(tr, .form-field):has(:is(#witney_feature_from, #witney_feature_until)) { display: none; }
