/* Tree Towns file transfers: customer form, success dialog, download and status pages.
   Inherits the theme's font; colours and radii match treetowns.com's forms. */

.tt-transfers,
.tt-public {
	--tt-blue: #1953a4;
	--tt-blue-dark: #12407f;
	--tt-text: #2a3139;
	--tt-muted: #5d6670;
	--tt-line: #d5dbe3;
	--tt-field-bg: #fbfcfd;
	--tt-field-border: #2a3139;
	--tt-error: #b3261e;
	--tt-success: #1e7b34;
	--tt-unread: #fff8d6;
	--tt-radius: 9px;
	color: var(--tt-text);
}

/* ---- Layout -------------------------------------------------------------- */

.tt-form__grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	gap: 8px 48px;
}

.tt-form__full {
	grid-column: 1 / -1;
}

.tt-form__side {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

@media (max-width: 760px) {
	.tt-form__grid {
		grid-template-columns: minmax(0, 1fr);
	}
}

/* ---- Sections ------------------------------------------------------------ */

.tt-section {
	border: 0;
	margin: 0 0 16px;
	padding: 0;
	min-width: 0;
}

.tt-section__title {
	display: flex;
	align-items: center;
	gap: 14px;
	width: 100%;
	margin: 0 0 14px;
	padding: 0;
	color: var(--tt-blue);
	font-size: 22px;
	font-weight: 700;
	line-height: 1.3;
}

.tt-section__title::after {
	content: "";
	flex: 1;
	height: 2px;
	background: var(--tt-line);
}

/* ---- Fields -------------------------------------------------------------- */

.tt-field {
	margin: 0 0 14px;
	min-width: 0;
}

.tt-field label {
	display: block;
	margin: 0 0 4px;
	color: var(--tt-blue);
	font-size: 17px;
	font-weight: 700;
}

.tt-remember {
	margin: 4px 0 14px;
	font-size: 15px;
}

.tt-field .tt-remember__label,
.tt-remember__label {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	margin: 0;
	color: var(--tt-text, #333);
	font-size: 15px;
	font-weight: 400;
	cursor: pointer;
}

.tt-remember__label input {
	flex: none;
	width: 18px;
	height: 18px;
	margin: 2px 0 0;
}

.tt-remember__saved {
	margin: 6px 0 0 26px;
	color: var(--tt-muted);
	font-size: 14px;
}

.tt-remember__clear {
	display: inline;
	width: auto;
	height: auto;
	min-height: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	box-shadow: none;
	background: none;
	color: var(--tt-blue);
	font: inherit;
	text-decoration: underline;
	cursor: pointer;
}

.tt-required {
	color: var(--tt-error);
	margin-left: 2px;
}

.tt-optional {
	color: var(--tt-muted);
	font-weight: 400;
	font-size: 15px;
}

.tt-transfers input[type="text"],
.tt-transfers input[type="email"],
.tt-transfers input[type="tel"],
.tt-transfers input[type="date"],
.tt-transfers input[type="number"],
.tt-transfers select,
.tt-transfers textarea {
	box-sizing: border-box;
	width: 100%;
	min-height: 46px;
	padding: 8px 12px;
	border: 1px solid var(--tt-field-border);
	border-radius: var(--tt-radius);
	background-color: var(--tt-field-bg);
	color: var(--tt-text);
	font: inherit;
	font-size: 17px;
	font-weight: 600;
}

.tt-transfers textarea {
	min-height: 150px;
	resize: vertical;
	font-weight: 400;
}

.tt-transfers input:focus-visible,
.tt-transfers select:focus-visible,
.tt-transfers textarea:focus-visible,
.tt-transfers button:focus-visible,
.tt-transfers .tt-files__choose:focus-within {
	outline: 3px solid rgba(25, 83, 164, 0.35);
	outline-offset: 1px;
	border-color: var(--tt-blue);
}

.tt-transfers [aria-invalid="true"] {
	border-color: var(--tt-error);
	box-shadow: 0 0 0 1px var(--tt-error);
}

.tt-field__error {
	margin: 6px 0 0;
	color: var(--tt-error);
	font-size: 15px;
	font-weight: 600;
}

.tt-field-row {
	display: grid;
	grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
	gap: 0 16px;
}

.tt-field-row--address {
	grid-template-columns: minmax(0, 1.5fr) minmax(0, 0.8fr) minmax(0, 1fr);
}

@media (max-width: 480px) {
	.tt-field-row,
	.tt-field-row--address {
		grid-template-columns: minmax(0, 1fr);
	}
}

.tt-hp {
	position: absolute !important;
	left: -10000px !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.tt-transfers .screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	border: 0;
	white-space: nowrap;
}

/* ---- Attached files ------------------------------------------------------ */

.tt-files__table {
	width: 100%;
	margin: 0 0 14px;
	border-collapse: collapse;
	font-size: 16px;
}

.tt-files__table th,
.tt-files__table td {
	padding: 8px 10px;
	border-bottom: 1px solid var(--tt-line);
	text-align: left;
	vertical-align: middle;
}

.tt-files__table thead th {
	background: #eef2f7;
	color: var(--tt-text);
	font-weight: 700;
}

.tt-files__table tfoot th,
.tt-files__table tfoot td {
	border-bottom: 0;
	font-weight: 700;
}

.tt-files__name {
	word-break: break-word;
}

.tt-files__size {
	width: 120px;
	white-space: nowrap;
}

.tt-files__actions {
	width: 90px;
	text-align: right !important;
	white-space: nowrap;
	font-size: 15px;
}

.tt-files__table tr[data-state="done"] .tt-files__actions {
	color: var(--tt-success);
	font-weight: 700;
}

.tt-files__table tr[data-state="error"] .tt-files__actions {
	color: var(--tt-error);
	font-weight: 700;
}

.tt-files__remove {
	padding: 4px 8px;
	border: 0;
	background: none;
	color: var(--tt-error);
	font: inherit;
	font-size: 15px;
	text-decoration: underline;
	cursor: pointer;
}

.tt-files__remove:disabled {
	visibility: hidden;
}

.tt-files__drop {
	padding: 28px 16px;
	border: 2px dashed #9fb0c6;
	border-radius: var(--tt-radius);
	background: #f6f8fb;
	text-align: center;
	transition: background-color 0.15s, border-color 0.15s;
}

.tt-files__drop.uppy-is-drag-over {
	border-color: var(--tt-blue);
	background: #e8effa;
}

.tt-files__drop p {
	margin: 0 0 6px;
}

.tt-files__drop-lead {
	font-size: 19px;
	font-weight: 700;
}

.tt-files__drop-sub {
	color: var(--tt-muted);
}

.tt-files__drop-buttons {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 8px 16px;
	margin-top: 14px !important;
}

.tt-files__folder {
	color: var(--tt-blue);
	font-size: 15px;
	text-decoration: underline;
	cursor: pointer;
}

.tt-files__limit {
	margin-top: 12px !important;
	color: var(--tt-muted);
	font-size: 14px;
}

.is-uploading .tt-files__drop {
	opacity: 0.5;
	pointer-events: none;
}

/* ---- Buttons ------------------------------------------------------------- */

.tt-button {
	display: inline-block;
	padding: 12px 30px;
	border: 2px solid var(--tt-blue);
	border-radius: var(--tt-radius);
	background: var(--tt-blue);
	color: #fff;
	font: inherit;
	font-size: 16px;
	font-weight: 700;
	line-height: 1.3;
	text-decoration: none;
	cursor: pointer;
}

.tt-button:hover,
.tt-button:focus-visible {
	background: var(--tt-blue-dark);
	border-color: var(--tt-blue-dark);
	color: #fff;
}

.tt-button--secondary {
	background: #fff;
	color: var(--tt-blue);
}

.tt-button--secondary:hover,
.tt-button--secondary:focus-within {
	background: #e8effa;
	color: var(--tt-blue-dark);
}

.tt-button:disabled {
	opacity: 0.6;
	cursor: progress;
}

/* ---- Footer, progress, messages ----------------------------------------- */

.tt-form__footer {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 12px;
	margin-top: 8px;
}

.tt-progress {
	width: 100%;
}

.tt-progress__bar {
	height: 12px;
	border-radius: 6px;
	background: #e3e8ef;
	overflow: hidden;
}

.tt-progress__bar span {
	display: block;
	width: 0;
	height: 100%;
	background: var(--tt-blue);
	transition: width 0.3s;
}

.tt-progress__text {
	margin: 6px 0 0;
	color: var(--tt-muted);
	font-size: 15px;
}

.tt-form__message {
	align-self: stretch;
	margin: 0;
	padding: 10px 14px;
	border-radius: var(--tt-radius);
	background: #eef2f7;
	font-size: 16px;
}

.tt-form__message[data-type="error"] {
	background: #fdecea;
	color: var(--tt-error);
	font-weight: 600;
}

@media (max-width: 760px) {
	.tt-form__footer {
		align-items: stretch;
	}
}

/* ---- Success dialog ------------------------------------------------------ */

.tt-modal {
	width: min(520px, calc(100vw - 32px));
	padding: 28px 32px;
	border: 0;
	border-radius: 12px;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
	color: var(--tt-text);
}

.tt-modal::backdrop {
	background: rgba(20, 30, 45, 0.55);
}

.tt-modal__title {
	margin: 0 0 8px;
	color: var(--tt-success);
	font-size: 26px;
	line-height: 1.25;
}

.tt-modal__note {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0 0 18px;
	padding-bottom: 16px;
	border-bottom: 2px solid var(--tt-blue);
	font-size: 15px;
}

.tt-modal__icon {
	flex: none;
	color: var(--tt-muted);
}

.tt-modal__links {
	margin: 0;
	padding: 0;
	list-style: none;
}

.tt-modal__links li {
	margin: 0 0 10px;
}

.tt-link {
	/* The theme styles every button like a form field; this keeps the modal's buttons looking like links. */
	display: inline;
	width: auto;
	height: auto;
	min-height: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	box-shadow: none;
	background: none;
	line-height: inherit;
	text-align: left;
	color: var(--tt-blue);
	font: inherit;
	font-size: 20px;
	text-decoration: underline;
	text-underline-offset: 3px;
	cursor: pointer;
}

/* ---- Download and status pages ------------------------------------------ */

.tt-public__inner {
	max-width: 900px;
	margin: 0 auto;
}

.tt-public .entry-header .entry-title {
	color: var(--tt-blue);
}

.tt-download__meta {
	color: var(--tt-muted);
}

.tt-download__message {
	margin: 20px 0;
	padding: 12px 18px;
	border-left: 4px solid var(--tt-blue);
	background: #f6f8fb;
}

.tt-download__message cite {
	display: block;
	margin-top: 8px;
	color: var(--tt-muted);
	font-size: 15px;
	font-style: normal;
}

.tt-table {
	width: 100%;
	margin: 20px 0;
	border-collapse: collapse;
}

.tt-table th,
.tt-table td {
	padding: 8px 10px;
	border-bottom: 1px solid var(--tt-line);
	text-align: left;
}

.tt-table__name {
	word-break: break-word;
}

.tt-download__buttons {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
}

.tt-button__sub {
	display: block;
	font-size: 14px;
	font-weight: 400;
}

.tt-download__alone {
	display: inline-block;
	margin-left: 6px;
	padding: 1px 8px;
	border-radius: 10px;
	background: #e8effa;
	color: var(--tt-blue-dark);
	font-size: 13px;
	white-space: nowrap;
}

.tt-download__help {
	color: var(--tt-muted);
	font-size: 15px;
}

.tt-status {
	display: grid;
	grid-template-columns: max-content 1fr;
	gap: 10px 24px;
	margin: 0 0 24px;
}

.tt-status dt {
	color: var(--tt-blue);
	font-weight: 700;
}

.tt-status dd {
	margin: 0;
}

.tt-status__value {
	font-weight: 700;
}

.tt-status__value--production {
	color: var(--tt-success);
}
