/**
 * Alerts: the Job alerts and Candidate alerts pages. D-425.
 *
 * Drawn from the canvas "OCC Alerts Mockup" (boards 1, 2 and 5) with
 * occ-ui.css's tokens (D-365): burgundy primary buttons, grey everything else,
 * status as a chip with a dot.
 *
 * @package OCC\Modules\Alerts
 */

.occ-al {
	display: flex;
	flex-direction: column;
	gap: 18px;
	color: var(--occ-ui-text-2, #344054);
	font-size: 14px;
}

.inner-dashboard .occ-al {
	margin: 0 0 2em;
	padding: 15px 15px 0;
}

@media (min-width: 768px) {
	.inner-dashboard .occ-al {
		padding: 30px 30px 0;
	}
}

@media (min-width: 1200px) {
	.inner-dashboard .occ-al {
		padding: 60px 60px 0;
	}
}

.occ-al [hidden] {
	display: none !important;
}

.occ-al-head {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	justify-content: space-between;
	gap: 16px;
}

.occ-al-intro {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.occ-al .occ-al-title {
	margin: 0;
	font-size: 22px;
	font-weight: 600;
	line-height: 1.3;
	color: var(--occ-ui-text, #101828);
}

.occ-al .occ-al-text {
	margin: 0;
	font-size: 14px;
	line-height: 1.5;
	color: var(--occ-ui-text-3, #475467);
}

.occ-al-card {
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
	gap: 14px;
	padding: 20px 22px;
	background: var(--occ-ui-white, #fff);
	border-radius: 12px;
	box-shadow: var(--occ-ui-tile-shadow, 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .10));
}

.occ-al-card.is-paused .occ-al-card-main,
.occ-al-card.is-paused .occ-al-facts {
	opacity: .75;
}

.occ-al-card-top {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 16px;
}

.occ-al-card-main {
	display: flex;
	flex-direction: column;
	gap: 8px;
	min-width: 0;
}

.occ-al-card-name {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px;
}

.occ-al .occ-al-card-title {
	margin: 0;
	font-size: 17px;
	font-weight: 600;
	line-height: 1.35;
	color: var(--occ-ui-text, #101828);
}

.occ-al .occ-al-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.occ-al .occ-al-chips li {
	display: inline-flex;
	align-items: center;
	min-height: 26px;
	margin: 0;
	padding: 0 10px;
	border-radius: 999px;
	background: var(--occ-ui-fill, #f2f4f7);
	font-size: 12px;
	line-height: 1.3;
	color: var(--occ-ui-text-2, #344054);
}

.occ-al .occ-al-facts {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 12px;
	margin: 0;
	padding: 12px 14px;
	border-radius: 10px;
	background: var(--occ-ui-fill-soft, #f9fafb);
}

.occ-al .occ-al-facts div {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}

.occ-al .occ-al-facts dt {
	margin: 0;
	font-size: 12px;
	font-weight: 400;
	color: var(--occ-ui-text-3, #475467);
}

.occ-al .occ-al-facts dd {
	margin: 0;
	font-size: 14px;
	font-weight: 500;
	color: var(--occ-ui-text, #101828);
}

.occ-al .occ-al-actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
}

.occ-al-spacer {
	flex: 1;
}

.occ-al .occ-al-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	min-height: 40px;
	padding: 0 14px;
	border: 1px solid var(--occ-ui-border, #d0d5dd);
	border-radius: 8px;
	background: var(--occ-ui-white, #fff);
	box-shadow: none;
	font-family: inherit;
	font-size: 14px;
	font-weight: 500;
	line-height: 1.2;
	color: var(--occ-ui-text-2, #344054);
	text-decoration: none;
	white-space: nowrap;
	cursor: pointer;
}

.occ-al .occ-al-btn:hover,
.occ-al .occ-al-btn:focus {
	background: var(--occ-ui-fill-soft, #f9fafb);
	color: var(--occ-ui-text, #101828);
	text-decoration: none;
}

.occ-al .occ-al-btn--primary,
.occ-al .occ-al-btn--primary:visited {
	border-color: var(--occ-ui-brand, #a41e32);
	background: var(--occ-ui-brand, #a41e32);
	color: #fff;
}

.occ-al .occ-al-btn--primary:hover,
.occ-al .occ-al-btn--primary:focus {
	border-color: var(--occ-ui-brand-hover, #7d1626);
	background: var(--occ-ui-brand-hover, #7d1626);
	color: #fff;
}

.occ-al .occ-al-btn--danger {
	border-color: var(--occ-ui-red-hover, #b42318);
	background: var(--occ-ui-red-hover, #b42318);
	color: #fff;
}

.occ-al .occ-al-btn--danger:hover,
.occ-al .occ-al-btn--danger:focus {
	background: #912018;
	color: #fff;
}

.occ-al .occ-al-btn--quiet {
	border-color: transparent;
	background: transparent;
	color: var(--occ-ui-red-text, #b42318);
}

.occ-al .occ-al-btn--quiet:hover,
.occ-al .occ-al-btn--quiet:focus {
	background: var(--occ-ui-red-soft, #fef3f2);
	color: var(--occ-ui-red-text, #b42318);
}

.occ-al .occ-al-btn:focus-visible,
.occ-al .occ-al-switch:focus-visible,
.occ-al .occ-al-link:focus-visible {
	outline: 3px solid var(--occ-ui-focus, #d5e3f6);
	outline-offset: 2px;
}

.occ-al .occ-al-inline {
	display: inline-flex;
	margin: 0;
}

.occ-al .occ-al-switch-form {
	flex: none;
	margin: 0;
}

.occ-al .occ-al-switch {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	min-height: 40px;
	padding: 0 4px;
	border: 0;
	background: transparent;
	box-shadow: none;
	font-family: inherit;
	font-size: 13px;
	color: var(--occ-ui-text-3, #475467);
	cursor: pointer;
}

.occ-al-switch-track {
	position: relative;
	display: inline-block;
	width: 40px;
	height: 22px;
	border-radius: 999px;
	background: var(--occ-ui-green, #067647);
	transition: background-color .15s;
}

.occ-al-switch-knob {
	position: absolute;
	top: 3px;
	left: 21px;
	width: 16px;
	height: 16px;
	border-radius: 50%;
	background: #fff;
	box-shadow: 0 1px 2px rgba(0, 0, 0, .2);
	transition: left .15s;
}

.occ-al-switch[aria-checked="false"] .occ-al-switch-track {
	background: var(--occ-ui-border, #d0d5dd);
}

.occ-al-switch[aria-checked="false"] .occ-al-switch-knob {
	left: 3px;
}

.occ-al .occ-al-notice,
.occ-al .occ-al-confirm {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 10px 14px;
	padding: 10px 14px;
	border-radius: 10px;
	font-size: 14px;
	line-height: 1.5;
}

.occ-al .occ-al-notice {
	background: var(--occ-ui-navy, #1e3a5f);
	color: #fff;
}

.occ-al .occ-al-notice--bad,
.occ-al .occ-al-confirm {
	background: var(--occ-ui-red-soft, #fef3f2);
	border: 1px solid var(--occ-ui-red-line, #fecdca);
	color: var(--occ-ui-red-text, #b42318);
}

.occ-al .occ-al-link {
	padding: 0;
	border: 0;
	background: transparent;
	font: inherit;
	font-weight: 600;
	color: inherit;
	text-decoration: underline;
	cursor: pointer;
}

.occ-al .occ-al-foot {
	margin: 0;
	font-size: 13px;
	color: var(--occ-ui-text-3, #475467);
}

.occ-al .occ-al-back {
	margin: 0;
	font-size: 14px;
}

.occ-al .occ-al-back a {
	color: var(--occ-ui-blue, #2f5d95);
}

/* ------------------------------------------------------------ the form */

.occ-al-edit {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	gap: 20px;
}

.occ-al-edit .occ-al-form {
	flex: 999 1 520px;
	min-width: 0;
	gap: 20px;
}

.occ-al-side {
	flex: 1 1 260px;
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.occ-al .occ-al-form-head {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.occ-al .occ-al-group,
.occ-al .occ-al-sub {
	display: flex;
	flex-direction: column;
	gap: 12px;
	min-width: 0;
	margin: 0;
	padding: 16px 0 0;
	border: 0;
	border-top: 1px solid var(--occ-ui-line-soft, #eaecf0);
}

.occ-al .occ-al-sub {
	padding-top: 4px;
	border-top: 0;
}

.occ-al .occ-al-group > legend,
.occ-al .occ-al-legend {
	float: left;
	width: 100%;
	margin: 0 0 4px;
	padding: 0;
	font-size: 15px;
	font-weight: 600;
	color: var(--occ-ui-text, #101828);
}

.occ-al .occ-al-sub > legend {
	float: left;
	width: 100%;
	margin: 0 0 2px;
	padding: 0;
	font-size: 14px;
	font-weight: 500;
	color: var(--occ-ui-text-2, #344054);
}

.occ-al .occ-al-group > legend + *,
.occ-al .occ-al-sub > legend + * {
	clear: both;
}

.occ-al .occ-al-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 16px;
}

.occ-al .occ-al-field {
	display: flex;
	flex-direction: column;
	gap: 6px;
	min-width: 0;
}

.occ-al .occ-al-field label {
	margin: 0;
	font-size: 14px;
	font-weight: 500;
	color: var(--occ-ui-text-2, #344054);
}

.occ-al .occ-al-field input,
.occ-al .occ-al-field select {
	box-sizing: border-box;
	width: 100%;
	height: var(--occ-ui-field-h, 44px);
	margin: 0;
	padding: 0 12px;
	border: 1px solid var(--occ-ui-field-border, #d0d5dd);
	border-radius: var(--occ-ui-field-radius, 8px);
	background: var(--occ-ui-field-bg, #fff);
	box-shadow: none;
	font-family: inherit;
	font-size: 14px;
	color: var(--occ-ui-field-text, #101828);
}

.occ-al .occ-al-field input:focus,
.occ-al .occ-al-field select:focus {
	outline: none;
	border-color: var(--occ-ui-focus-ring, #2f5d95);
	box-shadow: var(--occ-ui-field-focus, 0 0 0 3px #d5e3f6);
}

.occ-al .occ-al-help {
	font-size: 12px;
	line-height: 1.5;
	color: var(--occ-ui-text-3, #475467);
}

.occ-al .occ-al-pills,
.occ-al .occ-al-seg {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.occ-al .occ-al-pill,
.occ-al .occ-al-seg-item {
	position: relative;
	display: inline-flex;
	margin: 0;
	cursor: pointer;
}

.occ-al .occ-al-pill input,
.occ-al .occ-al-seg-item input {
	position: absolute;
	opacity: 0;
	width: 1px;
	height: 1px;
}

.occ-al .occ-al-pill span,
.occ-al .occ-al-seg-item span {
	display: inline-flex;
	align-items: center;
	min-height: 36px;
	padding: 0 14px;
	border: 1px solid var(--occ-ui-border, #d0d5dd);
	border-radius: 999px;
	background: var(--occ-ui-white, #fff);
	font-size: 13px;
	color: var(--occ-ui-text-2, #344054);
}

.occ-al .occ-al-seg-item span {
	border-radius: 10px;
	min-height: 40px;
	font-size: 14px;
}

.occ-al .occ-al-pill input:checked + span,
.occ-al .occ-al-seg-item input:checked + span {
	border-color: var(--occ-ui-chosen-line, #2f5d95);
	background: var(--occ-ui-chosen-bg, #eef4fb);
	color: var(--occ-ui-chosen-text, #1e3a5f);
	font-weight: 600;
}

.occ-al .occ-al-pill input:focus-visible + span,
.occ-al .occ-al-seg-item input:focus-visible + span {
	outline: 3px solid var(--occ-ui-focus, #d5e3f6);
	outline-offset: 2px;
}

.occ-al .occ-al-eyebrow {
	font-size: 12px;
	font-weight: 600;
	letter-spacing: .04em;
	text-transform: uppercase;
	color: var(--occ-ui-text-3, #475467);
}

.occ-al .occ-al-big {
	margin: 0;
	font-size: 22px;
	font-weight: 600;
	color: var(--occ-ui-text, #101828);
}

@media (max-width: 767px) {
	.occ-al .occ-al-facts,
	.occ-al .occ-al-grid {
		grid-template-columns: minmax(0, 1fr);
	}

	.occ-al-card-top {
		flex-direction: column;
	}
}

/* ------------------------------------------------------------------ */
/* Save as alert, beside the results (board 3, build c)               */
/* ------------------------------------------------------------------ */

.occ-al.occ-al-save {
	display: inline-block;
	position: relative;
	gap: 0;
	vertical-align: middle;
	text-align: left;
}

.occ-bc > .occ-al-save {
	display: block;
	margin: 0 0 16px;
}

.occ-al-save .occ-al-save-panel {
	position: absolute;
	z-index: 50;
	top: calc(100% + 8px);
	right: 0;
	box-sizing: border-box;
	width: 400px;
	max-width: calc(100vw - 32px);
	padding: 20px;
	display: flex;
	flex-direction: column;
	gap: 14px;
	border-radius: 12px;
	background: var(--occ-ui-white, #fff);
	box-shadow: 0 12px 32px rgba(16, 24, 40, .18), 0 2px 6px rgba(16, 24, 40, .08);
}

.occ-bc > .occ-al-save .occ-al-save-panel {
	right: auto;
	left: 0;
}

.occ-al-save .occ-al-save-panel[hidden] {
	display: none !important;
}

.occ-al-save .occ-al-save-title {
	margin: 0;
	font-size: 17px;
	font-weight: 600;
	line-height: 1.3;
	color: var(--occ-ui-text, #101828);
}

.occ-al-save .occ-al-save-note {
	margin: 8px 0 0;
	padding: 8px 12px;
	border-radius: 8px;
	background: var(--occ-ui-navy, #1e3a5f);
	color: #fff;
	font-size: 13px;
	line-height: 1.5;
}

.occ-al-save .occ-al-save-note a {
	color: #fff;
	font-weight: 600;
	text-decoration: underline;
}

.occ-al-save .occ-al-save-note--bad {
	border: 1px solid var(--occ-ui-red-line, #fecdca);
	background: var(--occ-ui-red-soft, #fef3f2);
	color: var(--occ-ui-red-text, #b42318);
}

@media (max-width: 600px) {
	.occ-al.occ-al-save {
		display: block;
		margin: 8px 0;
	}

	.occ-al-save .occ-al-save-panel {
		position: static;
		width: auto;
		max-width: none;
		margin-top: 8px;
	}
}
