/* ===== Попап «Запропонувати завдання» для гостя ===== */

.offer-modal {
	position: fixed;
	inset: 0;
	z-index: 10050;
	display: none;
	align-items: flex-start;
	justify-content: center;
	padding: 24px 12px;
	font-family: 'Roboto', sans-serif;
}

.offer-modal.is-open {
	display: flex;
}

body.offer-modal-open {
	overflow: hidden;
}

.offer-modal *,
.offer-modal *::before,
.offer-modal *::after {
	box-sizing: border-box;
}

.offer-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(17, 24, 39, .55);
}

.offer-modal__dialog {
	position: relative;
	width: 100%;
	max-width: 620px;
	max-height: calc(100vh - 48px);
	overflow-y: auto;
	padding: 28px 28px 24px;
	border-radius: 6px;
	background: #fff;
	box-shadow: 0 20px 50px rgba(0, 0, 0, .25);
	-webkit-overflow-scrolling: touch;
}

.offer-modal__close {
	position: absolute;
	top: 10px;
	right: 12px;
	width: 36px;
	height: 36px;
	border: 0;
	background: none;
	color: #9ca3af;
	font-size: 30px;
	line-height: 1;
	cursor: pointer;
}

.offer-modal__close:hover {
	color: #404040;
}

.offer-modal__title {
	margin: 0 0 6px;
	padding-right: 30px;
	color: #404040;
	font-size: 24px;
	font-weight: 700;
}

.offer-modal__subtitle {
	margin: 0 0 18px;
	color: #6b7280;
	font-size: 15px;
}

.offer-modal__subtitle b {
	color: #219ae7;
}

/* --- секції --- */

.offer-form__section {
	margin-bottom: 18px;
}

.offer-form__section-title {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 14px;
	color: #404040;
	font-size: 17px;
	font-weight: 700;
}

.offer-form__section-title span {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 26px;
	height: 26px;
	border-radius: 50%;
	background: #219ae7;
	color: #fff;
	font-size: 14px;
}

.offer-form__row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0 14px;
}

.offer-form__field {
	display: block;
	position: relative;
	margin: 0 0 14px;
}

.offer-form__label {
	display: block;
	margin-bottom: 6px;
	color: #404040;
	font-size: 14px;
	font-weight: 600;
}

.offer-form__label i {
	color: #e53935;
	font-style: normal;
}

.offer-form input[type="text"],
.offer-form input[type="email"],
.offer-form input[type="tel"],
.offer-form input[type="password"],
.offer-form input[type="number"],
.offer-form input[type="date"],
.offer-form select,
.offer-form textarea {
	display: block;
	width: 100%;
	min-height: 44px;
	margin: 0;
	padding: 10px 12px;
	border: 1px solid #d1d5db;
	border-radius: 4px;
	background: #fff;
	color: #404040;
	font: inherit;
	font-size: 15px;
	box-shadow: none;
	transition: border-color .15s, box-shadow .15s;
}

.offer-form textarea {
	resize: vertical;
	min-height: 70px;
}

.offer-form input:focus,
.offer-form select:focus,
.offer-form textarea:focus {
	outline: none;
	border-color: #219ae7;
	box-shadow: 0 0 0 3px rgba(33, 154, 231, .15);
}

.offer-form input[type="file"] {
	width: 100%;
	font-size: 14px;
}

.offer-form .select2-container {
	width: 100% !important;
}

.offer-form .select2-container .select2-selection--single {
	height: 44px;
	border: 1px solid #d1d5db;
	border-radius: 4px;
}

.offer-form .select2-container .select2-selection--single .select2-selection__rendered {
	line-height: 42px;
	padding-left: 12px;
}

.offer-form .select2-container .select2-selection--single .select2-selection__arrow {
	height: 42px;
}

.offer-form__field.is-disabled {
	opacity: .45;
	pointer-events: none;
}

.offer-form__check {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	margin: 0 0 14px;
	color: #404040;
	font-size: 14px;
	line-height: 1.4;
	cursor: pointer;
}

.offer-form__check input[type="checkbox"] {
	flex-shrink: 0;
	width: 18px;
	height: 18px;
	margin: 1px 0 0;
}

.offer-form__check a {
	color: #219ae7;
}

/* --- помилки --- */

.offer-form__field.has-error input,
.offer-form__field.has-error select,
.offer-form__field.has-error textarea,
.offer-form__field.has-error .select2-selection--single {
	border-color: #e53935;
}

.offer-form__msg {
	display: block;
	margin-top: 5px;
	color: #e53935;
	font-size: 13px;
	line-height: 1.35;
}

.offer-form__error {
	margin: 0 0 14px;
	padding: 10px 14px;
	border: 1px solid #f5c2c0;
	border-radius: 4px;
	background: #fdecea;
	color: #b3261e;
	font-size: 14px;
}

/* --- «Додаткова інформація» --- */

.offer-form__more {
	margin: 0 0 20px;
	border: 1px solid #e5e7eb;
	border-radius: 4px;
	background: #f9fafb;
}

.offer-form__more-toggle {
	position: relative;
	display: block;
	width: 100%;
	padding: 13px 44px 13px 16px;
	border: 0;
	background: none;
	color: #219ae7;
	font: inherit;
	font-size: 15px;
	font-weight: 600;
	text-align: left;
	cursor: pointer;
}

.offer-form__more-toggle small {
	color: #9ca3af;
	font-weight: 400;
}

.offer-form__more-toggle::after {
	content: '';
	position: absolute;
	top: 50%;
	right: 18px;
	width: 9px;
	height: 9px;
	margin-top: -7px;
	border-right: 2px solid #219ae7;
	border-bottom: 2px solid #219ae7;
	transform: rotate(45deg);
	transition: transform .2s, margin-top .2s;
}

.offer-form__more-toggle.is-open::after {
	margin-top: -2px;
	transform: rotate(-135deg);
}

.offer-form__more-body {
	padding: 4px 16px 4px;
}

/* --- вкладки входу / реєстрації --- */

.offer-form__tabs {
	display: flex;
	gap: 4px;
	margin-bottom: 14px;
	padding: 4px;
	border-radius: 4px;
	background: #f1f5f9;
}

.offer-form__tabs button {
	flex: 1;
	padding: 9px 8px;
	border: 0;
	border-radius: 3px;
	background: none;
	color: #6b7280;
	font: inherit;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
}

.offer-form__tabs button.is-active {
	background: #fff;
	color: #219ae7;
	box-shadow: 0 1px 3px rgba(0, 0, 0, .12);
}

.offer-form__link {
	color: #219ae7;
	font-size: 14px;
}

/* --- кнопка --- */

.offer-form__submit {
	display: block;
	width: 100%;
	padding: 14px 16px;
	border: 0;
	border-radius: 4px;
	background: #fbb829;
	color: #fff;
	font: inherit;
	font-size: 16px;
	font-weight: 700;
	cursor: pointer;
	transition: background .2s;
}

.offer-form__submit:hover {
	background: #f0a500;
}

.offer-form__submit:disabled {
	opacity: .7;
	cursor: wait;
}

.offer-form__note {
	margin: 10px 0 0;
	color: #9ca3af;
	font-size: 13px;
	text-align: center;
}

/* --- успіх --- */

.offer-modal__done {
	padding: 12px 0 4px;
	text-align: center;
}

.offer-modal__done p {
	margin: 0 0 20px;
	color: #6b7280;
	font-size: 15px;
	line-height: 1.5;
}

.offer-modal__done-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 60px;
	height: 60px;
	margin-bottom: 12px;
	border-radius: 50%;
	background: #e8f6ee;
	color: #22a35a;
	font-size: 32px;
	font-weight: 700;
}

/* select2 у попапі — над вікном */
.offer-modal .select2-container--open {
	z-index: 10060;
}

@media (max-width: 575px) {
	.offer-modal {
		padding: 0;
	}

	.offer-modal__dialog {
		max-width: none;
		max-height: 100vh;
		height: 100%;
		border-radius: 0;
		padding: 22px 16px 20px;
	}

	.offer-form__row {
		grid-template-columns: 1fr;
	}

	.offer-modal__title {
		font-size: 21px;
	}
}

/* Підказки — світлі, щоб не плутати з уже введеним текстом */
.offer-form input::placeholder,
.offer-form textarea::placeholder {
	color: #9ca3af;
	opacity: 1;
}

/* Поле міста (select2) — текст по центру, як в інших полях */
.offer-form .select2-container .select2-selection--single .select2-selection__rendered {
	padding-top: 0;
	padding-bottom: 0;
	color: #404040;
	font-size: 15px;
}

.offer-form .select2-container .select2-selection--single .select2-selection__placeholder {
	color: #9ca3af;
}

/* Тема select2 (krajee) додає свої відступи — вирівнюємо примусово */
#offerGuestModal .select2-container .select2-selection--single {
	height: 44px !important;
	padding: 0 !important;
}

#offerGuestModal .select2-container .select2-selection--single .select2-selection__rendered {
	height: 42px;
	line-height: 42px !important;
	padding: 0 30px 0 12px !important;
}
