/* ============================================================================
   HOMEPAGE FIXES — точечные правки по фидбеку юзера (2026-05-14)
   Подгружается ПОСЛЕ всех других CSS (через <link> перед {{ footer }})
   → выигрывает source order, не ломая остальные стили.

   Список:
   1) Login modal — кнопка не ломается размером когда вылазит warning/error
   2) Mobile/tablet — больше отступ от хедера до слогана (saving-text)
   3) Dimensions inputs + Add item — шрифт как у postal code (14px)
   4) Удалить плейсхолдер "City, street and number." (см. home.twig)
   5) Удалить бляшку "8+ carriers" (см. home.twig)
   6) Меньше отступ между секциями "One Place" (exclusive-benefits) и Partners
   ============================================================================ */


/* ---------------------------------------------------------------------------
   #1 — Login modal: button stays fixed size when alert appears
   --------------------------------------------------------------------------- */
.psr-auth-modal .psr-auth-alert {
	flex-shrink: 0 !important;
	box-sizing: border-box !important;
	width: 100% !important;
	margin: 0 !important;
}
.psr-auth-modal .psr-auth-submit {
	flex-shrink: 0 !important;
	flex-grow: 0 !important;
	box-sizing: border-box !important;
	width: 100% !important;
	height: 54px !important;
	min-height: 54px !important;
	max-height: 54px !important;
	padding: 0 24px !important;
	margin: 6px 0 0 0 !important;
	white-space: nowrap !important;
}
.psr-auth-modal .psr-auth-google {
	flex-shrink: 0 !important;
	box-sizing: border-box !important;
	width: 100% !important;
	min-height: 50px !important;
}
.psr-auth-modal .psr-auth-field {
	flex-shrink: 0 !important;
}
.psr-auth-modal .psr-auth-divider {
	flex-shrink: 0 !important;
}
.psr-auth-modal .psr-auth-foot {
	flex-shrink: 0 !important;
}
/* Mobile responsive override for submit height stays same */
@media (max-width: 720px) {
	.psr-auth-modal .psr-auth-submit {
		flex-shrink: 0 !important;
		flex-grow: 0 !important;
		width: 100% !important;
	}
}


/* ---------------------------------------------------------------------------
   #2 — Spacing between header and tagline + tablet font-size
   Tablet (481-991px): уменьшаем отступ сверху (было 40px+24px = 64px → 12px+4px = 16px),
   slogan ближе к верху. Заодно увеличиваем "SAVING ON WORLDWIDE SHIPPING WITH"
   до 15px (перебиваем hero-premium.css clamp(12px,1.15vw,15px), на 852px было 12px).
   Mobile (≤480px): оставляем margin-top для slogan как был (16px) — прошлый фикс был ок.
   Desktop (≥992px): не трогаем.
   --------------------------------------------------------------------------- */
@media (min-width: 481px) and (max-width: 991px) {
	body .get-quote-section {
		padding-top: 12px !important;
	}
	body .get-quote-section .saving-text,
	body .main-section .saving-text {
		margin-top: 4px !important;
	}
	/* hero-premium.css задаёт clamp(12px,1.15vw,15px) без media → на планшете 12px.
	   Перебиваем — даём нормально читаемые 15px. */
	body .saving-text .saving-text-main {
		font-size: 15px !important;
		line-height: 1.3 !important;
	}
}
@media (max-width: 480px) {
	body .get-quote-section .saving-text,
	body .main-section .saving-text {
		margin-top: 16px !important;
	}
}

/* ---------------------------------------------------------------------------
   #7 — Mobile/tablet: hero background WHITE (как десктоп), сливается с хидером.
   Перебиваем градиент `linear-gradient(180deg, #fbfcfe, #f2f4f8)` из refresh.css.
   --------------------------------------------------------------------------- */
@media (max-width: 991px) {
	body .get-quote-section {
		background: #ffffff !important;
		background-image: none !important;
		border-bottom: none !important;
	}
	body .get-quote-section .main-section,
	body .main-section {
		background: #ffffff !important;
		background-image: none !important;
	}
	body .psr-section-divider::before {
		display: none !important;
	}
}


/* ---------------------------------------------------------------------------
   #3 — Dimensions labels + Add item — letter-spacing как postal code label
   POSTAL CODE label: letter-spacing: 0.08em (см. #mainForm .section-labels .label-text)
   WEIGHT/WIDTH/LENGTH/HEIGHT (.dim-label) сейчас: 0.1em → меняем на 0.08em
   Add item button сейчас: нет letter-spacing → ставим 0.08em
   --------------------------------------------------------------------------- */
body #mainForm .dim-input-wrapper .dim-label {
	letter-spacing: 0.08em !important;
}
body #mainForm .buttons-area #addItemButton {
	letter-spacing: 0.08em !important;
}


/* ---------------------------------------------------------------------------
   #4 — Placeholder "City, street and number." видимый в home.twig.
   Google Places autocomplete suggestions РАБОТАЮТ (юзер их явно попросил).
   Никаких .pac-container overrides здесь нет.
   --------------------------------------------------------------------------- */


/* ---------------------------------------------------------------------------
   #5 — Hide "8+ carriers" badge
   (плюс в home.twig сам блок удалён — двойной защитный слой)
   --------------------------------------------------------------------------- */
body .psr-hero-partners .psr-hero-partners-tag {
	display: none !important;
}


/* ---------------------------------------------------------------------------
   #6 — Reduce gap between "One Place" (exclusive-benefits) and Partners section
   Было: .exclusive-benefits { padding: 80px 0 } + .partners { padding: 80px 0 }
   Стало: 80px 0 30px / 30px 0 80px = убираем bottom первой и top второй до 30px
   --------------------------------------------------------------------------- */
body .exclusive-benefits {
	padding-bottom: 10px !important;
}
body .partners {
	padding-top: 10px !important;
}
@media (max-width: 991px) {
	body .exclusive-benefits {
		padding-bottom: 8px !important;
	}
	body .partners {
		padding-top: 8px !important;
	}
}


/* ============================================================================
   2026-05-19 v2 — Mobile: hide WhatsApp-float, disable carrier flip, AI trigger низ
   ============================================================================ */
@media (max-width: 991px) {
	/* WhatsApp убираем с главной полностью (юзер: "иконку ватсапа удали с главной") */
	body .whatsapp-float,
	body .whatsapp-float.right,
	body .whatsapp-float.left {
		display: none !important;
	}
	/* AI-trigger чат-бота ниже к самому низу (WhatsApp больше нет — нет конкурента) */
	body .dda-trigger {
		bottom: 16px !important;
		right: 14px !important;
	}
	/* Carrier-карточки в секции "Our partners" — не кликабельные, без hover-flip */
	body .partners .block-pictures {
		pointer-events: none !important;
		cursor: default !important;
	}
	body .partners .block-pictures::before,
	body .partners .block-pictures::after {
		display: none !important;        /* убираем text-curtain hover */
		transform: none !important;
	}
	body .partners .block-pictures img {
		opacity: 1 !important;            /* лого всегда видно (на десктопе при hover становится 0) */
		transition: none !important;
	}
	body .partners .block-pictures:hover,
	body .partners .block-pictures:active,
	body .partners .block-pictures:focus-within {
		transform: none !important;
		box-shadow: 0 2px 6px rgba(0,0,0,0.06), 0 6px 14px rgba(0,0,0,0.08) !important;
	}
	body .partners .block-pictures:hover img,
	body .partners .block-pictures:active img,
	body .partners .block-pictures:focus-within img {
		opacity: 1 !important;
	}
	/* Чистый вид: тонкая обводка, минимум тени */
	body .partners .partners-images {
		grid-template-columns: repeat(2, 1fr) !important;
		gap: 12px !important;
		max-width: 100% !important;
	}
	body .partners .block-pictures {
		background: #ffffff !important;
		border: 1px solid #eef0f3 !important;
		border-radius: 14px !important;
		box-shadow: none !important;
		padding: 18px 14px !important;
		height: 96px !important;
		display: flex !important;
		align-items: center !important;
		justify-content: center !important;
	}
	body .partners .block-pictures img {
		max-height: 36px !important;
		max-width: 80% !important;
		opacity: 1 !important;
	}
}

/* ============================================================================
   2026-05-19 — Hero partners на mobile: transparent, big logos, label под ними
   (юзер: "без фона, логотипы больше, надпись 'партнёры с которыми мы сотрудничаем'
    ПОД ними, отступ от формы")
   ============================================================================ */
@media (max-width: 991px) {
	body .psr-hero-partners {
		z-index: 1 !important;
		display: flex !important;
		flex-direction: column !important;
		padding: 0 !important;
		margin: 28px 14px 16px !important;     /* большой margin-top — отступ от формы */
		border-radius: 0 !important;
		box-shadow: none !important;            /* без тени */
		border: 0 !important;
		background: transparent !important;     /* без фона */
		gap: 8px !important;
	}
	/* Header с label ОТОДВИГАЕМ ВНИЗ через flex order */
	body .psr-hero-partners .psr-hero-partners-head {
		order: 2 !important;                    /* было первым → теперь после marquee */
		gap: 6px !important;
		padding: 0 !important;
		margin: 4px 0 0 0 !important;
		justify-content: center !important;
		text-align: center !important;
	}
	body .psr-hero-partners-label {
		font-size: 11px !important;
		letter-spacing: 0.1em !important;
		color: #7a7e86 !important;             /* мягкий серый */
		font-weight: 600 !important;
		text-transform: uppercase !important;
		text-align: center !important;
	}
	body .psr-hero-partners-label::before {
		display: none !important;
	}
	/* Marquee — крупнее логотипы, фейд по краям */
	body .psr-hero-marquee {
		order: 1 !important;                    /* марки сверху */
		max-width: 100% !important;
		overflow: hidden !important;
		mask-image: linear-gradient(90deg, transparent 0, #000 8%, #000 92%, transparent 100%) !important;
		-webkit-mask-image: linear-gradient(90deg, transparent 0, #000 8%, #000 92%, transparent 100%) !important;
	}
	body .psr-hero-marquee-track {
		gap: 32px !important;                   /* больше воздуха между логотипами */
		animation-duration: 36s !important;
	}
	body .psr-hero-logo {
		width: auto !important;
		min-width: 80px !important;
		max-width: 110px !important;
		height: 44px !important;                /* было 28 — крупнее */
		padding: 0 !important;
		background: transparent !important;     /* без рамки/фона */
		border: 0 !important;
		box-shadow: none !important;
		border-radius: 0 !important;
		display: flex !important;
		align-items: center !important;
		justify-content: center !important;
		flex-shrink: 0 !important;
	}
	body .psr-hero-logo img {
		max-height: 36px !important;            /* было 22 — крупнее */
		max-width: 100% !important;
		object-fit: contain !important;
		opacity: 1 !important;
		filter: none !important;
	}
	/* Убираем декоративные accent элементы */
	body .psr-hero-partners::after,
	body .psr-hero-partners::before {
		display: none !important;
	}
}

/* ============================================================
   2026-05-24 — Partner cards: tap-to-toggle on mobile
   ============================================================
   На десктопе hover работает (curtain открывается при наведении).
   На мобиле hover отсутствует — был только :active, который держал
   curtain открытым лишь пока палец прижат. JS добавляет класс .is-open
   на карточку по тапу — здесь правила его подхватывают.
   ============================================================ */
.partners .block-pictures.is-open::before,
.partners .block-pictures.is-open::after {
	transform: translateY(0) !important;
}
.partners .block-pictures.is-open img {
	opacity: 0 !important;
}
.partners .block-pictures.is-open {
	border-color: rgba(240,26,38,.5) !important;
	box-shadow:
		0 1px 0 rgba(255,255,255,.18) inset,
		0 30px 54px -18px rgba(240,26,38,.45),
		0 14px 24px -8px rgba(15,17,21,.14) !important;
}
