/**
 * MNJ CV Builder — a szerkesztő felülete.
 * Az oldal arculatát követi: sötétkék #1e3063, zöld #37b777.
 */

/* A saját display szabályaink (flex, grid) erősebbek a böngésző [hidden]
   alapértelmezésénél, ezért a rejtést külön ki kell kényszeríteni —
   különben a modal és a részei nem tűnnének el. */
.mnj-cv-modal[hidden],
.mnj-cv-body[hidden],
.mnj-cv-foot[hidden],
.mnj-cv-pdfview[hidden],
.mnj-cv-trigger[hidden],
.mnj-cv-status[hidden],
.mnj-cv-step[hidden],
.mnj-cv-pdfview iframe[hidden] {
	display: none !important;
}

/* ---------- indító link és állapotsor ---------- */

.mnj-cv-trigger-wrap { margin: 12px 0 6px; }

.mnj-cv-trigger {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px 12px;
	font-size: 15px;
	line-height: 1.5;
}

.mnj-cv-trigger-intro { opacity: .9; }

/* ---------- gombok az űrlapon ----------
   Az űrlap zöld hátteren, fehér szöveggel áll, a téma pedig minden linket
   kékre színez — ezért a színt és az aláhúzást kifejezetten felülírjuk.
   A körvonal a szöveg színét követi (currentColor), így más háttéren is
   látható marad. */
.mnj-cv-trigger-wrap .mnj-cv-ibtn,
.mnj-cv-trigger-wrap a.mnj-cv-ibtn,
.mnj-cv-trigger-wrap a.mnj-cv-ibtn:visited,
.mnj-cv-trigger-wrap a.mnj-cv-ibtn:hover,
.mnj-cv-trigger-wrap a.mnj-cv-ibtn:focus {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	margin: 0;
	padding: 8px 16px;
	border: 2px solid currentColor;
	border-radius: 6px;
	background: transparent;
	color: inherit !important;
	font: inherit;
	font-size: 14px;
	font-weight: 700;
	line-height: 1.2;
	text-decoration: none !important;
	box-shadow: none;
	cursor: pointer;
	transition: background-color .15s ease, opacity .15s ease;
}

.mnj-cv-trigger-wrap .mnj-cv-ibtn:hover { background: rgba(255, 255, 255, .16); }

.mnj-cv-trigger-wrap .mnj-cv-ibtn:focus-visible {
	outline: 3px solid rgba(255, 255, 255, .55);
	outline-offset: 2px;
}

/* Fő gomb: tömör fehér, sötétkék felirattal — egyértelműen kattintható. */
.mnj-cv-trigger-wrap .mnj-cv-ibtn.mnj-cv-ibtn-primary {
	background: #fff;
	border-color: #fff;
	color: #1e3063 !important;
	padding: 10px 18px;
	box-shadow: 0 1px 3px rgba(0, 0, 0, .18);
}

.mnj-cv-trigger-wrap .mnj-cv-ibtn.mnj-cv-ibtn-primary:hover { background: #eef2f8; border-color: #eef2f8; }

/* Eltávolítás: visszafogottabb, hogy ne ez vonzza a szemet. */
.mnj-cv-trigger-wrap .mnj-cv-ibtn.mnj-cv-ibtn-ghost {
	border-color: transparent;
	opacity: .85;
	padding-left: 10px;
	padding-right: 10px;
}

.mnj-cv-trigger-wrap .mnj-cv-ibtn.mnj-cv-ibtn-ghost:hover { opacity: 1; }

/* ---------- elkészült állapot ---------- */

.mnj-cv-status {
	padding: 14px 16px;
	border-radius: 8px;
	background: rgba(255, 255, 255, .14);
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .35);
}

.mnj-cv-status p { margin: 0; }

.mnj-cv-status-line {
	font-size: 15px;
	font-weight: 700;
	margin-bottom: 10px !important;
}

.mnj-cv-status-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.mnj-cv-status-next {
	margin-top: 10px !important;
	font-size: 13px;
	opacity: .85;
}

.mnj-cv-disabled { opacity: .5; }

/* ---------- modal ---------- */

body.mnj-cv-open-body { overflow: hidden; }

.mnj-cv-modal {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
}

.mnj-cv-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(15, 20, 40, .62);
}

.mnj-cv-dialog {
	position: relative;
	display: flex;
	flex-direction: column;
	width: 100%;
	max-width: 1180px;
	max-height: 100%;
	background: #fff;
	border-radius: 12px;
	overflow: hidden;
	box-shadow: 0 18px 60px rgba(0, 0, 0, .35);
	font-family: inherit;
	color: #333;
}

.mnj-cv-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 16px 22px;
	background: #1e3063;
	color: #fff;
}

.mnj-cv-head h2 {
	margin: 0;
	font-size: 19px;
	font-weight: 700;
	color: #fff;
}

.mnj-cv-step {
	margin-top: 3px;
	font-size: 13px;
	color: #b9c6e8;
	letter-spacing: .02em;
}

.mnj-cv-intro {
	margin: 0 0 18px;
	padding: 11px 14px;
	border-radius: 8px;
	background: #f2f5fa;
	border-left: 3px solid #1e3063;
	font-size: 14px;
	line-height: 1.5;
	color: #444;
}

.mnj-cv-intro-2 {
	margin: 0;
	border-radius: 0;
	border-left: 0;
	border-bottom: 1px solid #e0e3ea;
	padding: 12px 22px;
}

.mnj-cv-field input:disabled {
	background: #f1f3f6;
	color: #9aa0ab;
	cursor: not-allowed;
}

.mnj-cv-close {
	background: none;
	border: 0;
	color: #fff;
	font-size: 28px;
	line-height: 1;
	cursor: pointer;
	padding: 0 4px;
}

.mnj-cv-body {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0;
	overflow: hidden;
	flex: 1;
	min-height: 0;
}

/* ---------- szerkesztő oldal ---------- */

.mnj-cv-form {
	overflow-y: auto;
	padding: 20px 22px 26px;
}

.mnj-cv-section { margin-bottom: 22px; }

.mnj-cv-section h3 {
	margin: 0 0 10px;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: .06em;
	text-transform: uppercase;
	color: #1e3063;
	padding-bottom: 5px;
	border-bottom: 2px solid #37b777;
}

.mnj-cv-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 10px 12px;
}

.mnj-cv-col-2 { grid-column: 1 / -1; }

.mnj-cv-field { display: block; margin-bottom: 10px; }

.mnj-cv-field > span {
	display: block;
	font-size: 13px;
	font-weight: 600;
	margin-bottom: 4px;
	color: #444;
}

.mnj-cv-field input,
.mnj-cv-field textarea,
.mnj-cv-field select {
	width: 100%;
	box-sizing: border-box;
	padding: 9px 11px;
	border: 1px solid #d5dae4;
	border-radius: 6px;
	font: inherit;
	font-size: 14px;
	background: #fff;
	color: #333;
}

.mnj-cv-field input:focus,
.mnj-cv-field textarea:focus,
.mnj-cv-field select:focus {
	outline: none;
	border-color: #37b777;
	box-shadow: 0 0 0 3px rgba(55, 183, 119, .18);
}

.mnj-cv-field .is-invalid,
.mnj-cv-field input.is-invalid { border-color: #c0392b; }

.mnj-cv-err {
	display: block;
	margin-top: 4px;
	font-size: 12px;
	font-style: normal;
	color: #c0392b;
}

.mnj-cv-hint,
.mnj-cv-count {
	display: block;
	margin-top: 4px;
	font-size: 12px;
	font-style: normal;
	color: #7a8090;
}

.mnj-cv-check {
	display: flex;
	align-items: center;
	gap: 7px;
	font-size: 13px;
	align-self: end;
	padding-bottom: 9px;
}

.mnj-cv-check input { width: auto; }

.mnj-cv-block {
	position: relative;
	border: 1px solid #e3e7ee;
	border-radius: 8px;
	padding: 14px 34px 4px 14px;
	margin-bottom: 10px;
	background: #fafbfc;
}

.mnj-cv-del {
	position: absolute;
	top: 8px;
	right: 8px;
	width: 24px;
	height: 24px;
	border: 0;
	border-radius: 50%;
	background: #e7ebf1;
	color: #555;
	font-size: 17px;
	line-height: 1;
	cursor: pointer;
}

.mnj-cv-del:hover { background: #d8dde6; }

.mnj-cv-add {
	background: none;
	border: 1px dashed #b9c2d2;
	border-radius: 6px;
	padding: 8px 14px;
	font: inherit;
	font-size: 13px;
	color: #1e3063;
	cursor: pointer;
}

.mnj-cv-add:hover:not(:disabled) { border-color: #37b777; color: #26935d; }
.mnj-cv-add:disabled { opacity: .45; cursor: not-allowed; }

.mnj-cv-privacy {
	margin: 18px 0 0;
	font-size: 12px;
	color: #8a8f9c;
	line-height: 1.5;
}

/* ---------- élő előnézet ---------- */

.mnj-cv-preview {
	background: #eceef2;
	border-left: 1px solid #e0e3ea;
	overflow-y: auto;
	padding: 16px;
}

.mnj-cv-preview-label {
	font-size: 11px;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: #8a8f9c;
	margin-bottom: 10px;
	font-weight: 700;
}

.mnj-cv-paper {
	background: #fff;
	box-shadow: 0 2px 14px rgba(0, 0, 0, .12);
	overflow: hidden;
}

/* A .mnj-cv-paper-inner stílusát a PDF-sablon CSS-e adja (JS injektálja). */

/* ---------- lábléc, gombok ---------- */

.mnj-cv-foot {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 10px;
	padding: 13px 22px;
	border-top: 1px solid #e6e9ef;
	background: #fff;
}

.mnj-cv-msg {
	margin-right: auto;
	font-size: 13px;
	color: #6b7280;
}

.mnj-cv-msg.is-error { color: #c0392b; font-weight: 600; }

.mnj-cv-btn {
	display: inline-block;
	padding: 10px 20px;
	border: 0;
	border-radius: 6px;
	font: inherit;
	font-size: 14px;
	font-weight: 700;
	cursor: pointer;
	text-decoration: none;
	line-height: 1.2;
}

.mnj-cv-btn-primary {
	background-image: linear-gradient(#37b777, #26935d);
	color: #fff;
}

.mnj-cv-btn-primary:disabled { opacity: .6; cursor: default; }

.mnj-cv-btn-ghost {
	background: #eef0f4;
	color: #333;
}

.mnj-cv-btn-ghost:hover { background: #e3e6ec; }

/* ---------- PDF előnézet ---------- */

.mnj-cv-pdfview {
	display: flex;
	flex-direction: column;
	flex: 1;
	min-height: 0;
}

.mnj-cv-pdfview-inner {
	flex: 1;
	min-height: 0;
	background: #8a8f98;
	padding: 14px;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 14px;
}

.mnj-cv-pdfview iframe {
	width: 100%;
	height: 100%;
	min-height: 420px;
	border: 0;
	background: #fff;
}

.mnj-cv-pdf-fallback { margin: 0; }

/* ---------- mobil ---------- */

@media (max-width: 768px) {
	.mnj-cv-modal { padding: 0; }

	.mnj-cv-dialog {
		max-width: none;
		height: 100%;
		border-radius: 0;
	}

	.mnj-cv-body {
		grid-template-columns: 1fr;
		overflow-y: auto;
	}

	.mnj-cv-form { overflow: visible; }

	.mnj-cv-preview {
		border-left: 0;
		border-top: 1px solid #e0e3ea;
		overflow: visible;
	}

	.mnj-cv-grid { grid-template-columns: 1fr; }

	.mnj-cv-foot { flex-wrap: wrap; }

	.mnj-cv-msg { width: 100%; margin: 0 0 8px; }

	.mnj-cv-btn { flex: 1; text-align: center; }
}
