/**
 * Estilos públicos — listagem de vagas Banco de Oportunidades OAB Londrina.
 *
 * @since 1.0.0
 */

/* ── Variáveis ──────────────────────────────────────────────────────────────── */
.oab-vagas-container {
	--oab-blue:        #082f91;
	--oab-blue-mid:    #2ea3f2;
	--oab-blue-light:  #E6F1FB;
	--oab-green-bg:    #EAF3DE;
	--oab-green-text:  #27500A;
	--oab-amber-bg:    #FAEEDA;
	--oab-amber-text:  #633806;
	--oab-red-bg:      #FCEBEB;
	--oab-red-text:    #501313;
	--oab-teal-bg:     #E1F5EE;
	--oab-teal-text:   #085041;
	--oab-rule:        #e0e0e0;
	--oab-ink:         #1a1a1a;
	--oab-ink-mid:     #444;
	--oab-ink-light:   #6b6b6b;
	--oab-surface:     #f8f7f5;
	--oab-radius:      8px;
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
	color: var(--oab-ink);
}

/* ── Filtros ────────────────────────────────────────────────────────────────── */
.oab-filters {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	align-items: flex-end;
	margin-bottom: 24px;
	padding: 20px;
	background: var(--oab-blue);	border: 1px solid var(--oab-rule);
	border-radius: var(--oab-radius);
}

.oab-filter-group {
	display: flex;
	flex-direction: column;
	gap: 4px;
	flex: 1 1 160px;
	min-width: 140px;
}

.oab-filter-search-group { flex: 2 1 220px; }
.oab-filter-reset-group  { flex: 0 0 auto; min-width: auto; }

.oab-filter-label {
	font-size: 11px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: .06em;
	color: var(--oab-surface);
}

.oab-filter-select,
.oab-filter-input {
	padding: 8px 10px;
	font-size: 14px;
	border: 1px solid var(--oab-rule);
	border-radius: 5px;
	background: #fff;
	color: var(--oab-ink);
	outline: none;
	transition: border-color .15s;
}

.oab-filter-select:focus,
.oab-filter-input:focus {
	border-color: var(--oab-blue-mid);
	box-shadow: 0 0 0 2px var(--oab-blue-light);
}

.oab-btn-reset {
	padding: 9px 16px;
	font-size: 13px;
	border: 1px solid var(--oab-blue-mid);
	border-radius: 5px;
	background: var(--oab-blue-mid);
	color: var(--oab-surface);
	cursor: pointer;
	white-space: nowrap;
	transition: all .15s;
	text-transform: uppercase;
}

.oab-btn-reset:hover {
	border-color: var(--oab-blue-mid);
	color: var(--oab-blue);
}

/* ── Resultado ──────────────────────────────────────────────────────────────── */
.oab-results-info {
	font-size: 13px;
	color: var(--oab-ink-light);
	margin-bottom: 16px;
}

.oab-results-info strong { color: var(--oab-ink); }

/* ── Grid ───────────────────────────────────────────────────────────────────── */
.oab-vagas-grid {
	display: grid;
	grid-template-columns: repeat( auto-fill, minmax( 300px, 1fr ) );
	gap: 20px;
	transition: opacity .2s;
}

.oab-no-results {
	grid-column: 1 / -1;
	padding: 40px 24px;
	text-align: center;
	color: var(--oab-ink-light);
	font-size: 15px;
	background: var(--oab-surface);
	border-radius: var(--oab-radius);
	border: 1px dashed var(--oab-rule);
}

/* ── Card ───────────────────────────────────────────────────────────────────── */
.oab-card {
	background: #fff;
	border: 1px solid var(--oab-rule);
	border-radius: var(--oab-radius);
	padding: 20px;
	display: flex;
	flex-direction: column;
	gap: 10px;
	transition: box-shadow .2s, border-color .2s;
}

.oab-card:hover {
	box-shadow: 0 4px 16px rgba(12, 68, 124, .1);
	border-color: #c0d4ec;
}

.oab-card--urgente {
	border-left: 3px solid #EF9F27;
}

.oab-card__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	flex-wrap: wrap;
}

.oab-card__title {
	font-size: 16px;
	font-weight: 600;
	color: var(--oab-blue);
	line-height: 1.35;
	margin: 0;
}

.oab-card__escritorio {
	font-size: 13px;
	color: var(--oab-ink-mid);
	margin: 0;
}

.oab-card__meta {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 2px 0;
}

.oab-card__meta-item {
	font-size: 12px;
	color: var(--oab-ink-light);
	display: flex;
	align-items: center;
	gap: 4px;
}

.oab-card__prazo {
	font-size: 11px;
	color: var(--oab-ink-light);
	white-space: nowrap;
}

.oab-card__prazo--urgente {
	color: #633806;
	font-weight: 600;
}

/* ── Tags ───────────────────────────────────────────────────────────────────── */
.oab-tag {
	display: inline-flex;
	padding: 3px 10px;
	border-radius: 20px;
	font-size: 11px;
	font-weight: 600;
	white-space: nowrap;
}

.oab-tag--tipo {
	background: var(--oab-teal-bg);
	color: var(--oab-teal-text);
}

/* ── Conteúdo expandível ────────────────────────────────────────────────────── */
.oab-card__expand {
	border-top: 1px solid var(--oab-rule);
	padding-top: 14px;
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.oab-card__expand[hidden] { display: none; }

.oab-card__section-title {
	font-size: 11px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: .07em;
	color: var(--oab-ink-light);
	margin: 0 0 2px;
}

.oab-card__section-body {
	font-size: 13px;
	color: var(--oab-ink-mid);
	line-height: 1.7;
}

.oab-card__contact-notice {
	background: var(--oab-blue-light);
	border-left: 3px solid var(--oab-blue-mid);
	border-radius: 4px;
	padding: 10px 14px;
	font-size: 13px;
	color: var(--oab-blue);
	line-height: 1.6;
}

/* ── Botão toggle ───────────────────────────────────────────────────────────── */
.oab-card__toggle {
	margin-top: auto;
	padding: 8px 0;
	background: none;
	border: none;
	border-top: 1px solid var(--oab-rule);
	font-size: 13px;
	color: var(--oab-blue-mid);
	cursor: pointer;
	text-align: left;
	display: flex;
	align-items: center;
	gap: 6px;
	transition: color .15s;
}

.oab-card__toggle:hover { color: var(--oab-blue); }

.oab-card__toggle-icon {
	font-size: 10px;
	transition: transform .2s;
}

/* ── Loading ────────────────────────────────────────────────────────────────── */
.oab-loading {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	padding: 20px;
	font-size: 14px;
	color: var(--oab-ink-light);
}

.oab-loading[aria-hidden="true"] { display: none; }

.oab-loading-spinner {
	display: inline-block;
	width: 18px;
	height: 18px;
	border: 2px solid var(--oab-blue-light);
	border-top-color: var(--oab-blue-mid);
	border-radius: 50%;
	animation: oab-spin .7s linear infinite;
}

@keyframes oab-spin { to { transform: rotate(360deg); } }

/* ── Carregar mais ──────────────────────────────────────────────────────────── */
.oab-load-more-wrap {
	text-align: center;
	margin-top: 28px;
}

.oab-btn-load-more {
	padding: 12px 32px;
	background: var(--oab-blue);
	color: #fff;
	border: none;
	border-radius: 6px;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	transition: background .15s;
}

.oab-btn-load-more:hover    { background: var(--oab-blue-mid); }
.oab-btn-load-more:disabled { opacity: .6; cursor: wait; }

/* ── Nota de intermediação ──────────────────────────────────────────────────── */
.oab-intermediacao-notice {
	margin-top: 32px;
	padding: 20px !important;
	background: var(--oab-surface);
	border: 1px solid var(--oab-rule);
	border-radius: var(--oab-radius);
	font-size: 13px;
	color: var(--oab-ink-light);
	line-height: 1.65;
}

/* ── Responsivo ─────────────────────────────────────────────────────────────── */
@media ( max-width: 640px ) {
	.oab-vagas-grid { grid-template-columns: 1fr; }
	.oab-filters    { flex-direction: column; }
	.oab-filter-group { flex: 1 1 100%; min-width: 100%;}
}

/* ── Modal de detalhes de vaga ───────────────────────────────────────────── */
body.oab-modal-open { overflow: hidden; }

.oab-modal {
	position: fixed;
	inset: 0;
	z-index: 9999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
}
.oab-modal[hidden] { display: none; }

.oab-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, .55);
	cursor: pointer;
}

.oab-modal__dialog {
	position: relative;
	z-index: 1;
	background: #fff;
	border-radius: 12px;
	width: 100%;
	max-width: 680px;
	max-height: 88vh;
	overflow-y: auto;
	padding: 32px 32px 28px;
	box-shadow: 0 24px 64px rgba(0, 0, 0, .22);
	overscroll-behavior: contain;
}

.oab-modal__close {
	position: sticky;
	top: 0;
	float: right;
	margin: -8px -8px 8px 12px;
	background: none;
	border: none;
	font-size: 18px;
	line-height: 1;
	color: var(--oab-ink-light);
	cursor: pointer;
	padding: 6px 8px;
	border-radius: 6px;
	transition: background .15s, color .15s;
}
.oab-modal__close:hover {
	background: var(--oab-surface);
	color: var(--oab-ink);
}

.oab-modal__head {
	margin-bottom: 12px;
	padding-bottom: 14px;
	border-bottom: 1px solid var(--oab-rule);
}

.oab-modal__tags { margin-bottom: 10px; }

.oab-modal__titulo {
	font-size: 20px;
	font-weight: 700;
	color: var(--oab-blue);
	margin: 0 0 4px;
	line-height: 1.3;
}

.oab-modal__escritorio {
	font-size: 13px;
	color: var(--oab-ink-mid);
	margin: 0 0 10px;
}

.oab-modal__meta {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

/* Corpo do modal reutiliza classes do card */
.oab-modal__body .oab-card__section        { margin-bottom: 20px; }
.oab-modal__body .oab-card__section:last-child { margin-bottom: 0; }

/* Botão de candidatura dentro do modal */
.oab-modal__body .oab-cand-wrap { margin-top: 20px; }

@media ( max-width: 640px ) {
	.oab-modal {
		padding: 0;
		align-items: flex-end;
	}
	.oab-modal__dialog {
		max-height: 92vh;
		border-radius: 16px 16px 0 0;
		padding: 24px 20px 32px;
	}
}

button.oab-btn.oab-btn--disabled {
	cursor: not-allowed;
    border-radius: 50px;
    padding: 10px 20px;
}
.oab-candidatura-wrap{
	display: flex;
	justify-content: left;
	gap: 12px;
}
.oab-candidatura-hint {
	font-size: 13px;
    border-radius: 50px;
    padding: 10px 20px;
    background: #2ea3f2;
}
.oab-candidatura-hint a{
	color: #fff;
	font-weight: 600;
	text-decoration: none;
}

/* ── Modal de confirmação de candidatura ─────────────────────────────────── */
.oab-modal--candidatura {
	z-index: 10000;
}

.oab-modal__overlay {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, .55);
}

.oab-modal__box {
	position: relative;
	z-index: 1;
	background: #fff;
	border-radius: 12px;
	width: 100%;
	max-width: 560px;
	max-height: 90vh;
	overflow-y: auto;
	padding: 32px 36px;
	box-shadow: 0 8px 32px rgba(0, 0, 0, .18);
}

.oab-modal__title {
	font-size: 18px;
	font-weight: 700;
	color: var(--oab-blue, #0C447C);
	margin: 0 0 20px;
}

.oab-modal__termo {
	background: #f5f5f5;
	border: 1px solid #ddd;
	border-radius: 6px;
	padding: 14px;
	max-height: 220px;
	overflow-y: auto;
	margin-bottom: 16px;
}

.oab-modal__termo-txt {
	white-space: pre-wrap;
	word-break: break-word;
	font-family: inherit;
	font-size: 13px;
	line-height: 1.6;
	color: #333;
	margin: 0;
}

.oab-modal__check {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 14px;
	cursor: pointer;
	margin-bottom: 12px;
}

.oab-modal__msg {
	min-height: 20px;
	font-size: 13px;
	color: #c0392b;
	margin-bottom: 8px;
}

.oab-modal__footer {
	display: flex;
	justify-content: flex-end;
	gap: 10px;
	margin-top: 20px;
	padding-top: 16px;
	border-top: 1px solid #eee;
}

@media (max-width: 640px) {
	.oab-modal--candidatura {
		padding: 0;
		align-items: flex-end;
	}
	.oab-modal__box {
		max-height: 92vh;
		border-radius: 16px 16px 0 0;
		padding: 24px 20px 32px;
	}
}
