/* -------------------------------------------------------------------------
   7.6 Inquiry form
   ------------------------------------------------------------------------- */

.tg-form__row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0 var(--space-2);
}

.tg-form__field {
	margin: 0 0 var(--space-2);
}

.tg-form__field label {
	display: block;
	margin-bottom: 0.25rem;
	font-size: var(--size-s);
	color: var(--mute);
}

.tg-form__field input:not([type="checkbox"]),
.tg-form__field textarea {
	width: 100%;
	padding: 0.65rem 0.75rem;
	font: inherit;
	background: var(--paper);
	border: 1px solid var(--line);
	border-radius: 0;
}

.tg-form__field input:focus,
.tg-form__field textarea:focus {
	outline: none;
	border-color: var(--ink);
}

/* GDPR consent checkbox */
.tg-form__field--consent label {
	display: flex;
	align-items: flex-start;
	gap: var(--space-1);
	color: var(--ink);
}

/* Link to the privacy policy page, under the consent box */
.tg-form__privacy {
	display: inline-block;
	margin: 0.25rem 0 0 calc(var(--space-1) + 1em);
	font-size: var(--size-s);
	color: var(--mute);
	text-decoration: underline;
	text-underline-offset: 0.15em;
}

/* Honeypot (anti-spam): hidden from humans */
.tg-form__hp {
	position: absolute;
	left: -9999px;
}

.tg-form__actions {
	display: flex;
	align-items: center;
	gap: var(--space-2);
}

/* Send button: International Klein Blue, like the button that opens the
   form (.button--klein); the plugin's markup is left as is */
.tg-form__actions .tg-button {
	color: var(--paper);
	background: var(--klein);
	border-color: var(--klein);
}

.tg-form__actions .tg-button:hover {
	color: var(--paper);
	background: var(--klein-dark);
	border-color: var(--klein-dark);
}

.tg-form__status {
	font-size: var(--size-s);
	color: var(--mute);
}

/* Success / error message */
.tg-form__notice {
	margin-bottom: var(--space-2);
	padding: var(--space-2);
	background: var(--stone);
	border-left: 2px solid var(--ink);
}

.tg-form__notice p {
	margin: 0;
}

/* --- Dialog window (single-artwork.php) --------------------------------- */

.inquiry-dialog {
	width: min(40rem, calc(100vw - 2 * var(--gutter)));
	max-height: calc(100vh - 2 * var(--space-4));
	padding: var(--space-4);
	color: var(--ink);
	background: var(--paper);
	border: 0;
	overflow: auto;
}

.inquiry-dialog::backdrop {
	background: rgba(17, 17, 17, 0.6);
}

/* Page behind the window does not scroll */
body.dialog-open {
	overflow: hidden;
}

.inquiry-dialog__close {
	position: absolute;
	top: var(--space-1);
	right: var(--space-1);
	width: 2.75rem;
	height: 2.75rem;
	font-size: 1.75rem;
	line-height: 1;
	color: var(--ink);
	background: transparent;
	border: 0;
	cursor: pointer;
}

.inquiry-dialog__header {
	margin-bottom: var(--space-3);
	padding-right: var(--space-4);
	/* room for the close button */
}

.inquiry-dialog__title {
	margin-bottom: var(--space-1);
}

.inquiry-dialog__work {
	margin-bottom: var(--space-1);
	font-family: var(--font-serif);
	font-size: 1.125rem;
}

.inquiry-dialog .muted {
	font-size: var(--size-s);
}

/* Small screens: the window takes the whole screen */
@media (max-width: 600px) {
	.inquiry-dialog {
		width: 100vw;
		max-width: 100vw;
		height: 100%;
		max-height: 100%;
		margin: 0;
		padding: var(--space-4) var(--gutter);
	}

	.tg-form__row {
		grid-template-columns: 1fr;
	}
}
