:root { --xof-accent: #1f1f1f; }
html.xof-lock { overflow: hidden; }

.xof-overlay[hidden], .xof-pill[hidden], .xof-error[hidden] { display: none !important; }
.xof-overlay {
	position: fixed; inset: 0; z-index: 99999;
	display: flex; align-items: center; justify-content: center;
	padding: 16px; background: rgba(0, 0, 0, .55);
	font-family: inherit;
}
.xof-dialog {
	width: 100%; max-width: 440px; max-height: calc(100vh - 32px); overflow: auto;
	background: #fff; color: #1f1f1f; border-radius: 14px;
	padding: 28px 24px 24px; box-shadow: 0 20px 60px rgba(0, 0, 0, .3);
	box-sizing: border-box;
}
.xof-title { margin: 0 0 6px; font-size: 1.35rem; line-height: 1.25; font-weight: 700; color: inherit; }
.xof-sub { margin: 0 0 18px; color: #555; font-size: .95rem; line-height: 1.45; }
.xof-sub[hidden] { display: none; }
.xof-body { margin-top: 14px; }

.xof-choices { display: grid; gap: 10px; }
.xof-btn {
	appearance: none; display: inline-flex; align-items: center; justify-content: center;
	min-height: 46px; padding: 0 18px; border-radius: 10px; cursor: pointer;
	font: inherit; font-size: 1rem; font-weight: 600; line-height: 1;
	border: 1.5px solid #d0d0d0; background: #fff; color: #1f1f1f;
	transition: filter .15s, border-color .15s;
}
.xof-btn:hover { border-color: #999; }
.xof-btn:focus-visible { outline: 3px solid var(--xof-accent); outline-offset: 2px; }
.xof-primary { background: var(--xof-accent); border-color: var(--xof-accent); color: #fff; }
.xof-primary:hover { filter: brightness(1.15); border-color: var(--xof-accent); }
.xof-big { min-height: 64px; font-size: 1.15rem; }
.xof-link { border-color: transparent; background: none; color: #555; padding: 0 8px; }
.xof-link:hover { border-color: transparent; color: #1f1f1f; text-decoration: underline; }

.xof-form label { display: block; margin-bottom: 12px; font-size: .9rem; font-weight: 600; }
.xof-form input:not([type="radio"]) {
	display: block; width: 100%; box-sizing: border-box; margin-top: 5px;
	min-height: 44px; padding: 8px 12px; border: 1.5px solid #ccc; border-radius: 8px;
	font: inherit; font-size: 1rem; font-weight: 400; background: #fff; color: #1f1f1f;
}
.xof-form input:focus { outline: none; border-color: var(--xof-accent); box-shadow: 0 0 0 3px rgba(0, 0, 0, .08); }
.xof-opt { font-weight: 400; color: #777; }
.xof-row { display: grid; grid-template-columns: 1fr 110px; gap: 10px; }
.xof-error { margin: 0 0 12px; color: #b3261e; font-size: .9rem; }
.xof-actions { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 6px; }

.xof-locs { border: 0; margin: 0 0 8px; padding: 0; display: grid; gap: 8px; }
.xof-loc { display: flex !important; gap: 10px; align-items: flex-start; padding: 12px; border: 1.5px solid #d0d0d0; border-radius: 10px; cursor: pointer; font-weight: 400 !important; margin: 0 !important; }
.xof-loc:has(input:checked) { border-color: var(--xof-accent); }
.xof-loc input { margin-top: 3px; accent-color: var(--xof-accent); }
.xof-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.xof-pill {
	position: fixed; left: 16px; bottom: 16px; z-index: 99990;
	display: inline-flex; align-items: center; gap: 10px; max-width: calc(100vw - 32px);
	padding: 10px 14px; border-radius: 999px; border: 0; cursor: pointer;
	background: #fff; color: #1f1f1f; box-shadow: 0 4px 18px rgba(0, 0, 0, .18);
	font: inherit; font-size: .9rem; line-height: 1.2;
}
.xof-pill-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.xof-pill-change { flex: none; color: var(--xof-accent); text-decoration: underline; }
.xof-pill:focus-visible { outline: 3px solid var(--xof-accent); outline-offset: 2px; }

@media (max-width: 420px) {
	.xof-dialog { padding: 22px 18px 18px; }
	.xof-row { grid-template-columns: 1fr 96px; }
}
