/* ------------------------------------------------------------------
   cw-notice - vienas pranesimu komponentas visai sistemai.
   Tonai: error | warning | success | info
   Formos: inline (sraute) ir toast (iskylantis, 8 s)
   Dydziai: default ir compact (po formos lauku)
   ------------------------------------------------------------------ */

.cw-notice {
	--cw-accent: #205077;
	--cw-surface: #e7f1fb;

	display: flex;
	gap: 12px;
	align-items: flex-start;
	box-sizing: border-box;
	width: 100%;
	padding: 14px 16px;
	border: 1px solid color-mix(in srgb, var(--cw-accent) 28%, transparent);
	border-left: 4px solid var(--cw-accent);
	border-radius: 12px;
	background: var(--cw-surface);
	color: #0f2b43;
	font: 400 15px/1.45 inherit;
	text-align: left;
}

.cw-notice--error   { --cw-accent: #c0392b; --cw-surface: #fbebeb; }
.cw-notice--warning { --cw-accent: #b8791b; --cw-surface: #fdf3e0; }
.cw-notice--success { --cw-accent: #2e9e4f; --cw-surface: #e6f5ea; }
.cw-notice--info    { --cw-accent: #205077; --cw-surface: #e7f1fb; }

.cw-notice__icon {
	flex: 0 0 22px;
	width: 22px;
	height: 22px;
	margin-top: 1px;
	border-radius: 50%;
	background: var(--cw-accent);
	color: #fff;
	font-size: 14px;
	font-weight: 700;
	line-height: 22px;
	text-align: center;
}

.cw-notice__body { flex: 1 1 auto; min-width: 0; }

.cw-notice__title {
	margin: 0 0 2px;
	color: var(--cw-accent);
	font-size: 15px;
	font-weight: 700;
}

.cw-notice__text { margin: 0; }

.cw-notice__action {
	display: inline-block;
	margin-top: 10px;
	padding: 8px 16px;
	border-radius: 8px;
	background: var(--cw-accent);
	color: #fff;
	font-size: 14px;
	font-weight: 600;
	text-decoration: none;
}

.cw-notice__close {
	flex: 0 0 auto;
	padding: 0;
	border: 0;
	background: none;
	color: var(--cw-accent);
	font-size: 18px;
	line-height: 1;
	cursor: pointer;
	opacity: .65;
}
.cw-notice__close:hover { opacity: 1; }

/* Compact - po formos lauku, be ikonos fono */
.cw-notice--compact {
	gap: 8px;
	padding: 8px 10px;
	border-radius: 8px;
	border-left-width: 3px;
	font-size: 14px;
}
.cw-notice--compact .cw-notice__icon {
	flex-basis: 16px;
	width: 16px;
	height: 16px;
	font-size: 11px;
	line-height: 16px;
}
.cw-notice--compact .cw-notice__title { display: none; }

/* Toast - iskylantis, kaip „Noras viesai matomas!" */
.cw-toast-area {
	position: fixed;
	z-index: 9999;
	right: 16px;
	bottom: 16px;
	display: flex;
	flex-direction: column;
	gap: 10px;
	width: min(380px, calc(100vw - 32px));
}
.cw-notice--toast {
	box-shadow: 0 8px 24px rgba(15, 43, 67, .18);
	animation: cw-notice-in .18s ease-out;
}
.cw-notice--toast.is-leaving { animation: cw-notice-out .25s ease-in forwards; }

@keyframes cw-notice-in  { from { opacity: 0; transform: translateY(8px); } }
@keyframes cw-notice-out { to   { opacity: 0; transform: translateY(8px); } }

@media (prefers-reduced-motion: reduce) {
	.cw-notice--toast, .cw-notice--toast.is-leaving { animation: none; }
}

/* Laukas su klaida */
.cw-field--invalid input,
.cw-field--invalid textarea {
	border-color: #c0392b;
	box-shadow: 0 0 0 3px rgba(192, 57, 43, .12);
}
