/* Sign-up page (trial.php). The page sits in div.homePage (css/home-v1.0.css), which gives it
   the heading, text size and buttons of the front page and login.php. */

div.trialPage {
	max-width: 640px;
	margin: 0 auto;
}

p.trialIntro {
	margin: 0 0 1.5em;
	font-size: 17px;
	color: var(--text-neutral-7);
}


/* The tabs and both forms in one card, the same look as the login card */
section.trialCard {
	padding: 0 24px 24px;
	border: 1px solid var(--border-neutral-4);
	border-radius: 14px;
	background: var(--bg-neutral-1);
	box-shadow: 0 8px 24px rgba(20, 40, 70, 0.08);
}


/* Tabs: a row across the top of the card. The chosen one is light blue and underlined,
   the other turns faintly blue under the mouse. */
section.trialCard ul.tabMenu {
	display: flex;
	gap: 6px;
	overflow: visible;
	margin: 0 -24px;
	padding: 10px 12px 0;
	border-bottom: 1px solid var(--border-neutral-4);
	font-size: 15px;
}

section.trialCard .tabMenu li {
	float: none;
	flex: 1;
}

section.trialCard .tabMenu li a {
	margin: 0 0 -1px;
	padding: 12px 12px 10px;
	border: 0;
	border-bottom: 3px solid transparent;
	border-radius: 10px 10px 0 0;
	background: transparent;
	font-weight: 600;
	color: var(--text-neutral-7);
}

/* The blues are --bg-info-1 mixed with the card's background: 50% for the chosen tab, 25% under
   the mouse. Browsers without color-mix() use the line before. */
section.trialCard .tabMenu li a:hover {
	border: 0;
	border-bottom: 3px solid transparent;
	background: transparent;
	background: color-mix(in srgb, var(--bg-info-1) 25%, var(--bg-neutral-1));
	color: var(--text-brand-accent);
}

section.trialCard .tabMenu li a.tabMenuSelected {
	border-bottom-color: var(--border-brand);
	background: var(--bg-surface-2);
	background: color-mix(in srgb, var(--bg-info-1) 50%, var(--bg-neutral-1));
	color: var(--text-neutral-13);
}

span.trialTabAudience {
	display: block;
	font-size: 12px;
	font-weight: normal;
	opacity: 0.8;
}


/* Form layout: labels above the fields, one column on a phone */
form.trialForm {
	display: flex;
	flex-direction: column;
	gap: 1.6em;
	padding-top: 24px;
}

fieldset.trialGroup {
	display: flex;
	flex-direction: column;
	gap: 0.9em;
	min-width: 0;
	margin: 0;
	padding: 0;
	border: 0;
}

fieldset.trialGroup legend {
	margin-bottom: 0.7em;
	padding: 0;
	font-size: 12px;
	font-weight: bold;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--text-neutral-7);
}

div.trialRow {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0.9em 1em;
}

@media (max-width: 560px) {
	div.trialRow {
		grid-template-columns: 1fr;
	}
}

div.trialField {
	display: flex;
	flex-direction: column;
	gap: 3px;
	min-width: 0;
}

div.trialField > label {
	font-size: 14px;
	font-weight: 600;
}

/* The same fields as in the login card */
div.trialPage input[type=text],
div.trialPage input[type=password],
div.trialPage input[type=email] {
	box-sizing: border-box;
	width: 100%;
	height: 2.4em;
	margin: 0;
	font-size: 15px;
	letter-spacing: normal;
}

div.trialPage input[aria-invalid=true] {
	border-color: var(--border-danger-3);
}

span.trialHint {
	font-size: 13px;
	color: var(--text-neutral-7);
	transition: color 0.2s;
}

/* Set for a moment by js/trial-v1.0.js when a character is not allowed in the username */
span.trialHint.trialHintHighlight {
	color: var(--text-danger-3);
}

span.trialError {
	font-size: 13px;
	color: var(--text-danger-3);
}

span.trialError i {
	margin-right: 0.4em;
}


/* Error summary at the top of a form */
div.trialPage .infobox ul {
	margin: 0.4em 0 0;
	padding-left: 1.2em;
}

div.trialPage .infobox a {
	color: inherit;
}


/* Password rules that tick off while typing (js/trial-v1.0.js) */
ul.trialPasswordRules {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 2px 1em;
	margin: 0;
	padding: 0;
	list-style: none;
	font-size: 13px;
	color: var(--text-neutral-7);
}

ul.trialPasswordRules li {
	display: flex;
	align-items: center;
	gap: 0.5em;
}

/* An empty ring that fills in when the rule is met */
ul.trialPasswordRules li::before {
	content: "";
	flex: none;
	width: 9px;
	height: 9px;
	border: 1.5px solid var(--border-neutral-5);
	border-radius: 50%;
}

ul.trialPasswordRules li.met {
	color: var(--text-success-3);
}

ul.trialPasswordRules li.met::before {
	border-color: var(--text-success-3);
	background: var(--text-success-3);
}


/* Flight time format as two tiles */
div.trialTiles {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0.7em;
}

div.trialTile {
	position: relative;
}

div.trialTile input {
	position: absolute;
	opacity: 0;
}

div.trialTile label {
	display: flex;
	flex-direction: column;
	gap: 2px;
	padding: 0.6em 0.8em;
	border: 1px solid var(--border-neutral-5);
	border-radius: 8px;
	background: var(--bg-neutral-1);
	cursor: pointer;
}

div.trialTile .trialTileValue {
	font-size: 1.3em;
	font-weight: 600;
}

div.trialTile .trialTileName {
	font-size: 13px;
	color: var(--text-neutral-7);
}

div.trialTile input:checked + label {
	border-color: var(--border-brand);
	background: var(--bg-surface-2);
	box-shadow: inset 0 0 0 1px var(--border-brand);
}

div.trialTile input:focus-visible + label {
	outline: 2px solid var(--border-brand-dark);
	outline-offset: 2px;
}


/* "I have a discount code", folded away */
details.trialDiscount summary {
	cursor: pointer;
	color: var(--text-brand-accent);
}

details.trialDiscount div.trialField {
	max-width: 260px;
	margin-top: 0.7em;
}

div.trialPage input.trialUppercase {
	text-transform: uppercase;
}


/* A full-width button, as in the login card, with the next step centred below it */
div.trialActions {
	display: flex;
	flex-direction: column;
	gap: 0.6em;
	text-align: center;
}


/* Airport picker (js/airport-picker-v1.0.js) */
div.trialPage .selectpicker.airportPicker {
	width: auto;
}

div.trialPage .airportPicker input[type=text] {
	width: 100%;
}

.airportPicker .picker-options {
	max-height: none;
}

.airportPicker .picker-option.airportOption {
	display: grid;
	grid-template-columns: 3.6em 2.8em 1fr;
	gap: 0.6em;
	align-items: baseline;
	box-sizing: border-box;
	width: 100%;
}

.airportOptionIcao {
	font-weight: bold;
}

.airportOptionIata {
	color: var(--text-neutral-7);
}

.airportOptionName {
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.airportOptionCountry {
	font-size: 12px;
	color: var(--text-neutral-7);
}

.airportPicker .picker-empty {
	font-size: 13px;
	font-style: italic;
}


/* A phone: a little less space inside the card */
@media (max-width: 480px) {
	section.trialCard {
		padding: 0 16px 20px;
	}

	section.trialCard ul.tabMenu {
		gap: 4px;
		margin: 0 -16px;
		padding: 8px 8px 0;
	}
}
