/* Booking form front end. Colours: Rogaland Assistanse navy #1d295b, orange #f26729. */

:root {
	--rogass-navy: #1d295b;
	--rogass-navy-dark: #141d42;
	--rogass-orange: #f26729;
	--rogass-ink: #303133;
	--rogass-muted: #5f6368;
	--rogass-line: #dddddd;
	--rogass-surface: #f7f7f7;
	--rogass-radius: 12px;
	--rogass-field: #eef1f7;
}

/* WPForms' default blue (#066aab) → the navy: "Neste", "Send bestilling", the progress bar,
   field focus borders, checked boxes and dropdowns in this form. */
.rogass-booking-form {
	--wpforms-button-background-color: var(--rogass-navy);
	--wpforms-button-border-color: var(--rogass-navy);
	--wpforms-page-break-color: var(--rogass-navy);
	/* Filled fields with rounder corners and a 2px border that only shows on focus (Jørgen, 2026-11-06). */
	--wpforms-field-background-color: var(--rogass-field);
	--wpforms-field-border-color: transparent;
	--wpforms-field-border-size: 2px;
	--wpforms-field-border-radius: var(--rogass-radius);
	--wpforms-field-size-input-height: 58px;
	--wpforms-field-size-padding-h: 16px;
	--wpforms-button-border-radius: var(--rogass-radius);
}

/* One field width: every field fills the form, unless two share a row (date and time). */
.rogass-booking-form .wpforms-field input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
.rogass-booking-form .wpforms-field select,
.rogass-booking-form .wpforms-field textarea,
.rogass-booking-form .wpforms-field .wpforms-field-row,
.rogass-booking-form .wpforms-field .iti {
	width: 100% !important;
	max-width: 100% !important;
}

/* Focus: the 2px navy border only. WPForms adds a 1px shadow on top. */
div.wpforms-container-full.rogass-booking-form .wpforms-form input:focus,
div.wpforms-container-full.rogass-booking-form .wpforms-form select:focus,
div.wpforms-container-full.rogass-booking-form .wpforms-form textarea:focus {
	box-shadow: none !important;
}

/*
 * Labels inside the fields (frontend.js adds .rogass-float). The label is still the field's
 * <label>; it sits large inside an empty field and moves to the top once the field has a
 * value or focus. Selects always have a value.
 */
.rogass-booking-form .rogass-float {
	position: relative;
	padding-top: 0 !important;
	padding-bottom: 0 !important;
	margin-top: 12px !important;
}

/* The theme's select arrow is a faint 5px image: a navy chevron instead. */
div.wpforms-container-full.rogass-booking-form .wpforms-form .rogass-float select {
	-webkit-appearance: none !important;
	appearance: none !important;
	padding-right: 44px !important;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5' fill='none' stroke='%231d295b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
	background-repeat: no-repeat !important;
	background-position: right 18px center !important;
	background-size: 12px 8px !important;
}

.rogass-booking-form .rogass-float > .wpforms-field-label,
.rogass-booking-form .rogass-float > .wpforms-field-sublabel {
	position: absolute !important;
	z-index: 2;
	top: 19px;
	left: 18px;
	right: 18px;
	margin: 0 !important;
	padding: 0 !important;
	font-size: 16px !important;
	font-weight: 400 !important;
	line-height: 20px !important;
	color: var(--rogass-muted) !important;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	pointer-events: none;
	transition: top 0.15s ease, font-size 0.15s ease, line-height 0.15s ease;
}

.rogass-booking-form .rogass-float.rogass-filled > .wpforms-field-label,
.rogass-booking-form .rogass-float.rogass-filled > .wpforms-field-sublabel,
.rogass-booking-form .rogass-float:focus-within > .wpforms-field-label,
.rogass-booking-form .rogass-float:focus-within > .wpforms-field-sublabel,
.rogass-booking-form .rogass-float--select > .wpforms-field-label {
	top: 8px;
	font-size: 12px !important;
	line-height: 16px !important;
}

@media (prefers-reduced-motion: reduce) {
	.rogass-booking-form .rogass-float > .wpforms-field-label,
	.rogass-booking-form .rogass-float > .wpforms-field-sublabel {
		transition: none;
	}
}

.rogass-booking-form .rogass-float input,
.rogass-booking-form .rogass-float select {
	height: 58px !important;
	padding-top: 22px !important;
	padding-bottom: 4px !important;
}

.rogass-booking-form .rogass-float textarea {
	min-height: 120px !important;
	padding-top: 28px !important;
	padding-bottom: 10px !important;
}

/* Date and time share a row with a 12px gap (WPForms pads the second one instead). */
.rogass-booking-form .wpforms-field-date-time .wpforms-field-row {
	display: grid !important;
	grid-template-columns: 1fr 1fr;
	gap: 12px;
}

.rogass-booking-form .wpforms-field-date-time .wpforms-field-row::before,
.rogass-booking-form .wpforms-field-date-time .wpforms-field-row::after {
	display: none !important;
}

.rogass-booking-form .wpforms-field-date-time .wpforms-field-row-block {
	float: none !important;
	width: auto !important;
	margin: 0 !important;
	padding: 0 !important;
}

.rogass-booking-form .wpforms-field-date-time > .wpforms-field-label {
	margin-bottom: 0 !important;
}

/* The calendar and the time list open inside the field's box (frontend.js), above the next fields. */
.rogass-booking-form .wpforms-field-date-time .flatpickr-wrapper {
	display: block;
	width: 100%;
}

/* WPForms' reset (div.wpforms-container-full *) strips the calendar's own styles inside the form: restore them. */
div.wpforms-container-full.rogass-booking-form .flatpickr-calendar,
div.wpforms-container-full.rogass-booking-form .ui-timepicker-wrapper {
	position: absolute !important;
	z-index: 20 !important;
	margin-top: 6px !important;
	padding: 8px !important;
	border: 0 !important;
	border-radius: var(--rogass-radius) !important;
	background: #ffffff !important;
	box-shadow: 0 10px 32px rgba(20, 29, 66, 0.22) !important;
}

div.wpforms-container-full.rogass-booking-form .flatpickr-calendar .flatpickr-months,
div.wpforms-container-full.rogass-booking-form .flatpickr-calendar .flatpickr-weekdays {
	background: #ffffff !important;
}

/* The month list and year box sit inside the date field's box: undo the field styles on them. */
div.wpforms-container-full.rogass-booking-form .flatpickr-calendar select.flatpickr-monthDropdown-months,
div.wpforms-container-full.rogass-booking-form .flatpickr-calendar input.cur-year {
	display: inline-block !important;
	width: auto !important;
	max-width: none !important;
	height: auto !important;
	min-height: 0 !important;
	min-width: 0 !important;
	flex: 0 0 auto;
	margin: 0 !important;
	padding: 2px 4px !important;
	border: 0 !important;
	border-radius: 6px !important;
	background: transparent !important;
	box-shadow: none !important;
	font-size: 16px !important;
	font-weight: 600 !important;
	line-height: 1.2 !important;
	color: var(--rogass-ink) !important;
}

div.wpforms-container-full.rogass-booking-form .flatpickr-calendar input.cur-year {
	width: 5ch !important;
}

div.wpforms-container-full.rogass-booking-form .flatpickr-calendar .flatpickr-current-month {
	position: absolute !important;
	left: 12.5% !important;
	width: 75% !important;
	height: 34px !important;
	padding: 0 !important;
	display: flex !important;
	align-items: center;
	justify-content: center;
	gap: 2px;
	white-space: nowrap;
}

div.wpforms-container-full.rogass-booking-form .flatpickr-calendar .flatpickr-current-month .numInputWrapper {
	width: auto !important;
}

div.wpforms-container-full.rogass-booking-form .flatpickr-calendar select.flatpickr-monthDropdown-months:hover {
	background: var(--rogass-field) !important;
}

div.wpforms-container-full.rogass-booking-form .flatpickr-calendar .flatpickr-prev-month svg,
div.wpforms-container-full.rogass-booking-form .flatpickr-calendar .flatpickr-next-month svg {
	fill: var(--rogass-navy) !important;
}

div.wpforms-container-full.rogass-booking-form .flatpickr-calendar .flatpickr-day {
	border: 1px solid transparent !important;
	border-radius: 999px !important;
	color: var(--rogass-ink) !important;
}

div.wpforms-container-full.rogass-booking-form .flatpickr-calendar .flatpickr-day:hover,
div.wpforms-container-full.rogass-booking-form .flatpickr-calendar .flatpickr-day:focus {
	background: var(--rogass-field) !important;
}

div.wpforms-container-full.rogass-booking-form .flatpickr-calendar .flatpickr-day.today {
	border-color: var(--rogass-navy) !important;
}

div.wpforms-container-full.rogass-booking-form .flatpickr-calendar .flatpickr-day.selected {
	border-color: var(--rogass-navy) !important;
	background: var(--rogass-navy) !important;
	color: #ffffff !important;
}

div.wpforms-container-full.rogass-booking-form .flatpickr-calendar .flatpickr-day.flatpickr-disabled,
div.wpforms-container-full.rogass-booking-form .flatpickr-calendar .flatpickr-day.prevMonthDay,
div.wpforms-container-full.rogass-booking-form .flatpickr-calendar .flatpickr-day.nextMonthDay {
	color: rgba(48, 49, 51, 0.35) !important;
	background: transparent !important;
}

div.wpforms-container-full.rogass-booking-form .ui-timepicker-wrapper {
	left: 0 !important;
	width: 100% !important;
	max-height: 240px;
	overflow-y: auto;
}

div.wpforms-container-full.rogass-booking-form .ui-timepicker-wrapper li {
	margin: 0 !important;
	padding: 6px 12px !important;
	font-size: 16px !important;
	line-height: 1.4 !important;
	border-radius: 8px !important;
	cursor: pointer;
}

div.wpforms-container-full.rogass-booking-form .ui-timepicker-wrapper li:hover,
div.wpforms-container-full.rogass-booking-form .ui-timepicker-wrapper li.ui-timepicker-selected {
	background: var(--rogass-navy) !important;
	color: #ffffff !important;
}

/* The phone field starts with the country flag. */
.rogass-booking-form .rogass-float.rogass-phone > .wpforms-field-label {
	left: 58px;
}

/* Placeholders only while the field has focus, so they never sit under the label. */
.rogass-booking-form .rogass-float:not(:focus-within) input::placeholder {
	color: transparent !important;
}

/* Checkboxes keep a visible edge (the field border colour is transparent). */
div.wpforms-container-full.rogass-booking-form .wpforms-form input[type="checkbox"]::before {
	border-color: var(--rogass-muted) !important;
	background-color: #ffffff !important;
	border-radius: 4px !important;
}

div.wpforms-container-full.rogass-booking-form .wpforms-form input[type="checkbox"]:checked::before {
	border-color: var(--rogass-navy) !important;
	background-color: var(--rogass-navy) !important;
}

div.wpforms-container-full.rogass-booking-form .wpforms-form input[type="checkbox"]:focus-visible::before {
	outline: 2px solid var(--rogass-orange);
	outline-offset: 2px;
	box-shadow: none !important;
}

/* Service cards: icon and name inside a rounded card. Selected: 2px navy border. */
div.wpforms-container-full.rogass-booking-form .rogass-service ul.wpforms-icon-choices {
	display: grid !important;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 12px !important;
	margin: 0 !important;
	padding: 0 !important;
}

div.wpforms-container-full.rogass-booking-form .rogass-service ul.wpforms-icon-choices li.wpforms-icon-choices-item {
	width: auto !important;
	margin: 0 !important;
	padding: 0 !important;
}

div.wpforms-container-full.rogass-booking-form .rogass-service ul.wpforms-icon-choices li label {
	display: flex !important;
	flex-direction: column;
	align-items: flex-start;
	gap: 10px;
	box-sizing: border-box;
	height: 100%;
	margin: 0 !important;
	padding: 16px 18px !important;
	border: 2px solid transparent !important;
	border-radius: 16px !important;
	background: var(--rogass-field) !important;
	box-shadow: none !important;
	text-align: left !important;
	cursor: pointer;
	transition: border-color 0.15s ease;
}

div.wpforms-container-full.rogass-booking-form .rogass-service ul.wpforms-icon-choices li label:hover {
	border-color: rgba(29, 41, 91, 0.35) !important;
}

div.wpforms-container-full.rogass-booking-form .rogass-service ul.wpforms-icon-choices li.wpforms-selected label {
	border-color: var(--rogass-navy) !important;
}

div.wpforms-container-full.rogass-booking-form .rogass-service ul.wpforms-icon-choices li label .wpforms-icon-choices-icon {
	display: block !important;
	width: auto !important;
	height: auto !important;
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	border-radius: 0 !important;
	background: none !important;
	box-shadow: none !important;
}

/* No radio circle: the border shows the choice. */
div.wpforms-container-full.rogass-booking-form .rogass-service ul.wpforms-icon-choices li label .wpforms-icon-choices-icon::before,
div.wpforms-container-full.rogass-booking-form .rogass-service ul.wpforms-icon-choices li label .wpforms-icon-choices-icon::after,
div.wpforms-container-full.rogass-booking-form .rogass-service ul.wpforms-icon-choices li label .wpforms-icon-choices-icon-bg {
	display: none !important;
}

div.wpforms-container-full.rogass-booking-form .rogass-service ul.wpforms-icon-choices li label .wpforms-icon-choices-icon svg {
	display: block;
	width: auto !important;
	height: 28px !important;
	margin: 0 !important;
	fill: var(--rogass-navy) !important;
}

div.wpforms-container-full.rogass-booking-form .rogass-service ul.wpforms-icon-choices li label .wpforms-icon-choices-label {
	margin: 0 !important;
	padding: 0 !important;
	font-size: 17px !important;
	font-weight: 700 !important;
	line-height: 1.25 !important;
	color: var(--rogass-ink) !important;
	text-align: left !important;
}

/* The short line under the name (frontend.js). */
div.wpforms-container-full.rogass-booking-form .rogass-service .rogass-service__desc {
	display: block;
	margin: -6px 0 0;
	font-size: 14px;
	line-height: 1.35;
	color: var(--rogass-muted);
	text-align: left;
	-webkit-hyphens: none;
	hyphens: none;
}

/* Keyboard focus only (not on click): a 2px orange ring that follows the card's corners. */
div.wpforms-container-full.rogass-booking-form .rogass-service ul.wpforms-icon-choices li:has(input:focus-visible) label {
	outline: 2px solid var(--rogass-orange) !important;
	outline-offset: 2px !important;
}

@media (max-width: 479px) {
	div.wpforms-container-full.rogass-booking-form .rogass-service ul.wpforms-icon-choices {
		gap: 8px !important;
	}

	/* Phones: the cards stack (WPForms), so each is a compact row with the icon before the name. */
	div.wpforms-container-full.rogass-booking-form .rogass-service ul.wpforms-icon-choices li label {
		flex-direction: row;
		align-items: center;
		gap: 14px;
		padding: 14px 16px !important;
	}

	div.wpforms-container-full.rogass-booking-form .rogass-service ul.wpforms-icon-choices li label .wpforms-icon-choices-icon svg {
		width: 32px !important;
		height: 24px !important;
	}

	/* Name and line stacked beside the icon. */
	div.wpforms-container-full.rogass-booking-form .rogass-service ul.wpforms-icon-choices li label {
		display: grid !important;
		grid-template-columns: 32px 1fr;
		column-gap: 14px;
		row-gap: 2px;
	}

	div.wpforms-container-full.rogass-booking-form .rogass-service ul.wpforms-icon-choices li label .wpforms-icon-choices-icon {
		grid-row: 1 / span 2;
		align-self: center;
	}

	div.wpforms-container-full.rogass-booking-form .rogass-service .rogass-service__desc {
		margin: 0;
	}
}

/* The map: rounded, no grey frame. */
.rogass-booking-form .wpforms-geolocation-map {
	border: 0 !important;
	border-radius: var(--rogass-radius) !important;
	overflow: hidden;
}

/* Vehicle lookup: search button inside the registration field.
   Scoped to .rogass-booking-form so these rules beat WPForms' full-style reset
   (div.wpforms-container-full * and div.wpforms-container-full button). */
.rogass-booking-form .rogass-lookup {
	position: relative;
	display: block;
}

.rogass-booking-form .rogass-lookup input {
	padding-right: 60px !important;
}

.rogass-booking-form .rogass-lookup__button {
	position: absolute;
	top: 7px;
	right: 7px;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 0;
	/* A search icon inside the field, like the other icons in the form. */
	border-radius: 10px;
	background: transparent;
	color: var(--rogass-navy);
	cursor: pointer;
}

.rogass-booking-form .rogass-lookup__button:hover {
	background: rgba(29, 41, 91, 0.1);
}

.rogass-booking-form .rogass-lookup__button:focus-visible {
	outline: 2px solid var(--rogass-orange);
	outline-offset: 2px;
}

.rogass-booking-form .rogass-lookup__button:disabled {
	cursor: progress;
}

.rogass-booking-form .rogass-is-loading .rogass-lookup__button svg {
	animation: rogass-pulse 0.9s ease-in-out infinite;
}

@keyframes rogass-pulse {
	50% {
		opacity: 0.35;
	}
}

@media (prefers-reduced-motion: reduce) {
	.rogass-booking-form .rogass-is-loading .rogass-lookup__button svg {
		animation: none;
	}
}

.rogass-booking-form .rogass-lookup__message {
	margin: 6px 0 0;
	font-size: 15px;
	color: var(--rogass-ink);
}

.rogass-booking-form .rogass-lookup__message:empty {
	display: none;
}

.rogass-booking-form input.rogass-locked {
	background: #e3e7ef !important;
	color: var(--rogass-ink) !important;
}

/* Confirmation dialog: "Er dette riktig kjøretøy?" */
.rogass-confirm {
	width: min(440px, calc(100% - 32px));
	padding: 24px;
	border: 0;
	border-radius: 12px;
	box-shadow: 0 20px 60px rgba(20, 29, 66, 0.35);
	color: var(--rogass-ink);
}

.rogass-confirm::backdrop {
	background: rgba(20, 29, 66, 0.6);
}

.rogass-confirm .rogass-confirm__title {
	margin: 0 0 16px !important;
	font-size: 22px !important;
	line-height: 1.25 !important;
	color: var(--rogass-navy);
}

.rogass-confirm__details {
	display: grid;
	grid-template-columns: max-content 1fr;
	gap: 8px 16px;
	margin: 0 0 24px;
	font-size: 16px;
}

/* The theme gives dt and dd their own margins and line heights. */
.rogass-confirm .rogass-confirm__details dt,
.rogass-confirm .rogass-confirm__details dd {
	margin: 0 !important;
	padding: 0 !important;
	line-height: 1.4 !important;
}

.rogass-confirm .rogass-confirm__details dt {
	font-weight: 600;
}

.rogass-confirm__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	justify-content: flex-end;
}

.rogass-btn {
	min-height: 44px;
	padding: 10px 20px;
	border: 2px solid var(--rogass-navy);
	border-radius: 999px;
	font: inherit;
	font-weight: 600;
	cursor: pointer;
}

.rogass-btn--primary {
	background: var(--rogass-navy);
	color: #ffffff;
}

.rogass-btn--primary:hover {
	background: var(--rogass-navy-dark);
	border-color: var(--rogass-navy-dark);
}

.rogass-btn--secondary {
	background: #ffffff;
	color: var(--rogass-navy);
}

.rogass-btn--secondary:hover {
	background: var(--rogass-surface);
}

.rogass-btn:focus-visible {
	outline: 2px solid var(--rogass-orange);
	outline-offset: 2px;
}

@media (max-width: 479px) {
	.rogass-confirm__actions .rogass-btn {
		flex: 1 1 100%;
	}
}

/* Step buttons: "Tilbake" is secondary, "Neste" and "Send bestilling" are primary. */
.rogass-booking-form .wpforms-page-prev {
	background: #ffffff !important;
	border: 2px solid var(--rogass-navy) !important;
	color: var(--rogass-navy) !important;
}

.rogass-booking-form .wpforms-page-prev:hover {
	background: var(--rogass-surface) !important;
}

/* One button style: normal letters (the theme sets capitals on submit) and room on the sides. */
div.wpforms-container-full.rogass-booking-form .wpforms-page-button,
div.wpforms-container-full.rogass-booking-form .wpforms-submit {
	padding: 0 28px !important;
	text-transform: none !important;
	letter-spacing: normal !important;
	font-weight: 600 !important;
}

/* The privacy note above «Send bestilling» is information, not a heading. */
div.wpforms-container-full.rogass-booking-form .rogass-privacy,
div.wpforms-container-full.rogass-booking-form .rogass-privacy p {
	font-size: 14px !important;
	font-weight: 400 !important;
	line-height: 1.5 !important;
	color: var(--rogass-muted) !important;
}

div.wpforms-container-full.rogass-booking-form .rogass-privacy a {
	color: var(--rogass-navy) !important;
	text-decoration: underline !important;
}

/* No !important on display: WPForms hides this row with display:none until the last step. */
.rogass-booking-form .rogass-submit-row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px;
}

.rogass-booking-form .rogass-submit-row .wpforms-page-prev {
	margin: 0 !important;
}

/* Visible keyboard focus. The theme and WPForms remove outlines on buttons and radios.
   WPForms draws its own ring on buttons (::after); it is hidden so only the orange one shows. */
.rogass-booking-form .wpforms-page-button:focus::after,
.rogass-booking-form .wpforms-submit:focus::after,
.rogass-booking-form button[type="submit"]:focus::after {
	display: none !important;
}

.rogass-booking-form .wpforms-page-button:focus-visible,
.rogass-booking-form .wpforms-submit:focus-visible {
	outline: 2px solid var(--rogass-orange) !important;
	outline-offset: 2px !important;
}

/*
 * Google Maps: the map itself (arrow keys move it), its buttons and links. WPForms' reset removes their focus outline.
 * Inset, so the ring isn't clipped at the edge of the map.
 */
.rogass-booking-form .wpforms-geolocation-map :focus-visible {
	outline: 2px solid var(--rogass-orange) !important;
	outline-offset: -2px !important;
}

/* Google's own focus frame for the map (2px #1a73e8, hard to see on the sea): same orange as the rest of the form.
   The map tiles cover an outline on the map itself, so this frame is the one that shows. */
.rogass-booking-form .wpforms-geolocation-map div[style*="border: 2px solid rgb(26, 115, 232)"] {
	border: 2px solid var(--rogass-orange) !important;
	border-radius: var(--rogass-radius) !important;
}

/* The theme's img { max-width: 100% } shrinks Google's control icons (the Street View figure) to nothing. */
.rogass-booking-form .gm-style img {
	max-width: none !important;
}
