/**
 * New Calc — стилі кредитного калькулятора.
 * Усі селектори з префіксом `ato-` і заскоуплені під .ato-calc-scope,
 * щоб не конфліктувати зі стилями теми WordPress.
 */

@font-face {
	font-family: 'ft40';
	src: url('https://www.avtogroshi1.com.ua/wp-content/uploads/2026/06/ft40 Roman.ttf') format('truetype');
	font-weight: normal;
	font-style: normal;
}

/* глобальні селектори заскоуплено під обгортку, щоб не чіпати сторінку WP */
.ato-calc-scope, .ato-calc-scope *, .ato-calc-scope *::before, .ato-calc-scope *::after { box-sizing: border-box; }
.ato-calc-scope {
	font-family: 'Montserrat', sans-serif; font-size: 14px; color: #484F54;
	width: 100%; max-width: 100%; margin: 0 auto;
}
.ato-calc-scope form { margin: 0; }
.ato-calc-scope select, .ato-calc-scope input, .ato-calc-scope button { font-family: 'Montserrat', sans-serif; }

/* ── Calc shell ── */
.ato-calc-container { position: relative; }
.ato-calc-wrapper   { display: flex; align-items: center; }
.ato-calc-inner {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	background-color: #fff;
	border-radius: 20px;
	min-height: 260px;
	height: auto;
	width: 100%;
	max-width: 100%;
	min-width: 0;
}

/* ── Title ── */
.ato-calc-title { margin-bottom: 19px; text-align: center; }
.ato-title-extend { font-size: 30px; font-weight: 800; font-family: 'ft40'; letter-spacing: 0.5px; line-height: 1.3; }

.ato-calculator_main { width: 100%; }

/* ── Slider rows ── */
.ato-calc-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 16.5px;
	gap: 12px;
}
.ato-calc-row__label {
	font-size: 16px;
	font-weight: 700;
	color: #484F54;
	flex: 1 1 auto;
	min-width: 0;
	line-height: 1.35;
}
.ato-calc-row__input-wrap {
	display: flex;
	justify-content: flex-end;
	align-items: center;
	border: 1.5px solid #484F54;
	border-radius: 50px;
	padding: 7px 6px;
	width: 151px;
	max-width: 151px;
	flex: 0 0 151px;
	height: 27px;
}
.ato-calc-row__input-wrap.ato-term-input {
	width: 132px;
	max-width: 132px;
	flex-basis: 132px;
}
.ato-calc-row__input {
	border: none; outline: none; background: transparent;
	font-size: 14px; font-weight: 600;
	font-family: 'Montserrat', sans-serif;
	width: 100%; min-width: 0; text-align: right;
	color: #484F54;
}
input[type="number"].ato-calc-row__input { -moz-appearance: textfield; }
input[type="number"].ato-calc-row__input::-webkit-inner-spin-button,
input[type="number"].ato-calc-row__input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.ato-calc-row__unit {
	font-size: 15px; font-weight: 600; color: #484F54; margin-left: 4px;
}

/* перемикач одиниць строку */
.ato-unit-switch { display: flex; gap: 2px; margin-left: 4px; }
.ato-unit-switch button {
	border: none; background: transparent; cursor: pointer; padding: 0 3px;
	font-size: 13px; font-weight: 600; color: #A0A6AA; line-height: 1;
}
.ato-unit-switch button.is-active { color: #2B9641; text-decoration: underline; }

/* ── Range slider ── */
.ato-calc-line {
	position: relative; width: 100%; height: 32px;
}
.ato-calc-line::before {
	content: ''; display: block;
	background: #4A4A4A; height: 1px; width: 100%;
	position: absolute; top: 50%; transform: translateY(-50%);
}
.ato-calc-line__dot {
	position: absolute; top: 50%; transform: translateY(-50%);
	width: 7px; height: 7px; border-radius: 50%;
	background: #4A4A4A; z-index: 1;
}
.ato-calc-line__dot--left  { left: 0; }
.ato-calc-line__dot--right { right: 0; }
.ato-calc-line__input {
	-webkit-appearance: none;
	position: absolute; top: 50%; transform: translateY(-50%);
	left: 0; width: 100%; background: transparent;
	height: 32px; cursor: pointer; z-index: 2; margin: 0;
}
.ato-calc-line__input:focus { outline: none; }
.ato-calc-line__input::-webkit-slider-thumb {
	-webkit-appearance: none; height: 32px; width: 90px; opacity: 0; cursor: pointer;
}
.ato-calc-line__input::-moz-range-thumb {
	height: 32px; width: 90px; opacity: 0; cursor: pointer; border: none;
}
.ato-calc-line__baloon {
	position: absolute; top: 50%; transform: translateY(-50%);
	left: calc(var(--thumb-pct, 50) * 1% - 45px);
	height: 27px; border-radius: 16px;
	background: #fff; border: 1.5px solid #4A4A4A;
	display: flex; align-items: center; justify-content: center;
	padding: 0 10px; gap: 6px;
	font-size: 13px; color: #333; white-space: nowrap;
	pointer-events: none; z-index: 3;
}
.ato-calc-line__baloon .ato-arr {
	color: #4A4A4A; font-size: 12px;
	pointer-events: auto; cursor: pointer; padding: 0 4px;
}
.ato-calc-line-info {
	display: flex; justify-content: space-between;
	font-size: 12px; color: #828282;
	margin-top: -7.5px; margin-bottom: 12px;
}

/* ── Швидкий вибір строку ── */
.ato-presets { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 18px; }
.ato-presets button {
	border: 1px solid #D5D9DC; background: #fff; border-radius: 50px;
	padding: 5px 12px; font-size: 12px; font-weight: 600; color: #484F54;
	cursor: pointer; transition: all .15s;
}
.ato-presets button:hover { border-color: #2B9641; color: #2B9641; }
.ato-presets button.is-active { background: #2B9641; border-color: #2B9641; color: #fff; }

/* ── Результати розрахунку (п. 21 Положення № 100) ── */
.ato-results {
	width: 100%;
	border: 1.5px solid #E3E6E8;
	border-radius: 14px;
	padding: 16px 16px 14px;
	margin-bottom: 18px;
	background: #FAFBFB;
}
.ato-results__title {
	font-size: 15px; font-weight: 700; color: #484F54;
	margin: 0 0 12px; line-height: 1.3;
}
.ato-res-row {
	display: flex; align-items: baseline; justify-content: space-between;
	gap: 10px; padding: 7px 0;
	border-bottom: 1px dashed #E3E6E8;
}
.ato-res-row:last-of-type { border-bottom: none; }
/* РРПС виводиться тим самим шрифтом і розміром, що й сума/строк (вимога ТЗ) */
.ato-res-row__label { font-size: 14px; font-weight: 500; color: #484F54; line-height: 1.35; }
.ato-res-row__value { font-size: 16px; font-weight: 700; color: #484F54; white-space: nowrap; }
.ato-res-row--accent .ato-res-row__value { color: #2B9641; }
.ato-res-hint { font-size: 11px; font-weight: 500; color: #828282; display: block; }
.ato-res-note {
	font-size: 11.5px; font-weight: 500; color: #6E7579; line-height: 1.45;
	margin: 12px 0 0;
}

/* ── Умови кредитування / приклад / попередження ── */
.ato-info-block {
	width: 100%;
	border: 1.5px solid #E3E6E8;
	border-radius: 14px;
	padding: 14px 16px;
	margin-top: 16px;
	background: #fff;
}
.ato-info-block__title { font-size: 14px; font-weight: 700; color: #484F54; margin: 0 0 8px; }
/* усі рядки умов — однаковим шрифтом та розміром (сума / строк / ставка / РРПС) */
.ato-info-list { list-style: none; margin: 0; padding: 0; }
.ato-info-list li {
	font-size: 13px; font-weight: 500; color: #484F54; line-height: 1.5;
	padding: 2px 0; margin: 0;
}
.ato-info-list li b { font-weight: 700; }
.ato-info-text { font-size: 12.5px; font-weight: 500; color: #484F54; line-height: 1.55; margin: 0 0 8px; }
.ato-info-text:last-child { margin-bottom: 0; }
.ato-info-text--muted { color: #6E7579; font-size: 11.5px; }

/* блок «ПОПЕРЕДЖЕННЯ» — напівжирним у рамці (п. 10 Положення № 100) */
.ato-info-block--warning { border-color: #484F54; }
.ato-info-block--warning .ato-info-list li { font-weight: 700; }
.ato-info-list--bullet li { position: relative; padding-left: 14px; }
.ato-info-list--bullet li::before {
	content: '•'; position: absolute; left: 2px; top: 2px;
}

/* ── Main CTA button ── */
.ato-btn-get-money {
	width: 100%; height: 48px;
	background: #2B9641; border: none; border-radius: 50px;
	font-family: 'Montserrat', sans-serif;
	font-size: 22px; font-weight: 700; color: #fff;
	cursor: pointer; letter-spacing: 0.3px;
	display: flex; align-items: center; justify-content: center;
	transition: background .2s;
}
.ato-btn-get-money:hover { background: #247E37; }

/* ── Back link ── */
.ato-back-link {
	display: inline-flex; align-items: center;
	color: #6A8AC4; font-size: 14px; font-weight: 600;
	cursor: pointer; margin-bottom: 24px; text-decoration: none;
}

/* ── Contact form ── */
.ato-form-summary {
	font-size: 12.5px; font-weight: 600; color: #484F54; line-height: 1.5;
	background: #F3F7F4; border-radius: 10px; padding: 10px 12px; margin-bottom: 16px;
}
.ato-form-row { display: flex; align-items: center; margin-bottom: 16px; }
.ato-form-row__label { font-size: 14px; font-weight: 500; width: 50%; }
.ato-form-row__right {
	width: 50%; border: 1px solid #484F54; border-radius: 24px;
	height: 40px; display: flex; align-items: center; padding: 0 14px;
}
.ato-form-row__input {
	border: none; outline: none; background: transparent;
	font-family: 'Montserrat', sans-serif; font-size: 14px; width: 100%;
}
.ato-btn-send {
	width: 100%; height: 50px; margin-top: 8px;
	background: #2B9641; border: 1px solid #2B9641; border-radius: 12px;
	font-family: 'Montserrat', sans-serif; font-size: 16px; font-weight: 600;
	color: #fff; cursor: pointer; transition: background .2s;
}
.ato-btn-send:hover { background: #247E37; }
.ato-btn-send:disabled { opacity: .6; cursor: default; }
.ato-form-error { color: #D32027; font-size: 12.5px; font-weight: 600; margin-top: 10px; }

.ato-show { display: block; color: #6A8AC4; font-size: 14px; margin-top: 16px; }
.ato-hide { display: none; }

/* ── Жорсткий ресет інпутів проти стилів теми WP (рамки/тіні/відступи) ── */
.ato-calc-scope input.ato-calc-row__input,
.ato-calc-scope input.ato-form-row__input {
	border: 0 !important;
	outline: 0 !important;
	background: transparent !important;
	box-shadow: none !important;
	border-radius: 0 !important;
	padding: 0 !important;
	margin: 0 !important;
	height: auto !important;
	min-height: 0 !important;
	line-height: normal !important;
}
.ato-calc-scope input.ato-calc-row__input:focus,
.ato-calc-scope input.ato-form-row__input:focus {
	border: 0 !important;
	outline: 0 !important;
	box-shadow: none !important;
}
.ato-calc-scope input.ato-calc-line__input {
	border: 0 !important;
	background: transparent !important;
	box-shadow: none !important;
	padding: 0 !important;
	border-radius: 0 !important;
}

/* ── Екран успіху ── */
.ato-success {
	display: flex; flex-direction: column; align-items: center; justify-content: center;
	text-align: center; padding: 40px 10px; min-height: 280px;
}
.ato-success__icon {
	width: 64px; height: 64px; border-radius: 50%;
	background: #2B9641; color: #fff;
	display: flex; align-items: center; justify-content: center;
	font-size: 34px; line-height: 1; margin-bottom: 18px;
}
.ato-success__title {
	font-size: 20px; font-weight: 700; color: #484F54; margin-bottom: 10px;
}
.ato-success__text {
	font-size: 15px; font-weight: 500; color: #828282; line-height: 1.4; max-width: 300px;
}

@media (max-width: 1366px) {
	.ato-calc-inner { padding: 28px 20px 26px; }
	.ato-title-extend { font-size: 27px; line-height: 1.2; }
}
@media (max-width: 480px) {
	.ato-calc-row { flex-wrap: wrap; }
	.ato-calc-row__label { font-size: 15px; }
	.ato-res-row { flex-direction: column; align-items: flex-start; gap: 2px; }
	.ato-form-row { flex-wrap: wrap; gap: 6px; }
	.ato-form-row__label, .ato-form-row__right { width: 100%; }
}

/* ── Попередження про реквізити платіжної картки (п. 9 ТЗ) ── */
.ato-card-notice {
	background: #fff;
	border: 2px solid #D32027;
	border-radius: 10px;
	color: #D32027;
	font-family: 'Montserrat', sans-serif;
	font-weight: 700;
	font-size: 13px;
	line-height: 1.45;
	padding: 14px 16px;
	margin: 0 0 20px;
	text-align: justify;
}
