/* Clan DM — мобильная версия для всех шаблонов сайта */
html.clan-dm-fullpage,
html.clan-dm-fullpage body {
	overflow-x: hidden;
}

.clan-dm,
.clan-dm * {
	box-sizing: border-box;
}

.clan-dm {
	max-width: 100%;
	min-width: 0;
}

/* fullpage wrappers: Solution / GameX / nevercolor / slim */
@media (max-width: 991px) {
	html.clan-dm-fullpage .right_block,
	html.clan-dm-fullpage .left_block,
	html.clan-dm-fullpage .col-lg-3.order-is-last,
	html.clan-dm-fullpage .col-md-3,
	html.clan-dm-fullpage .top_col_3,
	html.clan-dm-fullpage aside.sidebar,
	html.clan-dm-fullpage .sidebar_secondary,
	html.clan-dm-fullpage .home_right_col {
		display: none !important;
	}

	html.clan-dm-fullpage .center_block,
	html.clan-dm-fullpage .r_block,
	html.clan-dm-fullpage .col-lg-9.order-is-first,
	html.clan-dm-fullpage .col-lg-12.order-is-first,
	html.clan-dm-fullpage .col-md-9,
	html.clan-dm-fullpage .clan-dm-fullwrap,
	html.clan-dm-fullpage .page-content,
	html.clan-dm-fullpage .page-content-body {
		width: 100% !important;
		max-width: 100% !important;
		flex: 1 1 100% !important;
		margin: 0 !important;
		float: none !important;
		padding-left: 0 !important;
		padding-right: 0 !important;
	}

	html.clan-dm-fullpage .container,
	html.clan-dm-fullpage .container-fluid,
	html.clan-dm-fullpage .wapper > section > main,
	html.clan-dm-fullpage .middle,
	html.clan-dm-fullpage .main_content {
		padding-left: 10px !important;
		padding-right: 10px !important;
	}
}

@media (max-width: 720px) {
	.clan-dm {
		padding-bottom: 18px;
	}

	.clan-dm-actions,
	.clan-dm-sort,
	.clan-dm-menu,
	.clan-dm-links,
	.clan-dm-invite__actions,
	.clan-dm-season-list__row {
		width: 100%;
		gap: 8px;
	}

	.clan-dm-actions {
		justify-content: stretch;
	}

	.clan-dm-actions .btn,
	.clan-dm-actions .clan-dm-btn,
	.clan-dm-sort a,
	.clan-dm-menu a {
		flex: 1 1 calc(50% - 8px);
		min-width: 0;
		justify-content: center;
		text-align: center;
	}

	.clan-dm-grid,
	.clan-dm-layout,
	.clan-dm-manage-page,
	.clan-dm-event,
	.clan-dm-shop-grid,
	.clan-dm-map-grid,
	.clan-dm-block > .clan-dm-grid,
	.clan-dm-top-servers__row,
	.clan-dm-top-servers__row.is-2,
	.clan-dm-top-servers__row.is-3,
	.clan-dm-top-servers__row.is-many {
		grid-template-columns: minmax(0, 1fr) !important;
	}

	.clan-dm-season-card__winner {
		grid-template-columns: auto minmax(0, 1fr) !important;
	}

	.clan-dm-season-card__stats {
		grid-column: 2;
		white-space: normal !important;
	}

	.clan-dm-season-modal__table-wrap {
		display: block;
		width: 100%;
		max-width: 100%;
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
	}

	.clan-dm-metrics {
		grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
	}

	.clan-dm .clan-dm-metrics > div > strong,
	.clan-dm .clan-dm-metric__value {
		font-size: 16px !important;
		line-height: 1.25 !important;
		position: static !important;
		transform: none !important;
	}

	.clan-dm .clan-dm-top__stat strong {
		font-size: 14px !important;
		position: static !important;
		transform: none !important;
	}

	.clan-dm-card {
		min-height: 0;
	}

	.clan-dm-card__head,
	.clan-dm-top,
	.clan-dm-hero,
	.clan-dm-shop-head,
	.clan-dm-panel-head {
		grid-template-columns: 1fr !important;
	}

	.clan-dm-season__content {
		grid-template-columns: 1fr !important;
		min-height: 180px;
		padding: 16px !important;
		gap: 12px;
	}

	.clan-dm-season__title {
		font-size: 22px !important;
	}

	.clan-dm-season__timer {
		width: 100%;
		min-width: 0;
	}

	.clan-dm-season__prizes {
		gap: 6px;
	}

	.clan-dm-season__prizes li {
		font-size: 12px;
		padding: 6px 8px;
	}

	/* tables: горизонтальный скролл вместо ломки вёрстки */
	.clan-dm-table-wrap,
	.clan-dm-sheet,
	.clan-dm-manage-body,
	.clan-dm .table-responsive {
		display: block;
		width: 100%;
		max-width: 100%;
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
	}

	.clan-dm table {
		min-width: 520px;
	}

	.clan-dm input:not([type="checkbox"]):not([type="radio"]),
	.clan-dm select,
	.clan-dm textarea,
	.clan-dm .form-control {
		max-width: 100% !important;
		width: 100% !important;
		font-size: 16px !important; /* iOS zoom fix */
	}

	.clan-dm .btn,
	.clan-dm .btn-primary,
	.clan-dm .btn-dark,
	.clan-dm-btn {
		min-height: 42px;
	}

	.modal.clan-dm .modal-dialog,
	.clan-dm-modal__dialog {
		width: calc(100% - 16px) !important;
		max-width: calc(100% - 16px) !important;
		margin: 8px auto !important;
	}

	.clan-dm-modal__dialog {
		max-height: calc(100vh - 16px);
		overflow: auto;
	}

	.clan-dm-chat {
		max-height: 280px;
	}

	.clan-dm-top__stats {
		width: 100%;
		justify-content: space-between;
	}

	.clan-dm-history li {
		grid-template-columns: 1fr !important;
	}

	.clan-dm-match {
		grid-template-columns: 1fr !important;
	}

	.clan-dm-match__side,
	.clan-dm-match__side:first-child,
	.clan-dm-match__side:last-child {
		align-items: center;
		text-align: center;
	}
}

@media (max-width: 480px) {
	.clan-dm-actions .btn,
	.clan-dm-actions .clan-dm-btn,
	.clan-dm-sort a,
	.clan-dm-menu a {
		flex: 1 1 100%;
	}

	.clan-dm-season {
		min-height: 160px;
		border-radius: 12px;
	}

	.clan-dm-season__title {
		font-size: 20px !important;
	}

	.clan-dm-season__countdown {
		font-size: 18px;
	}

	.clan-dm-card,
	.clan-dm-hero,
	.clan-dm-shop,
	.clan-dm-panel-card {
		border-radius: 12px;
	}

	html.clan-dm-fullpage .container,
	html.clan-dm-fullpage .container-fluid,
	html.clan-dm-fullpage .wapper > section > main,
	html.clan-dm-fullpage .middle,
	html.clan-dm-fullpage .main_content {
		padding-left: 8px !important;
		padding-right: 8px !important;
	}
}

/* Cyber / Solution: clip-path на узком экране режем мягче, чтобы не обрезало контент */
@media (max-width: 720px) {
	.clan-dm-card,
	.clan-dm-hero,
	.clan-dm-shop,
	.clan-dm-panel-card,
	.clan-dm-chat-box,
	.modal.clan-dm .modal-content,
	.clan-dm-invites .clan-dm-invite,
	.clan-dm-season,
	.clan-dm .btn-primary,
	.clan-dm .btn-dark {
		clip-path: none !important;
	}
}

@media (prefers-reduced-motion: reduce) {
	.clan-dm *,
	.clan-dm *::before,
	.clan-dm *::after {
		animation: none !important;
		transition: none !important;
		scroll-behavior: auto !important;
	}
}

/* slim host shape on small screens */
@media (max-width: 720px) {
	.clan-dm {
		--dm-radius: 10px;
		--dm-btn-radius: 8px;
	}
}
