/* addressing.site – small additions on top of Bulma */

[hidden] { display: none !important; }

.site-nav { background-color: #3e8ed0; } /* the blue the white logo was drawn for */
.site-tabs { margin-bottom: 1.5rem; }
.site-main { padding-bottom: 3rem; }
.break { overflow-wrap: anywhere; }

/* QR code panel */
.qr-result { width: 17rem; max-width: 100%; margin: 0 auto; text-align: center; }
.qr-preview {
	display: flex; align-items: center; justify-content: center;
	aspect-ratio: 1; border: 1px solid var(--bulma-border, #dbdbdb); border-radius: 6px;
	background: #fff; color: #5c5c5c; font-size: .875rem; padding: .5rem;
}
.qr-preview svg { width: 100%; height: 100%; display: block; }
#qr-caption { min-height: 1.5em; margin-bottom: .75rem; }

/* Letter template */
.letter-grid {
	display: grid; gap: .75rem;
	grid-template-columns: repeat(auto-fill, minmax(7.5rem, 1fr));
	margin-bottom: .75rem;
}
.letter-grid .field { margin-bottom: 0; }
fieldset { border: 0; padding: 0; min-width: 0; }
.letter-preview { width: 21rem; max-width: 100%; margin: 0 auto; }
.letter-preview.is-landscape { width: 30rem; }
.letter-preview svg {
	display: block; width: 100%; height: auto;
	background: #fff; box-shadow: 0 1px 6px rgba(10, 10, 10, .25);
}

@media (min-width: 769px) {
	/* keep the preview in view while changing settings */
	.letter-preview { position: sticky; top: 1rem; }
}

.site-footer { padding: 1.5rem 1rem 2rem; }

/* My QR codes */
.code-card { display: flex; gap: 1.25rem; align-items: flex-start; flex-wrap: wrap; }
.code-qr { width: 7rem; flex: none; background: #fff; border-radius: 4px; padding: .25rem; }
.code-qr svg { display: block; width: 100%; height: auto; }
.code-details { flex: 1; min-width: 14rem; }
.code-details p { margin-bottom: .35rem; }
.code-details .buttons { margin-top: .75rem; }
.code-form { display: inline; }

/* Phones: nothing may be wider than the screen, so the page cannot slide sideways. */
html, body { overflow-x: clip; max-width: 100%; }
/* Bulma lets a tab strip scroll sideways; here the tabs shrink and wrap to fit instead. */
.site-tabs { overflow: visible; white-space: normal; }
.site-tabs ul { flex-wrap: wrap; flex-shrink: 1; min-width: 0; justify-content: center; }
.site-tabs a { padding: .5em .75em; }

@media (max-width: 768px) {
	.site-main.container.is-fluid { padding-left: 1rem; padding-right: 1rem; }
	.title { font-size: 1.5rem; }
	.site-tabs { font-size: .875rem; }
	.site-tabs a { padding: .5em .6em; }
	/* iOS zooms the whole page when a box with small text is tapped; 16px text prevents that. */
	.input, .textarea, .select select, .input.is-small, .textarea.is-small, .select.is-small select { font-size: 16px; }
	.select.is-small { height: 2.5em; }
	.qr-result { width: 100%; max-width: 20rem; }
	.letter-preview, .letter-preview.is-landscape { width: 100%; }
}
