/* IBAM Careers. Inherits fonts and colours from the theme; override via the custom properties. */
.ibam-jobs,
.ibam-modal,
.ibam-job-facts {
	--ibam-accent: var(--e-global-color-accent, #1d4ed8);
	--ibam-text: var(--e-global-color-text, #1f2933);
	--ibam-muted: #64748b;
	--ibam-border: #d9dee5;
	--ibam-radius: 10px;
}

.ibam-btn {
	display: inline-block;
	padding: 0.7em 1.4em;
	border: 2px solid var(--ibam-accent);
	border-radius: 999px;
	background: var(--ibam-accent);
	color: #fff;
	font: inherit;
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none;
	cursor: pointer;
	transition: opacity 0.15s;
}
.ibam-btn:hover,
.ibam-btn:focus-visible { opacity: 0.88; color: #fff; }
.ibam-btn--ghost { background: transparent; color: var(--ibam-accent); }
.ibam-btn--ghost:hover,
.ibam-btn--ghost:focus-visible { background: var(--ibam-accent); color: #fff; opacity: 1; }
.ibam-btn--disabled { background: #e5e7eb; border-color: #e5e7eb; color: var(--ibam-muted); cursor: not-allowed; }
.ibam-btn[disabled] { opacity: 0.6; cursor: progress; }

/* Visually hidden, still read by screen readers */
.ibam-sr { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* Filter bar */
.ibam-jobs__filters {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	align-items: center;
	margin-bottom: 20px;
}
.ibam-jobs__field { flex: 1 1 150px; min-width: 0; }
.ibam-jobs__field--search { flex: 2 1 240px; }
.ibam-jobs__field input,
.ibam-jobs__field select { width: 100%; min-height: 46px; margin: 0; }
.ibam-jobs__actions { display: flex; align-items: center; gap: 14px; }
.ibam-jobs__actions .ibam-btn { min-height: 46px; padding-block: 0; }
.ibam-jobs__reset { color: var(--ibam-muted); white-space: nowrap; }
.ibam-jobs__count { margin: 0 0 6px; color: var(--ibam-muted); font-size: 0.92em; }
.ibam-jobs__empty { padding: 28px 0; border-top: 1px solid var(--ibam-border); border-bottom: 1px solid var(--ibam-border); text-align: center; }

/* Job rows: Role | Location | Type | Deadline | arrow */
.ibam-jobs__head,
.ibam-job {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 150px 150px 130px 28px;
	column-gap: 20px;
	align-items: center;
}
.ibam-jobs__head {
	padding: 10px 14px;
	border-bottom: 2px solid var(--ibam-text);
	color: var(--ibam-muted);
	font-size: 0.75em;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}
.ibam-jobs__head span:nth-child(4) { grid-column: 4 / 6; }
.ibam-jobs__list { margin: 0; padding: 0; list-style: none; }
.ibam-job {
	position: relative;
	padding: 18px 14px;
	border-bottom: 1px solid var(--ibam-border);
	transition: background-color 0.15s;
}
.ibam-job:hover,
.ibam-job:focus-within { background: rgba(0, 0, 0, 0.035); }
.ibam-job > p { margin: 0; }
.ibam-jobs .ibam-job__title { margin: 0; font-size: 1.15rem; font-weight: 600; letter-spacing: 0; line-height: 1.3; text-transform: none; }
.ibam-job__title a { color: inherit; text-decoration: none; }
.ibam-job__title a::after { content: ''; position: absolute; inset: 0; } /* whole row is the link */
.ibam-job__title a:focus-visible { outline: none; }
.ibam-job__title a:focus-visible::after { outline: 3px solid var(--ibam-accent); outline-offset: -3px; border-radius: 4px; }
.ibam-job__dept { margin: 3px 0 0; color: var(--ibam-muted); font-size: 0.88em; }
.ibam-job__loc,
.ibam-job__type { font-size: 0.95em; }
.ibam-job__salary { display: block; color: var(--ibam-muted); font-size: 0.88em; }
.ibam-job__when { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; font-size: 0.95em; }
.ibam-job__urgent { padding: 1px 8px; border-radius: 999px; background: #fee2e2; color: #b91c1c; font-size: 0.8em; font-weight: 700; }
.ibam-job__arrow { color: var(--ibam-accent); font-size: 1.3em; transition: transform 0.15s; }
.ibam-job:hover .ibam-job__arrow { transform: translateX(4px); }
.ibam-jobs__pagination { margin-top: 24px; text-align: center; }
.ibam-jobs__pagination .page-numbers { display: inline-block; margin: 0 2px; padding: 6px 12px; border: 1px solid var(--ibam-border); border-radius: 6px; text-decoration: none; }
.ibam-jobs__pagination .current { background: var(--ibam-accent); border-color: var(--ibam-accent); color: #fff; }

@media (max-width: 860px) {
	.ibam-jobs__head { display: none; }
	.ibam-job { display: flex; flex-wrap: wrap; gap: 4px 14px; padding: 16px 40px 16px 8px; }
	.ibam-job__main { flex: 1 0 100%; }
	.ibam-job__loc:empty,
	.ibam-job__type:empty { display: none; }
	.ibam-job__loc,
	.ibam-job__type,
	.ibam-job__when { color: var(--ibam-muted); font-size: 0.88em; }
	.ibam-job__when { flex-direction: row; align-items: center; gap: 8px; }
	.ibam-job__salary { display: inline; margin-left: 6px; }
	.ibam-job__arrow { position: absolute; top: 18px; right: 10px; }
}

/* Fallback fact list on single job pages */
.ibam-job-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin: 0 0 20px; }
.ibam-job-facts dt { color: var(--ibam-muted); font-size: 0.8em; text-transform: uppercase; }
.ibam-job-facts dd { margin: 0; font-weight: 600; }

/* Popup */
.ibam-modal[hidden] { display: none; }
.ibam-modal { position: fixed; inset: 0; z-index: 100000; display: flex; align-items: center; justify-content: center; padding: 16px; }
.ibam-modal__backdrop { position: absolute; inset: 0; background: rgba(15, 23, 42, 0.6); }
.ibam-modal__panel {
	position: relative;
	width: 100%;
	max-width: 520px;
	max-height: calc(100vh - 32px);
	overflow-y: auto;
	padding: 28px;
	border-radius: 14px;
	background: #fff;
	color: var(--ibam-text);
	box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3);
}
.ibam-modal__panel:focus { outline: none; }
.ibam-modal__panel h2 { margin: 0 32px 16px 0; font-size: 1.35em; }
.ibam-modal .ibam-modal__close { position: absolute; top: 10px; right: 12px; width: auto; height: auto; padding: 4px 10px; border: 0; border-radius: 6px; background: transparent; box-shadow: none; color: var(--ibam-muted); font-size: 28px; line-height: 1; cursor: pointer; }
.ibam-modal .ibam-modal__close:hover,
.ibam-modal .ibam-modal__close:focus-visible { background: #eef1f4; color: var(--ibam-text); }
body.ibam-modal-open { overflow: hidden; }

.ibam-form__row { margin-bottom: 14px; }
.ibam-form__row label { display: block; margin-bottom: 4px; font-weight: 600; font-size: 0.92em; }
.ibam-form__row input { width: 100%; min-height: 44px; }
.ibam-form__row.has-error input { border-color: #b91c1c; }
.ibam-form__error { min-height: 0; margin: 4px 0 0; color: #b91c1c; font-size: 0.85em; }
.ibam-form__hint { color: var(--ibam-muted); font-size: 0.85em; }
.ibam-form__message { margin: 0 0 12px; font-weight: 600; }
.ibam-form__message.is-error { color: #b91c1c; }
.ibam-form__message.is-success { color: #166534; }
.ibam-form__trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

@media (max-width: 480px) {
	.ibam-modal__panel { padding: 22px 18px; }
}
@media (prefers-reduced-motion: no-preference) {
	.ibam-modal__panel { animation: ibam-pop 0.18s ease-out; }
	@keyframes ibam-pop { from { opacity: 0; transform: translateY(10px); } }
}
