/**
 * Layout overflow fixes (loads last). Tablet + mobile.
 */

body.site-theme button,
body.site-theme input[type="button"],
body.site-theme input[type="submit"],
body.site-theme input[type="reset"],
body.site-theme .btn,
body.site-theme a.btn,
body.site-theme .primary-button {
	font-family: inherit !important;
}

body.site-theme .single-review,
body.site-theme .single-review .review-item,
body.site-theme .single-review .review-author,
body.site-theme .single-review .review-author span,
body.site-theme .single-review .review-message,
body.site-theme .category-title {
	font-family: inherit !important;
}

@media (max-width: 1024px) {
	html,
	body.site-theme {
		max-width: 100%;
		overflow-x: hidden;
	}

	body.site-theme .header {
		box-sizing: border-box;
		left: 0;
		max-width: 100%;
		padding-inline: 12px;
		right: auto;
		width: 100%;
	}

	body.site-theme .header__top.container {
		box-sizing: border-box;
		max-width: 100%;
		padding-inline: 0;
		width: 100%;
	}

	body.site-theme .header__top {
		box-sizing: border-box;
		max-width: 100%;
		min-width: 0;
		padding-inline: 0;
	}

	body.site-theme .header__right {
		flex-shrink: 0;
		gap: 5px;
		min-width: 0;
	}

	body.site-theme .header__top .logo {
		flex-shrink: 1;
		min-width: 0;
		max-width: 90px;
	}

	body.site-theme.header-3 .header__top {
		position: relative;
		height: 100%;
	}

	body.site-theme.header-3 .header__top .logo {
		position: absolute;
		left: 50%;
		top: 50%;
		z-index: 2;
		flex-shrink: 0;
		margin: 0;
		min-height: 0;
		min-width: 0;
		max-width: 110px;
		transform: translate(-50%, -50%);
	}

	body.site-theme .header__top .logo img {
		max-height: 45px;
		width: auto;
		max-width: 100%;
	}

	body.site-theme .header__top nav {
		max-width: 100vw;
	}

	body.site-theme .text_container,
	body.site-theme main > .container,
	body.site-theme main .text_container {
		box-sizing: border-box;
		margin-inline: auto;
		max-width: 100%;
		padding-inline: 15px;
		width: 100%;
	}

	body.site-theme .header_banner {
		padding-inline: 0;
	}

	body.site-theme .category-container {
		box-sizing: border-box;
		gap: 10px;
		grid-template-columns: repeat(auto-fill, minmax(min(100px, 100%), 1fr));
		justify-content: stretch;
		max-width: 100%;
		padding-inline: 16px;
	}

	body.site-theme .category-container > a {
		display: flex;
		max-width: none;
		width: auto;
	}

	.header_banner__text_deposit,
	.site-theme .header_banner__text_deposit {
		max-width: 100%;
		overflow-wrap: break-word;
		width: auto;
	}

	.image-container {
		align-items: stretch;
		flex-direction: column;
		gap: 20px;
		width: 100%;
	}

	.image-container img {
		flex: 0 0 auto;
		max-width: 100%;
		width: 100%;
	}

	.image-container__text {
		flex: 1 1 auto;
		width: 100%;
	}

	body.site-theme .slots_list {
		flex-wrap: nowrap;
		gap: 12px;
		justify-content: flex-start;
		-ms-overflow-style: none;
		overflow-x: auto;
		scrollbar-width: thin;
		-webkit-overflow-scrolling: touch;
	}

	body.site-theme .text_container table:not(.builder-table__table) {
		max-width: 100% !important;
		width: 100% !important;
	}

	/* .builder-table — horizontal scroll on narrow viewports (variants 1–4) */
	body.site-theme .text_container .builder-table:not([data-builder-table-expandable]) {
		display: block;
		width: fit-content;
		max-width: 100%;
		margin-inline: auto;
		overflow-x: auto;
		overflow-y: hidden;
		-webkit-overflow-scrolling: touch;
		scrollbar-width: thin;
		overscroll-behavior-x: contain;
	}

	body.site-theme .text_container .builder-table:not([data-builder-table-expandable]) .builder-table__table {
		display: table;
		width: auto !important;
		max-width: none !important;
		min-width: 560px !important;
		margin-inline: auto;
		table-layout: auto;
	}

	body.site-theme .text_container .builder-table .builder-table__table th,
	body.site-theme .text_container .builder-table .builder-table__table td {
		white-space: normal;
		overflow-wrap: break-word;
		word-wrap: break-word;
	}

	body.site-theme > .reviews-container,
	body.site-theme > .app-container {
		box-sizing: border-box;
		margin-inline: auto;
		max-width: 100%;
		padding-inline: 16px;
		width: 100%;
	}
}

/* Desktop/tablet landscape — center site column (1260px) */
@media (min-width: 1025px) {
	body.site-theme main {
		box-sizing: border-box;
		margin-inline: auto;
		max-width: 100%;
		width: 100%;
	}

	body.site-theme .text_container,
	body.site-theme main .text_container {
		box-sizing: border-box;
		margin-inline: auto;
		max-width: var(--container-width, 1260px);
		width: 100%;
	}

	body.site-theme .container,
	body.site-theme .header__top.container,
	body.site-theme .header_banner .header_banner__slide > .container,
	body.site-theme .header_banner__container .container {
		box-sizing: border-box;
		margin-inline: auto;
		max-width: var(--container-width, 1260px);
		width: 100%;
	}

	body.site-theme .toc-block,
	body.site-theme .category-container,
	body.site-theme .category-block .category-container,
	body.site-theme .slots-list-block {
		box-sizing: border-box;
		margin-inline: auto;
		max-width: var(--container-width, 1260px);
		width: 100%;
	}
}

/* .builder-table — full width on desktop, centered column */
body.site-theme .text_container .builder-table:not([data-builder-table-expandable]) {
	display: block;
	width: 100%;
	max-width: 100%;
	margin-inline: auto;
	overflow-x: auto;
	overflow-y: hidden;
	-webkit-overflow-scrolling: touch;
}

body.site-theme .text_container .builder-table[data-builder-table-expandable] {
	text-align: center;
	width: 100%;
	max-width: 100%;
}

body.site-theme .text_container .builder-table:not([data-builder-table-expandable]) .builder-table__table {
	margin-inline: auto;
	width: 100%;
}

@media (min-width: 769px) {
	body.site-theme .text_container .builder-table[data-builder-table-expandable] .builder-table__scroll {
		overflow-x: hidden;
	}

	body.site-theme .text_container .builder-table[data-builder-table-expandable] .builder-table__table {
		margin-inline: auto;
		width: 100%;
		min-width: 0;
		max-width: 100%;
		table-layout: fixed;
	}
}

@media (max-width: 768px) {
	body.site-theme .text_container .builder-table[data-builder-table-expandable]:not(.is-expanded) .builder-table__scroll {
		overflow-x: hidden !important;
	}

	body.site-theme .text_container .builder-table[data-builder-table-expandable].is-expanded .builder-table__scroll {
		overflow-x: auto !important;
		-webkit-overflow-scrolling: touch;
		scrollbar-width: thin;
		overscroll-behavior-x: contain;
	}

	body.site-theme .text_container .builder-table[data-builder-table-expandable] .builder-table__table {
		width: 600px !important;
		min-width: 600px !important;
		max-width: none !important;
		table-layout: fixed !important;
	}
}
