/* CaseSteward app shell: the install card and installed-app spacing. */

.csw-app-install {
	margin: 0 0 24px;
	padding: 20px 20px 22px;
	background: var(--csw-surface, #ffffff);
	border: 1px solid var(--csw-line, #e4e6eb);
	border-left: 6px solid var(--csw-teal, #408292);
	border-radius: 18px 0 18px 0;
	color: var(--csw-ink, #23282d);
}

.csw-app-install[hidden],
.csw-app-install [hidden] {
	display: none !important;
}

.csw-app-install__title {
	margin: 0 0 6px;
	font-size: 1.125rem;
	line-height: 1.3;
	color: var(--csw-navy, #1a2148);
}

.csw-app-install__text {
	margin: 0 0 14px;
	line-height: 1.5;
}

.csw-app-install__button {
	min-height: 48px;
}

.csw-app-install__steps {
	margin: 0;
	padding-left: 1.25rem;
	line-height: 1.6;
}

/* ---------- Notifications card ---------- */
.csw-app-push {
	border-left-color: var(--csw-plum, #873A68);
}

.csw-app-push__actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px 16px;
	margin: 0 0 12px;
}

.csw-app-push__actions .csw-btn {
	box-sizing: border-box;
	min-height: 48px;
	padding: 12px 18px;
}

.csw-app-push__off {
	min-height: 44px;
	padding: 8px 0;
	border: 0;
	background: none;
	color: var(--csw-navy, #1a2148);
	font: inherit;
	font-weight: 600;
	text-decoration: underline;
	cursor: pointer;
}

.csw-app-push__off:focus-visible,
.csw-app-push__prefs summary:focus-visible {
	outline: 3px solid var(--csw-navy, #1a2148);
	outline-offset: 2px;
}

.csw-app-push__prefs summary {
	min-height: 44px;
	display: flex;
	align-items: center;
	cursor: pointer;
	font-weight: 600;
	color: var(--csw-navy, #1a2148);
}

.csw-app-push__prefs fieldset {
	margin: 4px 0 0;
	padding: 0;
	border: 0;
}

.csw-app-push__pref {
	display: flex;
	align-items: center;
	gap: 10px;
	min-height: 44px;
}

.csw-app-push__pref input {
	width: 20px;
	height: 20px;
}

/*
 * Installed app on a notched phone: keep content clear of the rounded corners
 * and the home bar. env() is 0 unless the page opts into viewport-fit=cover, so
 * this is a no-op everywhere else.
 */
@media (display-mode: standalone) {
	body {
		padding-top: env(safe-area-inset-top);
		padding-right: env(safe-area-inset-right);
		padding-bottom: env(safe-area-inset-bottom);
		padding-left: env(safe-area-inset-left);
	}
}

/* Offline outbox bar (PWA-09): unsent visits saved on this phone. */
.csw-outbox {
	position: fixed;
	left: 12px;
	right: 12px;
	bottom: calc(12px + env(safe-area-inset-bottom, 0px));
	z-index: 9999;
	box-sizing: border-box;
	max-width: 40rem;
	margin: 0 auto;
	padding: 12px 14px;
	border-radius: 12px;
	background: var(--csw-navy, #1a2148);
	color: #fff;
	font-size: 15px;
	line-height: 1.4;
	box-shadow: 0 6px 24px rgba(0, 0, 0, 0.25);
}

.csw-outbox[hidden] {
	display: none;
}

.csw-outbox__line {
	margin: 0 0 8px;
}

.csw-outbox__line--problem {
	font-weight: 600;
}

.csw-outbox__send,
.csw-outbox__discard {
	box-sizing: border-box;
	min-height: 44px;
	padding: 8px 16px;
	border: 2px solid #fff;
	border-radius: 999px;
	background: transparent;
	color: #fff;
	font: inherit;
	font-weight: 600;
	cursor: pointer;
}

.csw-outbox__send:focus-visible,
.csw-outbox__discard:focus-visible {
	outline: 3px solid #fff;
	outline-offset: 2px;
}

.csw-outbox__problems {
	margin: 0;
	padding: 0;
	list-style: none;
}

.csw-outbox__problems li {
	margin-top: 8px;
	overflow-wrap: anywhere;
}

.csw-outbox__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 8px 0 0;
}

.csw-outbox__show {
	margin: 8px 0 0;
	padding: 8px 10px;
	border-radius: 8px;
	background: rgba(255, 255, 255, 0.12);
}

.csw-outbox__show dt {
	font-weight: 600;
}

.csw-outbox__show dd {
	margin: 0 0 6px;
	white-space: pre-wrap;
}
