/*
 * Хаб роуминга и страница страны.
 * Крошки, заголовки и соседние записи берутся из news.css.
 */

.cm-roam .cm-post {
	max-width: none;
	margin-inline: 0;
}

.cm-roam a {
	text-decoration: none;
}

.cm-roam a:hover,
.cm-roam a:focus-visible {
	text-decoration: none;
}

.cm-roam-filters {
	display: flex;
	flex-wrap: nowrap;
	gap: 8px;
	margin: 0 0 22px;
	overflow-x: auto;
	overscroll-behavior-x: contain;
	scroll-snap-type: x proximity;
	scrollbar-width: none;
	cursor: grab;
	-webkit-overflow-scrolling: touch;
}

.cm-roam-filters.is-dragging {
	cursor: grabbing;
	user-select: none;
}

.cm-roam-filters::after {
	content: "";
	flex: 0 0 4px;
}

.cm-roam-filters::-webkit-scrollbar {
	display: none;
}

.cm-roam-filters button {
	flex: 0 0 auto;
	margin: 0;
	padding: 8px 14px;
	border: 1px solid var(--cm-line);
	border-radius: 999px;
	background: #fff;
	color: var(--cm-dark-grey);
	font-family: inherit;
	font-size: 14px;
	font-weight: 700;
	line-height: 1.2;
	white-space: nowrap;
	cursor: pointer;
	scroll-snap-align: start;
}

.cm-roam-filters button:hover,
.cm-roam-filters button:focus-visible,
.cm-roam-filters button.is-active {
	border-color: var(--cm-orange);
	background: var(--cm-orange);
	color: #fff;
}

.cm-roam-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 20px;
}

.cm-roam-card {
	display: flex;
	flex-direction: column;
	overflow: hidden;
	border: 1px solid var(--cm-line);
	border-radius: 16px;
	background: #fff;
	box-shadow: 0 1px 0 rgb(0 0 0 / 3%);
	transition: border-color 0.2s, box-shadow 0.2s;
}

.cm-roam-card:hover,
.cm-roam-card:focus-within {
	border-color: transparent;
	box-shadow: var(--cm-shadow);
}

.cm-roam-card--extra {
	display: none;
}

.cm-roam-card--off {
	display: none;
}

.cm-roam.is-filtered .cm-roam-card--extra:not(.cm-roam-card--off) {
	display: flex;
}

.cm-roam.is-filtered .cm-roam-more {
	display: none;
}

.cm-roam-card__media {
	position: relative;
	aspect-ratio: 16 / 9;
	background: var(--cm-bg-soft);
}

.cm-roam-card__cover,
.cm-roam-card__cover img,
.cm-roam-card__placeholder {
	position: absolute;
	inset: 0;
	display: block;
	width: 100%;
	height: 100%;
}

.cm-roam-card__cover img {
	object-fit: cover;
}

.cm-roam-card__placeholder {
	background:
		linear-gradient(160deg, rgb(255 101 1 / 28%), transparent 46%),
		var(--cm-bg-soft);
}

.cm-roam-card__country {
	position: absolute;
	z-index: 1;
	top: 12px;
	left: 12px;
	max-width: calc(100% - 24px);
	padding: 5px 10px;
	border-radius: 999px;
	background: rgb(17 17 17 / 72%);
	color: #fff;
	font-size: 13px;
	font-weight: 700;
	line-height: 1.2;
}

.cm-roam-card__body {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	gap: 8px;
	padding: 14px 16px 16px;
}

.cm-roam-card__cat {
	color: var(--cm-orange);
	font-size: 13px;
	font-weight: 700;
	line-height: 1.3;
	text-decoration: none;
}

.cm-roam-card__cat:hover,
.cm-roam-card__cat:focus-visible {
	color: var(--cm-dark-grey);
}

.cm-roam-card__title {
	margin: 0;
	color: var(--cm-black);
	font-size: 16px;
	font-weight: 800;
	letter-spacing: -0.01em;
	line-height: 1.35;
}

.cm-roam-card__lead {
	margin: 6px 0 0;
	color: #666;
	font-size: 13px;
	line-height: 1.45;
}

.cm-roam-card__title a {
	color: inherit;
	text-decoration: none;
}

.cm-roam-card__title a:hover,
.cm-roam-card__title a:focus-visible {
	color: var(--cm-orange);
}

.cm-roam-morewrap {
	display: flex;
	flex-direction: column;
	align-items: center;
}

.cm-roam-morewrap .cm-roam-grid {
	width: 100%;
}

.cm-roam-more__input {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
}

.cm-roam-more {
	margin-top: 22px;
	font-size: 14px;
	text-transform: none;
}

.cm-roam-more__input:focus-visible ~ .cm-roam-more {
	outline: 2px solid var(--cm-orange);
	outline-offset: 3px;
}

.cm-roam-more__input:checked ~ .cm-roam-grid .cm-roam-card--extra {
	display: flex;
}

.cm-roam-more__input:checked ~ .cm-roam-more {
	display: none;
}

.cm-roam-empty {
	margin: 0;
	color: var(--cm-text);
}

.cm-roam-lead {
	max-width: 760px;
	margin: 12px 0 0;
	color: #444;
	font-size: 17px;
	line-height: 1.7;
}

.cm-roam-fresh {
	display: inline-block;
	width: fit-content;
	margin: 4px 0 0;
	padding: 10px 12px;
	border-radius: 4px;
	background: #fdf6f0;
	color: #888;
	font-size: 13px;
	line-height: 1.5;
}

.cm-roam-fresh strong,
.cm-roam-fresh time {
	color: #555;
	font-weight: 700;
}

.cm-roam-intro,
.cm-roam-faq,
.cm-roam-guide {
	margin-top: 48px;
	color: #444;
	font-size: 17px;
	line-height: 1.7;
}

.cm-roam-intro h2,
.cm-roam-faq h2,
.cm-roam-guide h2,
.cm-roam-related__title {
	margin: 1.4em 0 0.55em;
	color: var(--cm-black);
	font-size: 28px;
	font-weight: 800;
	letter-spacing: -0.02em;
	line-height: 1.25;
}

.cm-roam-intro > p,
.cm-roam-guide p,
.cm-roam-guide li,
.cm-roam-faq details div {
	margin: 0 0 0.9em;
}

.cm-roam-intro a,
.cm-roam-guide a,
.cm-roam__content a {
	color: var(--cm-orange);
}

.cm-roam-intro ul,
.cm-roam-guide ol {
	margin: 0 0 1em;
	padding-left: 1.2em;
}

.cm-roam-intro li,
.cm-roam-guide li {
	margin: 0 0 0.35em;
}

.cm-roam-faq details {
	border-bottom: 1px solid var(--cm-line);
}

.cm-roam-faq summary {
	padding: 14px 0;
	color: var(--cm-black);
	font-weight: 700;
	cursor: pointer;
}

.cm-roam-faq summary:hover,
.cm-roam-faq summary:focus-visible {
	color: var(--cm-orange);
}

.cm-roam-faq details div {
	padding-bottom: 8px;
	color: #444;
}

.cm-roam-facts,
.cm-roam-table {
	margin: 1.2em 0 1.6em;
}

.cm-roam-facts__row {
	display: grid;
	grid-template-columns: minmax(140px, 34%) minmax(0, 1fr);
	gap: 6px 16px;
	padding: 12px 0;
	border-bottom: 1px solid var(--cm-line);
}

.cm-roam-facts__label {
	color: var(--cm-black);
	font-weight: 700;
}

.cm-roam-facts__value {
	min-width: 0;
}

.cm-roam-table {
	max-width: 100%;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}

.cm-roam-table table {
	width: 100%;
	margin: 0;
	border-collapse: collapse;
	font-size: 15px;
	line-height: 1.45;
}

.cm-roam__content th,
.cm-roam__content td {
	box-sizing: border-box;
	padding: 12px 14px;
	border-bottom: 1px solid var(--cm-line);
	text-align: left;
	vertical-align: top;
}

.cm-roam__content th {
	color: var(--cm-black);
	font-weight: 700;
	background: var(--cm-bg-soft);
}

.cm-roam__content h4 {
	margin: 1.6em 0 0.7em;
	color: var(--cm-black);
	font-size: 22px;
	font-weight: 800;
	letter-spacing: -0.02em;
	line-height: 1.3;
}

.cm-roam__content h4 + ul {
	margin: 0;
	padding: 0;
	list-style: none;
}

.cm-roam__content h4 + ul > li {
	margin: 0 0 12px;
	padding: 14px 16px;
	border: 1px solid var(--cm-line);
	border-radius: 12px;
}

.cm-roam__content h4 + ul > li strong {
	color: var(--cm-black);
}

.cm-roam__content h4 + ul > li p {
	margin: 0.35em 0 0;
}

.cm-roam__content img {
	max-width: 100%;
	height: auto;
}

.cm-wx {
	margin: 1.6em 0 2em;
}

.cm-wx__grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
	gap: 16px;
}

.cm-wx__city {
	min-width: 0;
	padding: 14px 16px 6px;
	border: 1px solid var(--cm-line);
	border-radius: var(--cm-radius);
	background: #fff;
}

.cm-roam__content .cm-wx__name {
	margin: 0 0 6px;
	font-size: 18px;
	line-height: 1.3;
}

.cm-wx__table {
	width: 100%;
	margin: 0;
	border-collapse: collapse;
	font-size: 15px;
	line-height: 1.3;
	font-variant-numeric: tabular-nums;
}

.cm-roam__content .cm-wx__table th,
.cm-roam__content .cm-wx__table td {
	padding: 6px 4px;
	background: none;
	vertical-align: middle;
}

.cm-roam__content .cm-wx__table thead th {
	color: var(--cm-text);
	font-size: 13px;
}

.cm-roam__content .cm-wx__table tbody th {
	color: var(--cm-black);
	white-space: nowrap;
}

.cm-roam__content .cm-wx__table tbody tr:last-child > * {
	border-bottom: 0;
}

.cm-roam__content .cm-wx__table th:nth-child(2),
.cm-roam__content .cm-wx__sky {
	width: 36px;
	text-align: center;
}

.cm-roam__content .cm-wx__table th:nth-child(n+3),
.cm-roam__content .cm-wx__max,
.cm-roam__content .cm-wx__min {
	width: 52px;
	text-align: right;
}

.cm-wx__ico {
	display: block;
	margin: 0 auto;
}

.cm-wx__max {
	color: var(--cm-black);
	font-weight: 700;
}

.cm-wx__min {
	color: var(--cm-text);
}

.cm-wx__source {
	margin: 10px 0 0;
	color: var(--cm-text);
	font-size: 13px;
}

.cm-roam-related {
	margin-top: 48px;
}

.cm-roam-related__title {
	margin-top: 0;
}

@media (min-width: 1025px) {
	.cm-roam-intro__cols {
		display: grid;
		grid-template-columns: repeat(4, minmax(0, 1fr));
		gap: 8px 32px;
		margin-top: 8px;
	}

	.cm-roam-intro__cols h2 {
		margin-top: 0;
		font-size: 20px;
	}
}

@media (max-width: 1100px) {
	.cm-roam-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 700px) {
	.cm-roam-grid {
		grid-template-columns: 1fr;
	}

	.cm-roam-facts__row {
		grid-template-columns: 1fr;
		gap: 4px;
	}

	.cm-roam-table {
		overflow: visible;
	}

	.cm-roam-table table,
	.cm-roam-table thead,
	.cm-roam-table tbody,
	.cm-roam-table tr,
	.cm-roam-table td,
	.cm-roam-table tbody th {
		display: block;
		width: auto;
	}

	.cm-roam-table thead {
		position: absolute;
		width: 1px;
		height: 1px;
		overflow: hidden;
		clip: rect(0 0 0 0);
	}

	.cm-roam-table tr {
		margin: 0 0 12px;
		padding: 4px 14px 12px;
		border: 1px solid var(--cm-line);
		border-radius: 12px;
	}

	.cm-roam-table td,
	.cm-roam-table tbody th {
		padding: 8px 0 0;
		border: 0;
		background: transparent;
	}

	.cm-roam-table td::before,
	.cm-roam-table tbody th::before {
		content: attr(data-label);
		display: block;
		margin-bottom: 2px;
		color: var(--cm-text);
		font-size: 12px;
		font-weight: 700;
	}

	.cm-roam-intro,
	.cm-roam-faq,
	.cm-roam-guide {
		font-size: 16px;
	}

	.cm-roam-intro h2,
	.cm-roam-faq h2,
	.cm-roam-guide h2,
	.cm-roam-related__title {
		font-size: 24px;
	}

	.cm-roam-card__country {
		font-size: 12px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.cm-roam-card {
		transition: none;
	}
}
