/* =========================================================
   Applicore Helpers – shared styles for Ollie + Gravity Forms + GravityView
   Colors come from the Ollie theme palette (--wp--preset--color--<slug>), so each site
   gets its own look from Site Editor → Styles → Colors. No form, field or View IDs here:
   site-specific tweaks use the classes below (see Settings → Applicore → Reference).
   ========================================================= */


/* =========================================================
   0. VARIABLES
   ========================================================= */
:root {
	/* Interface colour: buttons, focus rings, GravityView's accent, active states. Brand by default; Settings →
	   Applicore → Interface colour → Contrast switches it to main (for strong brand colours such as red). */
	--ac-accent:             var(--wp--preset--color--primary);

	--ac-btn-bg:             var(--ac-accent);
	--ac-btn-bg-hover:       var(--wp--preset--color--primary-alt-accent);
	--ac-btn-text:           var(--wp--preset--color--base);
	--ac-btn-radius:         4px;
	--ac-btn-padding:        .75em 1.75em;
	--ac-btn-font-size:      var(--wp--preset--font-size--base); /* all buttons: ac-btn, Gravity Forms, GravityView, GP Bookings */

	--ac-ghost-text:         var(--wp--preset--color--primary-alt-accent);
	--ac-ghost-border:       var(--wp--preset--color--border-light);
	--ac-ghost-border-hover: var(--wp--preset--color--border-dark);
	--ac-ghost-text-hover:   var(--ac-ghost-text);
	--ac-ghost-border-width: 1px;
	--ac-ghost-radius:       var(--ac-btn-radius);
	/* Settings → Applicore → Buttons → "Button block" overrides --ac-btn-* and --ac-ghost-* from Styles → Blocks → Button */

	--ac-danger:             #900;
}


/* =========================================================
   1. BUTTONS
   On a link or button, the class styles that element. On a wrapper (e.g. a GravityView
   field's "Custom CSS Class", which lands on the <td> or <tr>), it styles the link inside.
     ac-btn         solid (brand)
     ac-btn-ghost   outline – combine with ac-btn
     ac-btn-sm      small, pill-shaped – for table cells
   GravityView's own back link and "add note" button get the solid look too.
   ========================================================= */
:is(a, button).ac-btn,
.ac-btn a,
.gv-back-link a,
.button.gv-add-note-submit {
	display: inline-flex;
	align-items: center;
	gap: .4em;
	padding: var(--ac-btn-padding);
	border: 1px solid transparent;
	border-radius: var(--ac-btn-radius);
	background: var(--ac-btn-bg);
	color: var(--ac-btn-text) !important;
	font-size: var(--ac-btn-font-size);
	text-decoration: none !important;
	cursor: pointer;
	transition: background-color .2s, border-color .2s;
}
:is(a, button).ac-btn:hover,
.ac-btn a:hover,
.gv-back-link a:hover,
.button.gv-add-note-submit:hover {
	background: var(--ac-btn-bg-hover);
	color: var(--ac-btn-text) !important;
}

/* Ghost – also GravityView search "clear" */
:is(a, button).ac-btn-ghost,
.ac-btn-ghost a,
.gv-themed .gv-widget-search.gv-widget-search .gv-search-box-submit .gv-search-clear {
	padding: var(--ac-btn-padding);
	border: var(--ac-ghost-border-width) solid var(--ac-ghost-border);
	border-radius: var(--ac-ghost-radius);
	background: transparent;
	color: var(--ac-ghost-text) !important;
	text-decoration: none !important;
}
:is(a, button).ac-btn-ghost:hover,
.ac-btn-ghost a:hover,
.gv-themed .gv-widget-search.gv-widget-search .gv-search-box-submit .gv-search-clear:hover {
	border-color: var(--ac-ghost-border-hover);
	background: transparent;
	color: var(--ac-ghost-text-hover) !important;
}

/* Small */
:is(a, button).ac-btn-sm,
.ac-btn-sm a {
	padding: .2em .75em;
	border-radius: 999px;
	font-size: .9em;
}


/* =========================================================
   2. ICONS
   ac-icon-eye | ac-icon-pen | ac-icon-close – icon before the text, in the text color.
   New icon: add an SVG to images/ and one line: .ac-icon-name { --ac-icon: url(…); }
   ========================================================= */
.ac-icon-eye   { --ac-icon: url('../images/eye-icon.svg'); }
.ac-icon-pen   { --ac-icon: url('../images/pen-icon.svg'); }
.ac-icon-close { --ac-icon: url('../images/close-icon.svg'); }

:is(a, button)[class*="ac-icon-"]::before,
[class*="ac-icon-"] a::before {
	content: '';
	flex-shrink: 0;
	width: 1.1em;
	height: 1.1em;
	background-color: currentColor;
	-webkit-mask: var(--ac-icon) no-repeat center / contain;
	mask: var(--ac-icon) no-repeat center / contain;
}


/* =========================================================
   3. BADGES AND TEXT
   ========================================================= */

/* Badges: ac-badge + ac-badge-verified | ac-badge-report, optionally ac-badge-lg.
   Background images, so multicolored badges keep their colors. */
.ac-badge {
	display: inline-block;
	flex-shrink: 0;
	width: 1.1em;
	height: 1.1em;
	margin-inline: .3em;
	vertical-align: -.15em;
	background: var(--ac-badge) no-repeat center / contain;
}
.ac-badge-lg {
	width: 1.4em;
	height: 1.4em;
}
.ac-badge-verified { --ac-badge: url('../images/verified-badge.webp'); }
.ac-badge-report   { --ac-badge: url('../images/report-badge.png'); }

/* Tooltip: text that appears on hover and keyboard focus, e.g. "Made in Europe" in a footer.
   <span class="ac-tooltip" tabindex="0">Made in Europe<span class="ac-tooltip-text" role="tooltip">Developed from Italy 🇮🇹 and Sweden 🇸🇪</span></span>
   The tooltip text is part of the element, so screen readers read it too. Centred above the text by default;
   ac-tooltip-below shows it under the text (near the top of a page), ac-tooltip-left opens it to the left, aligned
   with the end of the text (near the right edge, e.g. in a footer). Keep tooltips short – they stay on one line. */
.ac-tooltip {
	position: relative;
	font-size: var(--wp--preset--font-size--small);
	cursor: help;
	text-decoration: underline dotted;
	text-underline-offset: .2em;
}
.ac-tooltip-text {
	position: absolute;
	bottom: calc(100% + .5em);
	left: 50%;
	z-index: 100;
	width: max-content;
	padding: .4em .75em;
	border-radius: 4px;
	background: var(--wp--preset--color--main);
	color: var(--wp--preset--color--base);
	font-size: .85em; /* relative to the text, so always smaller than it */
	line-height: 1.4;
	text-align: center;
	white-space: nowrap;
	opacity: 0;
	visibility: hidden;
	translate: -50% .25em;
	transition: opacity .15s ease, translate .15s ease, visibility .15s;
	pointer-events: none;
}
.ac-tooltip-below .ac-tooltip-text {
	top: calc(100% + .5em);
	bottom: auto;
	translate: -50% -.25em;
}
.ac-tooltip-left .ac-tooltip-text {
	right: 0;
	left: auto;
	translate: 0 .25em;
}
.ac-tooltip:hover .ac-tooltip-text,
.ac-tooltip:focus-visible .ac-tooltip-text {
	opacity: 1;
	visibility: visible;
	translate: -50% 0;
}
.ac-tooltip-left:hover .ac-tooltip-text,
.ac-tooltip-left:focus-visible .ac-tooltip-text {
	translate: 0 0;
}
@media (prefers-reduced-motion: reduce) {
	.ac-tooltip-text {
		transition: none;
	}
}

/* Spread: first item left, last item right */
.ac-spread {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: .5em;
	width: 100%;
}

/* Side by side: items stacked on mobile, in equal columns from 782px (WordPress' Columns breakpoint).
   E.g. a selfie and an ID photo to compare. Works with <img> or <figure> children.
   Dark brand panel; images open in the lightbox (section 3b). */
.ac-side-by-side {
	display: grid;
	gap: 1rem;
	align-items: start;
	width: 100%; /* also in shrink-to-fit parents (flex items, table cells) */
	box-sizing: border-box;
	padding: var(--wp--preset--spacing--small, 1rem);
	border-radius: 4px;
	background: var(--wp--preset--color--primary-alt-accent);
}
@media (min-width: 782px) {
	.ac-side-by-side {
		/* Two columns by default; for three: style="--ac-columns: 3" on the wrapper */
		grid-template-columns: repeat(var(--ac-columns, 2), minmax(0, 1fr));
	}
}
/* Automatic paragraphs (wpautop, e.g. in GravityView custom content) add <p> and <br> around the items:
   paragraphs give their children to the grid, line breaks are hidden */
.ac-side-by-side > p {
	display: contents;
}
.ac-side-by-side br {
	display: none;
}
.ac-side-by-side > figure {
	min-width: 0;
	margin: 0;
}
.ac-side-by-side img {
	display: block;
	width: 100%;
	max-width: 100%;
	height: auto;
	border-radius: 4px;
}
.ac-side-by-side figcaption {
	margin-top: .35em;
	color: var(--wp--preset--color--base); /* light text on the dark panel */
	font-size: var(--wp--preset--font-size--x-small);
}


/* =========================================================
   3b. LIGHTBOX
   Images in ac-side-by-side, and images with (or inside an element with) the class ac-lightbox,
   open enlarged on click. Uses the browser's <dialog>; script in assets/applicore.js.
   ========================================================= */
.ac-side-by-side img,
.ac-lightbox img,
img.ac-lightbox {
	cursor: zoom-in;
}

.ac-lightbox-dialog {
	max-width: 95vw;
	max-height: 95vh;
	padding: 0;
	overflow: visible;
	border: 0;
	background: transparent;
}
.ac-lightbox-dialog::backdrop {
	background: rgb(0 0 0 / .85);
}
.ac-lightbox-dialog img {
	display: block;
	width: auto;
	max-width: 95vw;
	height: auto;
	max-height: 88vh;
	border-radius: 4px;
	cursor: zoom-out;
}
.ac-lightbox-dialog figcaption {
	margin-top: .5rem;
	color: #fff;
	font-size: .9em;
	text-align: center;
}
.ac-lightbox-close {
	position: absolute;
	top: -2.75rem;
	right: 0;
	padding: .25rem .5rem;
	border: 0;
	background: none;
	color: #fff;
	font-size: 2rem;
	line-height: 1;
	cursor: pointer;
}

/* Meta line, e.g. "Created by …" */
.ac-meta {
	margin: 0 0 5px !important;
	font-weight: 600;
}

/* Link that turns red on hover, e.g. delete links */
a.ac-link-danger,
.ac-link-danger a {
	text-decoration: none;
}
a.ac-link-danger:hover,
.ac-link-danger a:hover {
	color: var(--ac-danger) !important;
}


/* Welcome box ([applicore_welcome]): avatar with a ring in the brand colour, greeting, and today's date.
   Text inherits the surrounding colour, so it works on light and dark backgrounds. */
.ac-welcome {
	display: flex;
	align-items: center;
	gap: 1rem;
}
.ac-welcome-avatar {
	flex-shrink: 0;
	width: 4rem;
	height: 4rem;
	border-radius: 50%;
	outline: 2px solid var(--ac-accent, currentColor);
	outline-offset: 3px;
	object-fit: cover;
}
.ac-welcome-body {
	min-width: 0;
}
.ac-welcome-text {
	margin: 0;
	font-size: 1.25em;
	line-height: 1.3;
}
.ac-welcome-text strong {
	font-weight: 600;
}
.ac-welcome-date {
	margin: .2rem 0 0;
	color: color-mix(in srgb, currentColor 65%, transparent);
	font-size: .85em;
}
.ac-welcome-date::first-letter {
	text-transform: uppercase; /* "måndag" → "Måndag" */
}


/* =========================================================
   4. GRAVITYVIEW – VANTAGE TOKENS
   ========================================================= */
.gv-themed.gv-theme-vantage {
	/* Accent (Vantage's default blue) */
	--gv-color-primary:       var(--ac-accent);

	/* Surfaces and borders */
	--gv-color-surface-alt:   var(--wp--preset--color--primary-accent); /* row hover */
	--gv-color-border:        var(--wp--preset--color--border-dark);
	--gv-widget-border-color: var(--wp--preset--color--border-light);
	--gv-color-row-divider:   var(--wp--preset--color--main-accent);
	--gv-entry-border-color:  var(--wp--preset--color--primary-accent); /* entry outline (e.g. table rows) */
	--gv-border-width-2:      4px;

	/* Table header */
	--gv-color-header-bg:     var(--wp--preset--color--primary-accent);
	--gv-color-header-text:   var(--wp--preset--color--main);

	/* Buttons (colors only: Vantage uses them in background-color) */
	--gv-button-bg:           var(--ac-btn-bg);
	--gv-button-color:        var(--ac-btn-text);
	--gv-button-bg-hover:     var(--ac-btn-bg-hover);

	/* Font sizes: Vantage's steps follow the theme's presets (Site Editor → Styles → Typography), so headings in a
	   View match the same headings elsewhere. Vantage: 2xl h1, xl h2, lg h3, md h4, base text. */
	--gv-font-size-2xl:   var(--wp--preset--font-size--x-large);
	--gv-font-size-xl:    var(--wp--preset--font-size--large);
	--gv-font-size-lg:    var(--wp--preset--font-size--medium);
	--gv-font-size-md:    var(--wp--preset--font-size--base); /* like Ollie's h4 */
	--gv-font-size-base:  var(--wp--preset--font-size--base);
	--gv-font-size-sm:    var(--wp--preset--font-size--small);
	--gv-font-size-xs:    var(--wp--preset--font-size--x-small);
	--gv-button-font-size: var(--ac-btn-font-size);

	/* Table headers and single entry labels */
	--gv-field-label-font-size:      var(--wp--preset--font-size--x-small);
	--gv-field-label-font-weight:    400;
	--gv-field-label-letter-spacing: 0;
	--gv-field-label-color:          var(--wp--preset--color--main);
}

/* Multiple entries table: cell text in the small preset (cells use --gv-font-size-base, which is base elsewhere).
   Set on the table, so it only applies inside it; single entry views keep base. */
.gv-themed.gv-theme-vantage table.gv-table-view {
	--gv-font-size-base: var(--wp--preset--font-size--small);
}

/* Search button hover: Vantage's hover doesn't read --gv-button-bg-hover */
.gv-themed .gv-widget-search.gv-widget-search .gv-search-box-submit .gv-search-button:hover {
	background-color: var(--ac-btn-bg-hover);
}


/* =========================================================
   5. GRAVITYVIEW – TABLES AND VIEWS
   ========================================================= */

/* Editable cells (GravityEdit): brand tint layered over the row background, so hover still shows */
.gv-themed table.gv-table-view td:has(.editable),
.gv-themed table.gv-table-view-content td:has(.editable) {
	--ac-editable-tint: color-mix(in srgb, var(--ac-accent) 6%, transparent);
	background-image: linear-gradient(var(--ac-editable-tint), var(--ac-editable-tint)) !important;
}

/* Approval status: disapproved in red with an X */
.gv-approval-disapproved {
	color: var(--ac-danger);
}
.gv-approval-disapproved::before {
	content: '';
	display: inline-block;
	width: 1.2em;
	height: 1.2em;
	margin-right: .2em;
	vertical-align: -.25em;
	background-color: currentColor;
	-webkit-mask: url('../images/close-icon.svg') no-repeat center / contain;
	mask: url('../images/close-icon.svg') no-repeat center / contain;
}

/* GravityEdit: inline edit toggle as a ghost button; dashed and red while editing is on */
.inline-edit-enable {
	padding: var(--ac-btn-padding);
	border-radius: var(--ac-btn-radius);
	text-decoration: none !important;
	transition: .2s;
}
.gv-inline-edit-off .inline-edit-enable {
	border: var(--ac-ghost-border-width) solid var(--ac-ghost-border);
	color: var(--ac-ghost-text) !important;
}
.gv-inline-edit-off .inline-edit-enable:hover {
	border-color: var(--ac-ghost-border-hover);
	color: var(--ac-ghost-text-hover) !important;
}
.gv-inline-edit-on .inline-edit-enable {
	border: 1px dashed var(--ac-ghost-border-hover);
	color: var(--ac-danger) !important;
	font-style: italic !important;
}

/* Layout Builder: no divider line and no space above – keeps a field close to the one above it */
.ac-gvbuilder-close-top {
	border-top: 0 !important;
	margin-top: 0 !important;
	padding-top: 0 !important;
}

/* List field without the list: GravityView shows a Gravity Forms field with several values (e.g. a List field) as a
   bulleted list. "ac-list-inline" in the field's Custom CSS class shows it inline instead. Added by hand. */
.ac-list-inline ul.bulleted {
	display: inline;
}

/* Card list: "ac-cards" as the View's custom CSS class (DIY layout) */
.ac-cards .gv-diy-view {
	margin-bottom: 10px;
	padding: 15px;
	border: 1px solid var(--wp--preset--color--border-light);
	background: var(--wp--preset--color--base);
}


/* =========================================================
   6. GRAVITYVIEW – EDIT ENTRY
   ========================================================= */
h2.gv-edit-entry-title {
	display: none;
}

/* Upload preview controls */
.gv-edit-entry-wrapper .ginput_preview_control {
	bottom: .21rem;
	left: .5rem;
}


/* =========================================================
   7. GRAVITYVIEW – NOTES
   ========================================================= */

/* Empty notes box */
.gv-themed .gv-notes.gv-no-notes.gv-show-notes {
	padding: 1em;
	background: var(--wp--preset--color--tertiary);
}

/* Notes list */
.gv-show-notes.gv-has-notes form.gv-notes-list div table {
	border-collapse: separate;
	border-spacing: 0 10px; /* vertical space between notes */
}
.gv-notes-list div table tbody tr.gv-note th.check-column,
.gv-notes-list div table thead tr th {
	width: 30px !important;
	background: var(--wp--preset--color--tertiary);
	text-align: left;
}
.gv-show-notes.gv-has-notes form.gv-notes-list div table tbody tr.gv-note td.entry-detail-note {
	border: 1px solid var(--wp--preset--color--border-light);
}

/* Header: select-all toggle and delete button */
.gv-notes-list thead tr th label:has(.gv-notes-toggle) {
	display: inline !important;
}
.gv-notes-list thead tr th label .gv-notes-toggle {
	margin-left: 12px;
}
.gv-notes-list thead tr th button.button.button-small.gv-notes-delete {
	margin-left: 10px;
	border-color: var(--wp--preset--color--base);
	background-color: var(--ac-danger);
	color: var(--wp--preset--color--base);
}

/* Avatar: circle until an image loads */
.gv-note-avatar {
	display: flex;
	justify-content: center;
	align-items: center;
	width: 50px;
	height: 50px;
	overflow: hidden;
	border: .5px solid var(--wp--preset--color--border-dark);
	border-radius: 50%;
	background: var(--wp--preset--color--tertiary);
}
.gv-note-avatar:has(img) {
	background: none;
}
.gv-note-avatar img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* Add note */
.gv-notes .gv-note-add textarea:focus {
	border-color: var(--wp--preset--color--border-dark);
}
.gv-notes .gv-note-email-to {
	margin-bottom: 10px;
}
.gv-themed .gv-note-add .gv-note-to-container {
	background-color: var(--wp--preset--color--tertiary) !important;
}


/* =========================================================
   8. GRAVITY FORMS – GENERAL
   ========================================================= */

/* Font sizes follow the theme's presets (Site Editor → Styles → Typography), like the colors.
   Orbital prints these per form with the form's ID (very specific), hence !important – only on the variables.
   Inputs (and their placeholders) at 16px or more also keep iPhones from zooming in on the form.
   Variable names and roles checked against Gravity Forms' Orbital CSS, 2026-10-23. */
.gform-theme--framework {
	--gf-ctrl-label-font-size-primary:   var(--wp--preset--font-size--small) !important;   /* field labels */
	--gf-ctrl-label-font-size-secondary: var(--wp--preset--font-size--small) !important;   /* choice labels */
	--gf-ctrl-label-font-size-tertiary:  var(--wp--preset--font-size--x-small) !important; /* sub-labels */
	--gf-ctrl-label-font-size-quaternary: var(--wp--preset--font-size--small) !important; /* other labels (same size as field labels in Orbital) */
	--gf-ctrl-desc-font-size:            var(--wp--preset--font-size--x-small) !important; /* descriptions */
	--gf-ctrl-font-size:                 var(--wp--preset--font-size--small) !important;   /* inputs */

	/* Buttons: one size for all of them, including Orbital's size variants and the file upload button */
	--gf-ctrl-btn-font-size:             var(--ac-btn-font-size) !important;
	--gf-ctrl-btn-font-size-xs:          var(--ac-btn-font-size) !important;
	--gf-ctrl-btn-font-size-sm:          var(--ac-btn-font-size) !important;
	--gf-ctrl-btn-font-size-md:          var(--ac-btn-font-size) !important;
	--gf-ctrl-btn-font-size-lg:          var(--ac-btn-font-size) !important;
	--gf-ctrl-btn-font-size-xl:          var(--ac-btn-font-size) !important;
	--gf-ctrl-file-btn-font-size:        var(--ac-btn-font-size) !important;
}

/* Hide "* indicates required fields" */
.gform_required_legend {
	display: none;
}

/* Inputs: the theme's small size (see the variables above), but never under 16px – smaller makes iPhones zoom in */
body .gform_wrapper .gform_body input,
body .gform_wrapper .gform_body select,
body .gform_wrapper .gform_body textarea {
	font-size: max(16px, var(--wp--preset--font-size--small, 1rem)) !important;
}

/* Read-only fields */
.gform_wrapper input[readonly] {
	border-color: var(--gf-ctrl-border-color-disabled);
	background-color: var(--gf-ctrl-bg-color-disabled);
	color: var(--gf-ctrl-color-disabled);
	opacity: .5;
	cursor: not-allowed;
}

/* Validation messages */
.gfield_description.gfield_validation_message {
	margin-top: 5px;
	padding-top: 3px;
	padding-bottom: 3px;
	padding-left: 5px;
	border-radius: 4px;
	background: var(--ac-danger);
	color: #fff !important;
	font-size: .8em;
}

/* File uploads: previews in a row */
.gform-theme--framework .gfield:where(.gfield--type-fileupload, .gfield--input-type-fileupload) .ginput_preview {
	flex-direction: row;
	padding-top: .8em;
}


/* =========================================================
   9. GRAVITY FORMS – FIELD CLASSES
   Field → Appearance → Custom CSS Class
   ========================================================= */

/* Framed field, e.g. to make an upload field stand out */
.gfield.ac-field-framed {
	padding: 10px;
	border: 1px solid var(--wp--preset--color--primary-alt);
	border-radius: 4px;
	background-color: var(--wp--preset--color--base);
}

/* Hide the instruction under the field, e.g. an allowed number range */
.gfield.ac-hide-instruction [id^="gfield_instruction_"] {
	display: none;
}

/* Description in normal text size */
.gfield.ac-description-lg .gfield_description {
	font-size: 1em;
}

/* File upload: hide the rules text and per-file messages (applicants then get no explanation when an upload fails) */
.gfield.ac-upload-quiet .gform_fileupload_rules,
.gfield.ac-upload-quiet [id^="gform_multifile_messages_"] .gfield_validation_message {
	display: none !important;
}


/* =========================================================
   10. GRAVITY PERKS
   ========================================================= */

/* Multi-Page Navigation: linked steps */
.gf_step.gpmpn-step-linked {
	padding-right: 8px;
}
.gf_step.gpmpn-step-linked:hover {
	border-radius: 30px;
	background-color: var(--wp--preset--color--primary-accent);
}

/* Advanced Save & Continue: drafts list ([gpasc_drafts]) and auto-load notice */
#gpasc-auto-load-notice {
	padding: 20px;
	border: 1px solid var(--ac-danger);
	border-radius: 6px;
	background-color: var(--wp--preset--color--base);
}
.gpasc-drafts {
	padding: 22px;
	background-color: var(--wp--preset--color--base);
}
.gpasc-draft-link a {
	text-decoration: none !important;
}
.gpasc-delete-draft-button {
	position: relative;
	top: 4px;
	left: 6px;
	padding: 2px 0 0;
	background: transparent !important;
	color: var(--wp--preset--color--secondary);
}
.gpasc-delete-draft-button:hover {
	color: var(--ac-danger) !important;
}

/* Bookings: managing a booking (booking management page). The card is built with WordPress components; scoping to
   #gpb-booking-management outranks their styles without !important. Their buttons draw the outline with an inset
   box-shadow, not a border.
   Buttons in the two action rows only (the rescheduling calendar may use the same button class for its days):
   - booking:     Reschedule like ac-btn; Cancel red outline, solid red on hover
   - rescheduling: Save new time like ac-btn; Keep current time as an outline button */
#gpb-booking-management .gpb-manage-booking.components-card {
	background: var(--wp--preset--color--tertiary);
	color: var(--wp--preset--color--main);
}
#gpb-booking-management .gpb-manage-booking-header h3 {
	color: var(--wp--preset--color--main);
}

/* Text: theme sizes instead of the fixed 13–14px admin sizes; status and times in the muted colour */
#gpb-booking-management .gpb-manage-booking-customer {
	font-size: var(--wp--preset--font-size--medium, 1.1rem);
}
#gpb-booking-management .gpb-manage-booking-status,
#gpb-booking-management .gpb-manage-booking-times {
	color: var(--wp--preset--color--secondary);
	font-size: var(--wp--preset--font-size--small, 1rem);
}

/* All action buttons: size and shape of the site's buttons (WordPress buttons are 13px and a fixed 36px high) */
#gpb-booking-management .gpb-manage-booking-actions .components-button,
#gpb-booking-management .gpb-manage-booking-reschedule-actions .components-button {
	height: auto;
	padding: var(--ac-btn-padding);
	border: 0;
	border-radius: var(--ac-btn-radius);
	box-shadow: none;
	font-size: var(--ac-btn-font-size);
	line-height: 1.2;
	transition: background-color .2s ease, color .2s ease, box-shadow .2s ease;
}
#gpb-booking-management .gpb-manage-booking-actions .components-button:focus-visible,
#gpb-booking-management .gpb-manage-booking-reschedule-actions .components-button:focus-visible {
	outline: 2px solid var(--ac-accent);
	outline-offset: 2px;
}
#gpb-booking-management .gpb-manage-booking-reschedule-actions .components-button:disabled {
	opacity: .5;
	cursor: not-allowed;
}

/* Solid (like ac-btn): Reschedule, Save new time */
#gpb-booking-management .gpb-manage-booking-actions .components-button.is-secondary:not(.is-destructive),
#gpb-booking-management .gpb-manage-booking-reschedule-actions .components-button.is-primary {
	background-color: var(--ac-btn-bg);
	color: var(--ac-btn-text);
}
#gpb-booking-management .gpb-manage-booking-actions .components-button.is-secondary:not(.is-destructive):hover,
#gpb-booking-management .gpb-manage-booking-reschedule-actions .components-button.is-primary:hover:not(:disabled) {
	background-color: var(--ac-btn-bg-hover);
	color: var(--ac-btn-text);
}

/* Outline (like ac-btn-ghost): Keep current time */
#gpb-booking-management .gpb-manage-booking-reschedule-actions .components-button.is-secondary {
	box-shadow: inset 0 0 0 var(--ac-ghost-border-width) var(--ac-ghost-border);
	background-color: transparent;
	color: var(--ac-ghost-text);
}
#gpb-booking-management .gpb-manage-booking-reschedule-actions .components-button.is-secondary:hover:not(:disabled) {
	box-shadow: inset 0 0 0 var(--ac-ghost-border-width) var(--ac-ghost-border-hover);
	color: var(--ac-ghost-text-hover);
}

/* Red: Cancel */
#gpb-booking-management .gpb-manage-booking-actions .components-button.is-destructive {
	box-shadow: inset 0 0 0 1px var(--ac-danger);
	background-color: transparent;
	color: var(--ac-danger);
}
#gpb-booking-management .gpb-manage-booking-actions .components-button.is-destructive:hover {
	background-color: var(--ac-danger);
	color: var(--wp--preset--color--base);
}

/* Bookings time picker (booking forms and rescheduling). Classes doubled to outrank GP Bookings' own rules. */
/* "Back" link: 0.9rem is too small */
.gpb-booking-time-picker__back.gpb-booking-time-picker__back {
	font-size: 1.1rem;
}
/* Duration: the dropdown right after its label, instead of label left and dropdown far right */
.gpb-booking-time-picker__duration-picker.gpb-booking-time-picker__duration-picker {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: flex-start;
	gap: .5em .75em;
}
.gpb-booking-time-picker__duration-picker.gpb-booking-time-picker__duration-picker > * {
	float: none;
	width: auto;
	max-width: 100%;
	margin: 0;
}


/* =========================================================
   11. WORDPRESS
   ========================================================= */

/* Admin email confirmation screen (wp-login.php) */
.admin-email-confirm-form {
	background-color: transparent !important;
}

/* Square checkboxes: Ollie styles every input except submit and radio like a text field, so checkboxes get
   .5em 1em padding and turn rectangular (e.g. in GravityView). The extra :not()s outrank Ollie's selector. */
input[type="checkbox"]:not([type="submit"]):not([type="radio"]) {
	padding: 0;
}


/* =========================================================
   12. NAVIGATION – slide-in underline
   Applies to all Navigation blocks: a line slides in under the label on hover and keyboard focus,
   and stays under the current page.
   ========================================================= */
.wp-block-navigation .wp-block-navigation-item__label {
	position: relative;
	display: inline-block;
}
.wp-block-navigation .wp-block-navigation-item__label::after {
	content: "";
	position: absolute;
	left: 0;
	bottom: -2px; /* distance below the text */
	width: 100%;
	height: 2px;
	background: currentColor;
	transform: scaleX(0);
	transform-origin: left center;
	transition: transform .2s ease-in-out;
	pointer-events: none;
}

/* Show on hover, keyboard focus, and for the current page */
.wp-block-navigation .wp-block-navigation-item__content:hover .wp-block-navigation-item__label::after,
.wp-block-navigation .wp-block-navigation-item__content:focus-visible .wp-block-navigation-item__label::after,
.wp-block-navigation .wp-block-navigation-item__content[aria-current="page"] .wp-block-navigation-item__label::after {
	transform: scaleX(1);
}

/* Remove WordPress's default hover underline so the lines don't double up */
.wp-block-navigation .wp-block-navigation-item__content[aria-current="page"],
.wp-block-navigation .wp-block-navigation-item__content:hover {
	text-decoration: none !important;
}

/* No animation for users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
	.wp-block-navigation .wp-block-navigation-item__label::after {
		transition: none;
	}
}


/* =========================================================
   13. NAVIGATION – dropdowns
   ========================================================= */

/* A faint shadow instead of WordPress's border */
.wp-block-navigation:not(.has-background) .wp-block-navigation__submenu-container {
	border: 0;
	box-shadow: 0 4px 16px rgb(0 0 0 / .08), 0 1px 3px rgb(0 0 0 / .06);
}

/* As wide as the longest item instead of WordPress's 200px, so items don't wrap onto two lines. Only on WordPress's
   "open" states (a closed dropdown is hidden with width: 0), and not in the mobile overlay menu (.is-menu-open),
   where dropdowns are a full-width list. Works with and without the overlay. Very long items still wrap at the
   max-width, so the dropdown can't run off the screen. Tested on MB (open on click), 2026-10-22. */
.wp-block-navigation .has-child:not(.is-menu-open *):not(.open-on-click):hover > .wp-block-navigation__submenu-container,
.wp-block-navigation .has-child:not(.is-menu-open *):not(.open-on-click):not(.open-on-hover-click):focus-within > .wp-block-navigation__submenu-container,
.wp-block-navigation .has-child:not(.is-menu-open *) .wp-block-navigation-submenu__toggle[aria-expanded="true"] ~ .wp-block-navigation__submenu-container {
	width: max-content;
	max-width: min(24rem, calc(100vw - 2rem));
}
