/* ================================================================
   Nalog — modal za prijavu/registraciju + sitni UI koji dele sve
   strane (naslovna, čarobnjak, moji albumi): alat-dugmad, obaveštenja,
   link u zaglavlju. Učitava se odmah posle mag-tokeni.css.
   ================================================================ */

/* ---------------------------------------------------------------- zajednički sitni UI */

/* alat: dodirna meta bar 40 px (editor, albumi) */
.mag-alat-dugme {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 40px;
	background: #fff;
	border: 2px solid #e4dff0;
	border-radius: 999px;
	font-family: inherit;
	font-weight: 800;
	font-size: 0.9rem;
	padding: 6px 14px;
	cursor: pointer;
	color: var(--mag-ljubicasta);
	text-decoration: none;
	transition: border-color 0.15s, background 0.15s;
}

.mag-alat-dugme:hover:not(:disabled) { border-color: var(--mag-zuta); }
.mag-alat-dugme:disabled { opacity: 0.4; cursor: not-allowed; }

.mag-alat-dugme-glavno {
	background: var(--mag-zuta);
	border-color: var(--mag-zuta);
	color: var(--mag-mastilo);
}

.mag-alat-dugme-opasno { color: var(--mag-crvena); }

/* obaveštenja (toast) */
.mag-obavestenja {
	position: fixed;
	top: 70px;
	left: 50%;
	transform: translateX(-50%);
	display: flex;
	flex-direction: column;
	gap: 8px;
	z-index: 90;
	width: min(480px, calc(100% - 32px));
}

.mag-obavestenje {
	background: var(--mag-mastilo);
	color: #fff;
	font-weight: 700;
	font-size: 0.9rem;
	padding: 12px 18px;
	border-radius: 12px;
	box-shadow: var(--mag-senka);
	animation: mag-obavestenje-uskoci 0.25s ease;
}

.mag-obavestenje-upozorenje { background: #a15c00; }
.mag-obavestenje-greska { background: var(--mag-crvena); }

@keyframes mag-obavestenje-uskoci {
	from { transform: scale(0.6); opacity: 0; }
	to   { transform: scale(1); opacity: 1; }
}

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

.mag-nalog-podloga {
	position: fixed;
	inset: 0;
	background: rgba(29, 25, 48, 0.68);
	z-index: 95;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
	opacity: 0;
	transition: opacity 0.2s;
}

.mag-nalog-otvoren { opacity: 1; }

.mag-nalog {
	position: relative;
	width: min(420px, 100%);
	max-height: 90vh;
	overflow: auto;
	background: #fff;
	color: var(--mag-mastilo);
	border-radius: 22px;
	padding: 20px 22px 24px;
	box-sizing: border-box;
	box-shadow: 0 24px 70px rgba(10, 6, 30, 0.5);
	transform: translateY(24px);
	transition: transform 0.25s cubic-bezier(0.2, 0.9, 0.3, 1.1);
	font-family: var(--mag-font);
}

.mag-nalog-otvoren .mag-nalog { transform: none; }

.mag-nalog-zatvori {
	position: absolute;
	top: 12px;
	right: 12px;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	border: 0;
	background: #f2effa;
	color: var(--mag-mastilo);
	font-size: 1.5rem;
	line-height: 1;
	cursor: pointer;
	display: grid;
	place-items: center;
	padding: 0 0 2px;
}

.mag-nalog-tabovi {
	display: flex;
	gap: 6px;
	margin: 4px 44px 16px 0;
}

.mag-nalog-tab {
	flex: 1;
	min-height: 40px;
	border: 0;
	border-radius: 999px;
	background: #f2effa;
	font-family: inherit;
	font-weight: 800;
	font-size: 0.95rem;
	color: #9a93b0;
	cursor: pointer;
	transition: background 0.15s, color 0.15s;
}

.mag-nalog-tab-aktivan {
	background: var(--mag-ljubicasta);
	color: #fff;
}

.mag-nalog-forma {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.mag-nalog-polje {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.mag-nalog-oznaka {
	font-weight: 800;
	font-size: 0.85rem;
	color: #55506b;
}

.mag-nalog-unos {
	font-family: inherit;
	font-size: 1rem;
	font-weight: 700;
	color: var(--mag-mastilo);
	padding: 11px 14px;
	border: 2px solid #e4dff0;
	border-radius: 12px;
	background: #fff;
	box-sizing: border-box;
	width: 100%;
}

.mag-nalog-unos:focus { outline: none; border-color: var(--mag-zuta); }

.mag-nalog-napomena {
	margin: 0;
	color: #6d6684;
	font-size: 0.85rem;
}

/* honeypot — pravi korisnik ga nikad ne vidi */
.mag-nalog-mamac {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	opacity: 0;
}

.mag-nalog-greska {
	margin: 0;
	font-weight: 700;
	font-size: 0.88rem;
	color: var(--mag-crvena);
}

.mag-nalog-greska-ok { color: #1d7a3f; }

.mag-nalog-dugme {
	min-height: 48px;
	border: 0;
	border-radius: 999px;
	background: var(--mag-zuta);
	color: var(--mag-mastilo);
	font-family: inherit;
	font-weight: 900;
	font-size: 1.05rem;
	cursor: pointer;
	box-shadow: var(--mag-senka);
	transition: transform 0.15s;
}

.mag-nalog-dugme:hover:not(:disabled) { transform: scale(1.02); }
.mag-nalog-dugme:disabled { opacity: 0.6; cursor: wait; }

.mag-nalog-link {
	border: 0;
	background: none;
	font-family: inherit;
	font-weight: 700;
	font-size: 0.88rem;
	color: var(--mag-ljubicasta);
	cursor: pointer;
	text-decoration: underline;
	padding: 2px;
	align-self: center;
}

@media (prefers-reduced-motion: reduce) {
	.mag-nalog-podloga, .mag-nalog { transition: none !important; }
	.mag-obavestenje { animation: none !important; }
}
