/* Aðsent efni – „Senda inn grein“ */

.fm-ad { max-width: 760px; margin-top: var(--wp--preset--spacing--40, 1.5rem); scroll-margin-top: 90px; }
.fm-ad-form {
	padding: clamp(1.25rem, 3vw, 2.25rem);
	border: 1px solid var(--wp--preset--color--line, #e2dcd1);
	border-radius: 12px;
	background: var(--wp--preset--color--white, #fff);
	box-shadow: 0 10px 30px -18px rgba(20, 25, 35, .25);
}
.fm-ad-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1.25rem; }
.fm-ad-field { margin: 0 0 1.35rem; display: flex; flex-direction: column; gap: .4rem; border: 0; padding: 0; min-width: 0; }
.fm-ad-field label, .fm-ad-field legend {
	font-weight: 700;
	font-size: .92rem;
	color: var(--wp--preset--color--ink, #15202b);
	padding: 0;
}
.fm-ad-field legend { margin-bottom: .5rem; }
.fm-ad-field label span[aria-hidden], .fm-ad-check span[aria-hidden] { color: var(--wp--preset--color--accent, #c2412d); }
.fm-ad-optional { font-weight: 400; color: var(--wp--preset--color--muted, #5e6873); }
.fm-ad input[type="text"], .fm-ad input[type="email"], .fm-ad textarea {
	width: 100%;
	box-sizing: border-box;
	padding: .75rem .9rem;
	border: 1px solid #cfc8bb;
	border-radius: 8px;
	background: var(--wp--preset--color--paper, #faf8f4);
	color: var(--wp--preset--color--ink, #15202b);
	font: inherit;
	font-size: 1rem;
	line-height: 1.5;
	transition: border-color .15s, box-shadow .15s, background .15s;
}
.fm-ad textarea { min-height: 260px; resize: vertical; }
.fm-ad input[type="text"]:focus, .fm-ad input[type="email"]:focus, .fm-ad textarea:focus {
	outline: none;
	border-color: var(--wp--preset--color--navy, #024390);
	background: #fff;
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--wp--preset--color--navy, #024390) 18%, transparent);
}
.fm-ad [aria-invalid="true"] { border-color: var(--wp--preset--color--accent, #c2412d) !important; }
.fm-ad-help { font-size: .82rem; color: var(--wp--preset--color--muted, #5e6873); }
.fm-ad-error { font-size: .85rem; font-weight: 600; color: #a4321f; }
.fm-ad-alert {
	margin: 0 0 1.5rem;
	padding: .85rem 1rem;
	border-radius: 8px;
	background: #fbeae6;
	color: #7d2617;
	font-weight: 600;
}

/* Flokkar sem hnappar */
.fm-ad-chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.fm-ad-chips label { position: relative; cursor: pointer; font-weight: 600 !important; }
.fm-ad-chips input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.fm-ad-chips span {
	display: inline-block;
	padding: .5rem 1rem;
	border: 1px solid #cfc8bb;
	border-radius: 999px;
	font-size: .9rem;
	background: var(--wp--preset--color--paper, #faf8f4);
	transition: background .15s, border-color .15s, color .15s;
}
.fm-ad-chips input:checked + span { background: var(--wp--preset--color--navy, #024390); border-color: var(--wp--preset--color--navy, #024390); color: #fff; }
.fm-ad-chips .is-locked { cursor: default; }
.fm-ad-chips .is-locked span { display: inline-flex; align-items: center; gap: .35rem; background: var(--wp--preset--color--accent, #c2412d); border-color: var(--wp--preset--color--accent, #c2412d); color: #fff; }
.fm-ad-chips .is-locked svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.fm-ad-cats .fm-ad-help { margin-top: .5rem; display: block; }
.fm-ad-chips input:focus-visible + span { outline: 3px solid var(--wp--preset--color--sky, #93bdef); outline-offset: 2px; }

/* Myndir */
.fm-ad-file { position: absolute; opacity: 0; width: 1px; height: 1px; }
.fm-ad-drop {
	display: flex !important;
	flex-direction: column;
	align-items: center;
	gap: .35rem;
	padding: 1.4rem 1rem;
	border: 2px dashed #cfc8bb;
	border-radius: 10px;
	background: var(--wp--preset--color--paper, #faf8f4);
	text-align: center;
	cursor: pointer;
	font-weight: 600 !important;
	transition: border-color .15s, background .15s;
}
.fm-ad-drop:hover, .fm-ad-file:focus-visible + * { border-color: var(--wp--preset--color--navy, #024390); background: #fff; }
.fm-ad-field:focus-within .fm-ad-drop { border-color: var(--wp--preset--color--navy, #024390); }
.fm-ad-drop svg { width: 30px; height: 30px; fill: none; stroke: var(--wp--preset--color--navy, #024390); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.fm-ad-drop-text { color: var(--wp--preset--color--navy, #024390); word-break: break-word; }
.fm-ad-drop .fm-ad-help { font-weight: 400; }

/* Grein: skrifa eða hlaða upp skjali */
.fm-ad-article { margin-bottom: 1.35rem; }
.fm-ad-article .fm-ad-field { margin-bottom: 0; }
.fm-ad-or { display: flex; align-items: center; gap: .9rem; margin: 1rem 0; font-size: .8rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--wp--preset--color--muted, #5e6873); }
.fm-ad-or::before, .fm-ad-or::after { content: ""; flex: 1; height: 1px; background: var(--wp--preset--color--line, #e2dcd1); }
.fm-ad-field.has-file .fm-ad-drop { border-style: solid; border-color: var(--wp--preset--color--navy, #024390); background: #fff; }

/* Hök */
.fm-ad-checks { display: flex; flex-direction: column; gap: .7rem; margin: .3rem 0 1.6rem; }
.fm-ad-check { display: flex; gap: .65rem; align-items: flex-start; font-size: .95rem; line-height: 1.45; cursor: pointer; }
.fm-ad-check input { width: 1.15rem; height: 1.15rem; margin: .15rem 0 0; flex: 0 0 auto; accent-color: var(--wp--preset--color--navy, #024390); }

.fm-ad-privacy { margin: .2rem 0 0; }
.fm-ad-privacy a { color: inherit; }

.fm-ad-hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.fm-ad-submit { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1.25rem; margin: 0; }
.fm-ad-submit button {
	border: 0;
	border-radius: 999px;
	padding: .9rem 1.8rem;
	font: inherit;
	font-weight: 700;
	font-size: 1rem;
	background: var(--wp--preset--color--navy, #024390);
	color: #fff;
	cursor: pointer;
	transition: background .15s;
}
.fm-ad-submit button:hover { background: var(--wp--preset--color--accent, #c2412d); }
.fm-ad-submit button:disabled { opacity: .7; cursor: progress; }

.fm-ad-thanks {
	padding: clamp(1.5rem, 4vw, 2.5rem);
	border-radius: 12px;
	background: var(--wp--preset--color--navy-deep, #012a5c);
	color: rgba(255, 255, 255, .85);
	font-size: 1.05rem;
}
.fm-ad-thanks:focus { outline: none; }
.fm-ad-thanks-title { margin: 0 0 .4rem; font-family: var(--wp--preset--font-family--serif, Georgia, serif); font-size: 2rem; font-weight: 800; color: #fff; }
.fm-ad-thanks a { color: #fff; font-weight: 700; }

.fm-adsent-byline { color: var(--wp--preset--color--muted, #5e6873); }

@media (max-width: 640px) {
	.fm-ad-row { grid-template-columns: 1fr; }
}
