/**
 * Campos de formulário alinhados ao Jobick (form-element.html: .form-control.solid, labels em negrito).
 * Escopo deliberado: painel (#main-wrapper), login (body.fix-wrapper), páginas só com Bootstrap (body.painel-forms-standalone).
 */

/* ---- Rótulos (equivalente a .form-label.font-w600 no template) ---- */
/* Modais ficam fora de #main-wrapper neste projeto */
#main-wrapper .content-body .card-body label:not(.form-check-label):not(.btn):not(.rebanho-toggle),
body .modal label:not(.form-check-label):not(.btn):not(.rebanho-toggle),
#main-wrapper .content-body .card-body .form-label,
body.fix-wrapper label.form-label,
body.fix-wrapper .card-body label:not(.form-check-label):not(.rebanho-toggle),
body.painel-forms-standalone label.form-label,
body.painel-forms-standalone .card-body label:not(.form-check-label):not(.rebanho-toggle) {
	font-weight: 600;
	margin-bottom: 0.35rem;
	display: inline-block;
	color: var(--text-dark, #212529);
}

/* ---- Campos tipo "solid" (tema admin: variáveis Jobick) ---- */
body .modal .form-control:not(.form-control-plaintext):not(.form-control-sm):not(.form-control-lg):not([type="hidden"]):not([type="checkbox"]):not([type="radio"]):not([type="file"]),
body .modal textarea.form-control:not(.form-control-sm):not(.form-control-lg),
#main-wrapper .content-body .card-body .form-control:not(.form-control-plaintext):not(.form-control-sm):not(.form-control-lg):not([type="hidden"]):not([type="checkbox"]):not([type="radio"]):not([type="file"]),
#main-wrapper .content-body .card-body textarea.form-control:not(.form-control-sm):not(.form-control-lg),
body.fix-wrapper .card-body .form-control:not(.form-control-plaintext):not(.form-control-sm):not(.form-control-lg):not([type="hidden"]):not([type="checkbox"]):not([type="radio"]):not([type="file"]),
body.fix-wrapper .modal-body .form-control:not(.form-control-plaintext):not(.form-control-sm):not(.form-control-lg):not([type="hidden"]):not([type="checkbox"]):not([type="radio"]):not([type="file"]) {
	background-color: var(--light, #f4f6f9) !important;
	border: 1px solid var(--light, #eff2f7) !important;
}

body .modal .form-control:focus,
body .modal textarea.form-control:focus,
#main-wrapper .content-body .card-body .form-control:focus,
#main-wrapper .content-body .card-body textarea.form-control:focus,
body.fix-wrapper .card-body .form-control:focus,
body.fix-wrapper .modal-body .form-control:focus {
	background-color: var(--light, #f4f6f9) !important;
	border-color: var(--rgba-primary-5, #886cc0) !important;
	box-shadow: none;
	color: var(--text-dark, #212529);
}

body .modal .form-control:hover,
#main-wrapper .content-body .card-body .form-control:hover,
body .modal textarea.form-control:hover,
#main-wrapper .content-body .card-body textarea.form-control:hover,
body.fix-wrapper .card-body .form-control:hover {
	background-color: var(--light, #f4f6f9) !important;
}

/* Select nativo Bootstrap 5 */
body .modal .form-select:not(.form-select-sm):not(.form-select-lg),
#main-wrapper .content-body .card-body .form-select:not(.form-select-sm):not(.form-select-lg),
body.fix-wrapper .card-body .form-select:not(.form-select-sm):not(.form-select-lg),
body.fix-wrapper .modal-body .form-select:not(.form-select-sm):not(.form-select-lg) {
	background-color: var(--light, #f4f6f9);
	border: 1px solid var(--light, #eff2f7);
	min-height: 2.85rem;
	border-radius: 0.5rem;
	padding-left: 1.25rem;
	color: var(--text-dark, #212529);
}

body .modal .form-select:focus,
#main-wrapper .content-body .card-body .form-select:focus,
body.fix-wrapper .modal-body .form-select:focus,
body.fix-wrapper .card-body .form-select:focus {
	border-color: var(--rgba-primary-5, #886cc0);
	box-shadow: none;
	background-color: var(--light, #f4f6f9);
}

@media only screen and (max-width: 1480px) {
	body .modal .form-select:not(.form-select-sm):not(.form-select-lg),
	#main-wrapper .content-body .card-body .form-select:not(.form-select-sm):not(.form-select-lg) {
		min-height: 2.8rem;
	}
}

#main-wrapper .content-body .card-body .dataTables_wrapper .dataTables_filter input {
	background-color: var(--card, #fff);
	border: 1px solid var(--border, #e6e6e6);
	min-height: auto;
}

/* ---- Páginas só com Bootstrap CDN (sem variáveis do tema): cadastro público, rel/index, etc. ---- */
body.painel-forms-standalone .form-control:not(.form-control-plaintext):not(.form-control-sm):not(.form-control-lg):not([type="hidden"]):not([type="checkbox"]):not([type="radio"]):not([type="file"]),
body.painel-forms-standalone textarea.form-control:not(.form-control-sm):not(.form-control-lg),
body.painel-forms-standalone .form-select:not(.form-select-sm):not(.form-select-lg) {
	background-color: #f8f9fa;
	border: 1px solid #e9ecef;
	border-radius: 0.5rem;
	min-height: 2.85rem;
	color: #212529;
}

body.painel-forms-standalone .form-control:focus,
body.painel-forms-standalone textarea.form-control:focus,
body.painel-forms-standalone .form-select:focus {
	border-color: #886cc0;
	box-shadow: none;
	background-color: #f8f9fa;
}

/* Select2 — alinhar visual ao campo solid (altura e borda suaves) */
#main-wrapper .content-body .card-body .select2-container--default .select2-selection--single,
body .modal .select2-container--default .select2-selection--single {
	background-color: var(--light, #f4f6f9);
	border: 1px solid var(--light, #eff2f7) !important;
	border-radius: 0.5rem;
	min-height: 2.85rem;
	padding: 0.2rem 0.5rem;
}

#main-wrapper .content-body .card-body .select2-container--default .select2-selection--single .select2-selection__rendered,
body .modal .select2-container--default .select2-selection--single .select2-selection__rendered {
	line-height: 2.35rem;
	padding-left: 0.5rem;
	color: var(--text-dark, #212529);
}

#main-wrapper .content-body .card-body .select2-container--default .select2-selection--single .select2-selection__arrow,
body .modal .select2-container--default .select2-selection--single .select2-selection__arrow {
	height: 2.65rem;
}

#main-wrapper .content-body .card-body .select2-container--default.select2-container--focus .select2-selection--single,
#main-wrapper .content-body .card-body .select2-container--default.select2-container--open .select2-selection--single,
body .modal .select2-container--default.select2-container--focus .select2-selection--single,
body .modal .select2-container--default.select2-container--open .select2-selection--single {
	border-color: var(--rgba-primary-5, #886cc0) !important;
}

@media only screen and (max-width: 1480px) {
	#main-wrapper .content-body .card-body .select2-container--default .select2-selection--single,
	body .modal .select2-container--default .select2-selection--single {
		min-height: 2.8rem;
	}
}

/* ---- Modal Config: upload de logos (img/) — cards alinhados ---- */
#modalConfig .config-upload-intro {
	margin-bottom: 1rem;
	line-height: 1.5;
}

#modalConfig .config-upload-grid .config-upload-card {
	border: 1px solid var(--light, #eff2f7);
	border-radius: 0.5rem;
	background: var(--body-bg, #fff);
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

#modalConfig .config-upload-grid .config-upload-card .form-label {
	display: block;
	margin-bottom: 0.4rem;
	line-height: 1.35;
}

#modalConfig .config-upload-grid .config-upload-card .form-control[type="file"] {
	width: 100%;
	padding: 0.5rem 0.75rem;
	border-radius: 0.5rem;
	background-color: var(--light, #f4f6f9) !important;
	border: 1px solid var(--light, #eff2f7) !important;
	min-height: 2.85rem;
	font-size: inherit;
	line-height: 1.5;
}

#modalConfig .config-upload-grid .config-upload-card .form-control[type="file"]:focus {
	border-color: var(--rgba-primary-5, #886cc0) !important;
	box-shadow: none;
	outline: none;
}

#modalConfig .config-upload-grid .config-upload-hint {
	font-size: 0.8125rem;
	line-height: 1.45;
	margin-bottom: 0;
}

#modalConfig .config-upload-grid .config-upload-preview {
	flex: 1 1 auto;
	min-height: 5.5rem;
	background: #fff;
	border: 1px solid var(--light, #eff2f7);
	border-radius: 0.5rem;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0.75rem;
}

#modalConfig .config-upload-grid .config-upload-preview img {
	display: block;
	max-height: 3rem;
	max-width: 100%;
	width: auto;
	height: auto;
	object-fit: contain;
}

#modalConfig .config-upload-grid .config-upload-preview img#target-icone {
	max-height: 2.5rem;
	max-width: 2.5rem;
}

#modalConfig .config-upload-grid .config-upload-preview img.logo-login-preview {
	max-height: 4.35rem;
}

/* Logo no cartão de login (layout Jobick / fix-wrapper): bloco maior que a faixa do menu */
body.fix-wrapper .auth-brand-block {
	margin-bottom: 1.375rem !important;
}

body.fix-wrapper img.logo-auth.logo-auth--jobick-login {
	display: inline-block;
	width: auto;
	max-width: min(22rem, 100%);
	max-height: 5.75rem;
	height: auto;
	object-fit: contain;
	vertical-align: middle;
}

@media only screen and (max-width: 35.9375rem) {
	body.fix-wrapper img.logo-auth.logo-auth--jobick-login {
		max-width: min(17.5rem, 100%);
		max-height: 4.5rem;
	}
}

/* ---- Modal Config: blocos por secção ---- */
#modalConfig .config-modal-pane {
	border: 1px solid var(--light, #eff2f7);
	border-radius: 0.5rem;
	background-color: rgba(248, 250, 252, 0.65);
	padding: 1.1rem 1.25rem;
	margin-bottom: 1rem;
}

#modalConfig .config-modal-pane-title {
	font-size: 0.875rem;
	font-weight: 600;
	color: var(--text-dark, #212529);
	margin-bottom: 0.875rem;
	letter-spacing: 0.01em;
	line-height: 1.35;
}

#modalConfig .config-upload-grid .section-imagens-heading {
	font-size: 0.875rem;
	font-weight: 600;
	color: var(--text-dark, #212529);
	margin-bottom: 0.5rem;
	line-height: 1.35;
}

/* ---- Modais Jobick (Bootstrap 5): canto, sombra, títulos, fechar ---- */
body .modal .modal-content {
	border: none;
	border-radius: 0.5rem;
	overflow: hidden;
	box-shadow: 0 0.5rem 1.25rem rgba(0, 0, 0, 0.08);
}

/* Legado: inner &times; dentro de .btn-close duplicava o ícone do BS5 */
body .modal .btn-close > * {
	display: none !important;
}

body .modal .modal-header {
	align-items: center;
	padding-top: 1.1rem;
	padding-bottom: 1rem;
}

body .modal .modal-header .modal-title {
	font-weight: 600;
	line-height: 1.35;
}

body .modal .modal-header.bg-primary .modal-title {
	color: #fff;
}

body .modal .modal-header:not(.bg-primary) {
	border-bottom: 1px solid var(--light, #eff2f7);
}

/* Ícone + texto alinhados em botões primários dentro de modais */
body .modal .btn.btn-primary {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.4rem;
}
