/*
 * Sitric - Formularz kontaktowy 2.0
 * Same class names and look as 1.0.0, now loaded from one place only.
 *
 * Width: in 1.0.0 two style blocks fought each other and the effective result was a 500px
 * centred form (the 1000px rule for desktops never applied). That look is kept; to make
 * the form wider, change --sitric-cf-max-width only.
 */

.sitric-cf {
	--sitric-cf-max-width: 500px;
	max-width: var(--sitric-cf-max-width);
	margin: 20px auto;
	scroll-margin-top: 100px; /* Keeps the form visible below a sticky header after #zapytanie. */
}

.sitric-cf__heading {
	margin: 0 0 15px;
}

.custom-contact-form .form-group {
	margin: 0 0 15px;
	padding: 0;
	border: 0;
	background: none; /* Many themes (e.g. Storefront) give fieldsets a tinted box. */
	min-width: 0; /* Fieldsets otherwise refuse to shrink on narrow screens. */
}

.custom-contact-form .form-group > label,
.custom-contact-form .form-group > legend {
	display: block;
	float: none;
	width: auto;
	margin: 0 0 5px;
	padding: 0;
	font-weight: 600;
}

.custom-contact-form .form-group input:not([type="radio"]):not([type="checkbox"]),
.custom-contact-form .form-group select,
.custom-contact-form .form-group textarea {
	width: 100%;
	max-width: 100%;
	padding: 10px;
	border: 1px solid #ccc;
	border-radius: 4px;
	box-sizing: border-box;
	font: inherit;
}

/*
 * Themes often give form controls a fixed height (e.g. 40px). Combined with the padding above,
 * that leaves no room for the text: browsers clip the chosen option in a <select> instead of
 * centring it. Height follows padding and line-height instead; !important because themes that
 * set a fixed height often do it with !important too.
 */
.custom-contact-form .form-group select,
.custom-contact-form .form-group input:not([type="radio"]):not([type="checkbox"]):not([type="file"]) {
	height: auto !important;
	min-height: 0;
	line-height: 1.4 !important;
}

.custom-contact-form .form-group select {
	padding-right: 36px; /* Room for the dropdown arrow, so a long option does not run under it. */
	text-overflow: ellipsis;
}

.custom-contact-form .form-group input[type="file"] {
	padding: 8px;
	background: #fff;
}

.custom-contact-form .required {
	color: red;
}

.custom-contact-form .form-choice {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	margin: 0 0 6px;
	font-weight: 400;
	cursor: pointer;
}

.custom-contact-form .form-choice input {
	margin: 0.25em 0 0;
	flex: 0 0 auto;
}

.custom-contact-form .form-hint {
	margin: 4px 0 0;
	font-size: 0.875em;
	color: #555;
}

.custom-contact-form .form-field-error {
	margin: 4px 0 0;
	font-size: 0.875em;
	color: #b32d2e;
}

.custom-contact-form .submit-btn {
	background: #0073aa !important;
	color: #fff !important;
	padding: 10px 20px !important;
	border: none !important;
	cursor: pointer !important;
	border-radius: 4px !important;
	transition: 0.3s !important;
	font-size: 16px !important;
	margin-top: 30px !important;
	display: inline-block !important;
}

.custom-contact-form .submit-btn:hover {
	background: #005177 !important;
}

.custom-contact-form .submit-btn[disabled] {
	opacity: 0.6;
	cursor: wait !important;
}

.sitric-cf__privacy {
	margin: 15px 0 0;
	font-size: 0.8125em;
	line-height: 1.5;
	color: #555;
}

/* Messages sit outside <form>, so they are scoped to the wrapper. In 1.0.0 they were scoped
   to the form and never got their colours. */
.sitric-cf .form-message {
	padding: 15px;
	margin-bottom: 20px;
	border-radius: 4px;
}

.sitric-cf .form-message.success {
	background: #d4edda;
	color: #155724;
	border: 1px solid #c3e6cb;
}

.sitric-cf .form-message.error {
	background: #f8d7da;
	color: #721c24;
	border: 1px solid #f5c6cb;
}

/* Product page button. */
.sitric-cf-ask {
	margin: 1em 0;
}

@media (min-width: 768px) {
	.custom-contact-form .form-group input:not([type="radio"]):not([type="checkbox"]):not([type="file"]),
	.custom-contact-form .form-group select,
	.custom-contact-form .form-group textarea {
		padding: 14px;
		font-size: 16px;
	}

	.custom-contact-form .submit-btn {
		padding: 14px 30px !important;
		font-size: 18px !important;
	}
}
