.spqm-form {
	margin: 1rem auto;
	max-width: 600px;
	width: 100%;
}

.spqm-form-intro {
	margin-bottom: 1.5rem;
	text-align: left;
}

.spqm-form-intro p {
	margin: 0;
	font-size: 1.0rem;
	text-align: center;
	font-weight: 600;
	line-height: 1.5;
	/* Color is set inline from settings */
}

.spqm-form .spqm-field {
	margin-bottom: 1.25rem;
	text-align: left;
}

.spqm-form .spqm-input-wrapper {
	position: relative;
	width: 100%;
	text-align: left;
}

.spqm-form .spqm-input {
	box-sizing: border-box;
	width: 100%;
	height: calc(3em + 2px);
	margin: 0 0 1em;
	padding: 1em;
	border: 1px solid #ccc;
	border-radius: 0;
	font-size: 1rem;
	background-color: #fff;
	resize: none;
	outline: none;
	transition: border-color 0.2s ease;
	text-align: left;
}

.spqm-form .spqm-input:focus {
	outline: none;
	border-color: #007518;
}

.spqm-form .spqm-label {
	display: block;
	pointer-events: none;
	line-height: 1em;
	margin-top: calc(-3em - 2px);
	margin-bottom: calc((3em - 1em) + 2px);
	text-align: left;
}

.spqm-form .spqm-label:before {
	content: attr(alt);
	display: inline-block;
	margin: 0 calc(1em + 2px);
	padding: 0 2px;
	color: #898989 !important;
	white-space: nowrap;
	transition: 0.3s ease-in-out;
	background-image: linear-gradient(to bottom, #fff, #fff);
	background-size: 100% 5px;
	background-repeat: no-repeat;
	background-position: center;
}

/* Label flytter sig op ved focus eller når der er værdi */
.spqm-form .spqm-input:focus + .spqm-label[placeholder]:before,
.spqm-form .spqm-input:not(:placeholder-shown) + .spqm-label[placeholder]:before,
.spqm-form .spqm-label.has-value:before {
	content: attr(placeholder);
	transition-duration: 0.2s;
	transform: translate(0, -1.5em) scale(0.9, 0.9);
}

/* Standard farve er grå for ALLE labels - uanset required, valid, invalid eller andet */
.spqm-form .spqm-label:before,
.spqm-form .spqm-input[required] + .spqm-label:before,
.spqm-form .spqm-input:not([required]) + .spqm-label:before,
.spqm-form .spqm-input:valid + .spqm-label:before,
.spqm-form .spqm-input:invalid + .spqm-label:before {
	color: #898989 !important;
}

/* Kun grøn ved focus eller når der er værdi - alle felter skal være ens */
.spqm-form .spqm-input:focus + .spqm-label:before,
.spqm-form .spqm-label.has-value:before {
	color: #007518 !important;
}

.spqm-form .spqm-field-submit {
	margin-top: 1.5rem;
	margin-bottom: 0;
}

.spqm-form button[type="submit"] {
	padding: 0.75rem 1.5rem;
	font-size: 1rem;
	cursor: pointer;
	border: none;
	border-radius: 4px;
	background-color: #007518;
	color: #fff;
	transition: background-color 0.2s ease;
}

.spqm-form button[type="submit"]:hover {
	background-color: #005a12;
}

.spqm-form button[type="submit"]:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

.spqm-messages {
	margin-bottom: 1rem;
}

.spqm-form .spqm-required {
	color: #b32d2e;
}

.spqm-messages .spqm-error,
.spqm-form .spqm-error {
	color: #b32d2e;
	margin-bottom: 1rem;
}

/* Error message styling - make all error messages red */
.spqm-message--error,
.spqm-message--error p {
	color: #b32d2e !important;
}

/* Success message styling - make all success messages green and larger */
.spqm-message--success,
.spqm-message--success p {
	color: #869745 !important;
	font-size: 1.25rem !important;
	font-weight: 600;
}

.spqm-messages .spqm-success,
.spqm-form .spqm-success {
	color: #1d8f3a;
	margin-bottom: 1rem;
}

.spqm-form--submitting button[type="submit"] {
	opacity: 0.75;
}

.spqm-form .spqm-error {
	color: #b32d2e;
	margin-bottom: 1rem;
}

.spqm-form .spqm-success {
	color: #1d8f3a;
	margin-bottom: 1rem;
}

/* Checkbox styling */
.spqm-form .spqm-field-checkbox {
	margin-bottom: 1rem;
	text-align: left;
}

.spqm-form .spqm-field-checkbox label {
	display: flex;
	align-items: flex-start;
	cursor: pointer;
	font-size: 0.9rem;
	line-height: 1.5;
}

.spqm-form .spqm-field-checkbox input[type="checkbox"] {
	margin-right: 0.5rem;
	margin-top: 0.2rem;
	flex-shrink: 0;
	cursor: pointer;
}

.spqm-form .spqm-field-checkbox label a {
	color: #007518;
	text-decoration: underline;
}

.spqm-form .spqm-field-checkbox label a:hover {
	color: #005a12;
}


