/*
Theme Name: Mistrzowie Korepetycji
Theme URI:  https://mistrzowiekorepetycji.pl/
Author:     Fascinate
Author URI: https://fascinate.pl
Template:   kadence
Version:    1.0
License:    GNU General Public License v2 or later
*/
/* =========================================
   FORMULARZ MISTRZOWIE KOREPETYCJI
========================================= */

.mk-form {
	--mk-blue: var(--global-palette1);
	--mk-dark-blue: var(--global-palette2);
	--mk-light-blue: #eaf1ff;
	--mk-border: #dce5f4;
	--mk-text: color: var(--global-palette2);
	--mk-muted: #52658f;

	font-family: inherit;
	color: var(--mk-text);
	background: #fff;
	border: 1px solid var(--mk-border);
	border-radius: 16px;
	padding: 34px 38px 38px;
	box-shadow: 0 12px 35px rgba(21, 55, 125, 0.08);
}

/* Nagłówek */

.mk-form-header {
	margin-bottom: 28px;
}

.mk-step {
	display: inline-block;
	margin-bottom: 8px;
	padding: 5px 12px;
	border-radius: 7px;
	background: var(--mk-light-blue);
	color: var(--mk-blue);
	font-size: 12px;
	font-weight: 700;
	line-height: 1.2;
}

.mk-form-header h2 {
	margin: 0 0 8px!important;
	color: var(--mk-dark-blue);
	font-family: var(--global-heading-font-family);
	font-size: clamp(28px, 3vw, 40px);
	line-height: 1.15;
}

.mk-form-header p {
	margin: 0;
	color: var(--mk-muted);
	font-size: 14px;
	line-height: 1.6;
}

/* Główny układ */

.mk-form-columns {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	gap: 0;
}

.mk-form-column {
	min-width: 0;
}

.mk-form-column-left {
	padding-right: 34px;
}

.mk-form-column-right {
	padding-left: 34px;
	border-left: 1px solid var(--mk-border);
}

/* Sekcje */

.mk-form-section + .mk-form-section {
	margin-top: 28px;
}

.mk-section-title {
	display: flex;
	align-items: center;
	gap: 12px;
	margin: 0 0 20px;
	color: var(--mk-dark-blue);
	font-family: var(--global-heading-font-family);
	font-size: 20px;
	line-height: 1.3;
}

.mk-section-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 38px;
	width: 38px;
	height: 38px;
	border-radius: 50%;
	background: var(--mk-light-blue);
	color: var(--mk-blue);
	font-family: var(--global-body-font-family);
	font-size: 18px;
}
.mk-section-icon svg{
fill: var(--mk-blue);
}

/* Pola */

.mk-grid {
	display: grid;
	gap: 20px;
}

.mk-grid-3 {
	grid-template-columns: repeat(3, minmax(0, 1fr));
}

.mk-field {
	min-width: 0;
}

.mk-field label {
	display: block;
	margin-bottom: 8px;
	color: var(--mk-text);
	font-size: 13px;
	font-weight: 700;
	line-height: 1.45;
}

.mk-field label > span {
	color: #ee4e5a;
}

.mk-form input[type="text"],
.mk-form input[type="email"],
.mk-form input[type="tel"],
.mk-form textarea,
.mk-form select {
	box-sizing: border-box;
	width: 100%;
	min-height: 44px;
	margin: 0;
	padding: 10px 13px;
	border: 1px solid #cdd9ec;
	border-radius: 6px;
	outline: none;
	background: #fff;
	color: var(--mk-text);
	font-family: inherit;
	font-size: 14px;
	line-height: 1.4;
	transition:
		border-color 0.2s ease,
		box-shadow 0.2s ease;
}

.mk-form textarea {
	min-height: 145px;
	resize: vertical;
}

.mk-form input[type="text"]:focus,
.mk-form input[type="email"]:focus,
.mk-form input[type="tel"]:focus,
.mk-form textarea:focus,
.mk-form select:focus {
	border-color: var(--mk-blue);
	box-shadow: 0 0 0 3px rgba(18, 59, 186, 0.1);
}

.mk-form ::placeholder {
	color: #9ba8c2;
	opacity: 1;
}

/* Opcje */

.mk-options-grid {
	display: grid;
	grid-template-columns: 1.05fr 1fr 1.15fr;
	gap: 28px;
}

.mk-preferences-grid {
	display: grid;
	grid-template-columns: 0.9fr 1fr 1.15fr;
	gap: 28px;
}

.mk-options-column {
	min-width: 0;
}

.mk-options-column h4,
.mk-option-group h4 {
	margin: 0 0 10px;
	color: var(--mk-text);
	font-size: 13px;
	font-weight: 700;
	line-height: 1.45;
}

.mk-option-group + .mk-option-group,
.mk-field + .mk-option-group {
	margin-top: 24px;
}

/* CF7 tworzy dodatkowe elementy span */

.mk-form .wpcf7-form-control-wrap {
	display: block;
	width: 100%;
}

.mk-form .wpcf7-checkbox,
.mk-form .wpcf7-radio {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.mk-form .wpcf7-list-item {
	display: block;
	margin: 0;
}

.mk-form .wpcf7-list-item label {
	display: flex;
	align-items: flex-start;
	gap: 9px;
	margin: 0;
	cursor: pointer;
	color: var(--mk-muted);
	font-size: 13px;
	font-weight: 500;
	line-height: 1.4;
}

.mk-form .wpcf7-list-item-label {
	display: inline-block;
	padding-top: 1px;
}

/* Checkboxy i radio */

.mk-form input[type="checkbox"],
.mk-form input[type="radio"] {
	position: relative;
	flex: 0 0 17px;
	width: 17px;
	height: 17px;
	margin: 1px 0 0;
	border: 1px solid #b9c9e3;
	background: #fff;
	cursor: pointer;
	appearance: none;
	-webkit-appearance: none;
	transition:
		border-color 0.2s ease,
		background-color 0.2s ease,
		box-shadow 0.2s ease;
}

.mk-form input[type="checkbox"] {
	border-radius: 4px;
}

.mk-form input[type="radio"] {
	border-radius: 50%;
}

.mk-form input[type="checkbox"]:checked,
.mk-form input[type="radio"]:checked {
	border-color: var(--mk-blue);
	background: var(--mk-blue);
}

.mk-form input[type="checkbox"]:checked::after {
	content: "";
	position: absolute;
	top: 2px;
	left: 5px;
	width: 4px;
	height: 8px;
	border: solid #fff;
	border-width: 0 2px 2px 0;
	transform: rotate(45deg);
}

.mk-form input[type="radio"]:checked::after {
	content: "";
	position: absolute;
	inset: 4px;
	border-radius: 50%;
	background: #fff;
}

.mk-form input[type="checkbox"]:focus-visible,
.mk-form input[type="radio"]:focus-visible {
	outline: none;
	box-shadow: 0 0 0 3px rgba(18, 59, 186, 0.14);
}

/* Dodatkowe informacje */

.mk-additional-section {
	padding-top: 24px;
	border-top: 1px solid var(--mk-border);
}

.mk-additional-row {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	align-items: start;
	gap: 28px;
}

.mk-consent {
	color: var(--mk-muted);
	font-size: 11px;
	line-height: 1.55;
}

.mk-consent .wpcf7-list-item {
	display: block;
}

.mk-consent .wpcf7-list-item label {
	display: grid;
	grid-template-columns: 17px minmax(0, 1fr);
	align-items: start;
}

.mk-consent a {
	display: inline-block;
	margin-top: 5px;
	color: var(--mk-blue);
	font-weight: 600;
	text-decoration: none;
}

.mk-consent a:hover {
	text-decoration: underline;
}

/* Przycisk */

.mk-submit-wrap {
	min-width: 245px;
}

.mk-form .mk-submit {
	position: relative;
	width: 100%;
	min-height: 58px;
	padding: 15px 28px;
	border: 0;
	border-radius: 7px;
	background: linear-gradient(135deg, #154bcc 0%, #062b9e 100%);
	box-shadow: 0 8px 20px rgba(18, 59, 186, 0.2);
	color: #fff;
	font-family: var(--global-heading-font-family);
	font-size: 18px;
	font-weight: 700;
	line-height: 1.2;
	cursor: pointer;
	transition:
		transform 0.25s ease,
		box-shadow 0.25s ease,
		filter 0.25s ease;
}

.mk-form .mk-submit:hover {
	transform: translateY(-2px);
	box-shadow: 0 12px 25px rgba(18, 59, 186, 0.28);
	filter: brightness(1.06);
}

.mk-form .mk-submit:active {
	transform: translateY(0);
}

/* Walidacja CF7 */

.mk-form .wpcf7-not-valid {
	border-color: #e8505b !important;
}

.mk-form .wpcf7-not-valid-tip {
	margin-top: 5px;
	color: #d83c49;
	font-size: 11px;
}

.mk-form .wpcf7-response-output {
	margin: 24px 0 0 !important;
	padding: 12px 16px !important;
	border-radius: 7px;
	font-size: 13px;
	line-height: 1.5;
}

.mk-form .wpcf7-spinner {
	margin: 12px;
	vertical-align: middle;
}

/* =========================================
   TABLET
========================================= */

@media (max-width: 1100px) {

	.mk-form {
		padding: 30px;
	}

	.mk-form-columns {
		grid-template-columns: 1fr;
	}

	.mk-form-column-left,
	.mk-form-column-right {
		padding: 0;
	}

	.mk-form-column-right {
		margin-top: 32px;
		padding-top: 32px;
		border-top: 1px solid var(--mk-border);
		border-left: 0;
	}

	.mk-options-grid,
	.mk-preferences-grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

/* =========================================
   MNIEJSZY TABLET
========================================= */

@media (max-width: 800px) {

	.mk-grid-3 {
		grid-template-columns: 1fr;
		gap: 16px;
	}

	.mk-options-grid,
	.mk-preferences-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.mk-focus-field {
		grid-column: 1 / -1;
	}

	.mk-additional-row {
		grid-template-columns: 1fr;
	}

	.mk-submit-wrap {
		min-width: 0;
	}
}

/* =========================================
   TELEFON
========================================= */

@media (max-width: 560px) {

	.mk-form {
		padding: 24px 18px;
		border-radius: 12px;
	}

	.mk-form-header {
		margin-bottom: 24px;
	}

	.mk-form-header h2 {
		font-size: 28px;
	}

	.mk-section-title {
		align-items: center;
		font-size: 18px;
	}

	.mk-options-grid,
	.mk-preferences-grid {
		grid-template-columns: 1fr;
		gap: 22px;
	}

	.mk-focus-field {
		grid-column: auto;
	}

	.mk-form-column-right {
		margin-top: 28px;
		padding-top: 28px;
	}

	.mk-form .mk-submit {
		min-height: 54px;
		font-size: 17px;
	}
}

