/* 1000bankov.ru/kurs/travel/ — redesign только таблицы курсов.
   Шрифты не подключаются и не переопределяются. */

.tbtravel-table-box,
.tbtravel-table-box * {
	box-sizing: border-box;
}

.tbtravel-table-box {
	position: relative;
	margin: 18px 0 28px;
	border: 1px solid #d9e8ff;
	border-radius: 22px;
	background: #ffffff;
	box-shadow: 0 18px 42px rgba(24, 84, 170, 0.10);
	overflow: hidden;
}

.tbtravel-table-box::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 4px;
	background: linear-gradient(90deg, #2f80ed 0%, #00a870 100%);
	z-index: 3;
}

.tbtravel-table-toolbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 18px 20px 16px;
	border-bottom: 1px solid #e6f0ff;
	background: linear-gradient(180deg, #f7fbff 0%, #ffffff 100%);
}

.tbtravel-watch-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 42px;
	padding: 10px 18px;
	border: 1px solid #b9d7ff;
	border-radius: 999px;
	background: #eaf4ff;
	color: #0b63ce;
	font-size: 14px;
	line-height: 1.2;
	font-weight: 900;
	text-decoration: none;
	white-space: nowrap;
	transition: background-color .2s ease, border-color .2s ease, transform .2s ease;
}

.tbtravel-watch-btn:hover {
	border-color: #86baff;
	background: #dcedff;
	text-decoration: none;
}

.tbtravel-watch-btn:active {
	transform: translateY(1px);
}

.tbtravel-table-toolbar__note {
	color: #4f6f9f;
	font-size: 13px;
	line-height: 1.35;
	font-weight: 700;
	text-align: right;
}

.tbtravel-table-scroll {
	width: 100%;
	overflow-x: auto;
	overflow-y: visible;
	-webkit-overflow-scrolling: touch;
	background: #ffffff;
}

.tbtravel-table-scroll:focus {
	outline: 2px solid rgba(36, 105, 224, 0.20);
	outline-offset: -2px;
}

.tbtravel-rates-table {
	width: 100%;
	min-width: 860px;
	border-collapse: separate;
	border-spacing: 0;
	background: #ffffff;
}

.tbtravel-rates-table th,
.tbtravel-rates-table td {
	border-right: 1px solid #e6f0ff;
	border-bottom: 1px solid #e6f0ff;
	vertical-align: middle;
}

.tbtravel-rates-table th:last-child,
.tbtravel-rates-table td:last-child {
	border-right: 0;
}

.tbtravel-rates-table tbody tr:last-child td {
	border-bottom: 0;
}

.tbtravel-rates-table thead th {
	position: sticky;
	top: 0;
	z-index: 4;
	padding: 12px 14px;
	background: #eef6ff;
	color: #23517f;
	font-size: 12px;
	line-height: 1.25;
	font-weight: 900;
	text-align: center;
	text-transform: uppercase;
	letter-spacing: .045em;
}

.tbtravel-rates-table thead tr:first-child th {
	border-bottom: 1px solid #d3e6ff;
}

.tbtravel-rates-table thead tr:nth-child(2) th {
	padding-top: 8px;
	padding-bottom: 8px;
	background: #f7fbff;
}

.tbtravel-th-period span {
	display: inline-block;
	margin-left: 5px;
	color: #6c8db5;
	font-weight: 800;
	text-transform: none;
	letter-spacing: 0;
}

.tbtravel-th-operator,
.tbtravel-operator-cell {
	position: sticky;
	left: 0;
	z-index: 5;
	width: 315px;
	min-width: 315px;
	max-width: 315px;
	background: #ffffff;
	box-shadow: 12px 0 22px rgba(24, 84, 170, 0.07);
}

.tbtravel-rates-table thead .tbtravel-th-operator {
	z-index: 8;
	background: #eaf4ff;
	text-align: left;
}

.tbtravel-rates-table tbody td {
	padding: 14px;
	background: #ffffff;
	text-align: center;
	transition: background-color .18s ease;
}

.tbtravel-rates-table tbody tr:nth-child(even) td {
	background: #fbfdff;
}

.tbtravel-rates-table tbody tr:hover td {
	background: #f3f9ff;
}

.tbtravel-rates-table tbody tr:hover .tbtravel-operator-cell {
	background: #f3f9ff;
}

.tbtravel-table-row.pointer {
	cursor: pointer;
}

.tbtravel-table-row_cbrf td {
	background: #fffaf0;
}

.tbtravel-table-row_cbrf:hover td,
.tbtravel-table-row_cbrf:hover .tbtravel-operator-cell {
	background: #fff5df;
}

.tbtravel-operator-cell {
	padding: 14px 18px !important;
	text-align: left !important;
}

.tbtravel-operator-main {
	display: flex;
	align-items: center;
	gap: 15px;
	min-width: 0;
}

.tbtravel-operator-logo {
	flex: 0 0 78px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 78px;
	height: 48px;
	border: 1px solid #d7e7fb;
	border-radius: 16px;
	background: #ffffff;
	overflow: hidden;
	box-shadow: 0 6px 16px rgba(24, 84, 170, 0.07);
}

.tbtravel-operator-logo img {
	display: block;
	width: 100%;
	height: 100%;
	padding: 4px 6px;
	object-fit: contain;
}

.tbtravel-operator-logo_letter {
	color: #1768d8;
	font-size: 22px;
	font-weight: 900;
}

.tbtravel-operator-text {
	min-width: 0;
}

.tbtravel-operator-name {
	display: block;
	max-width: 190px;
	color: #071832;
	font-size: 17px;
	line-height: 1.25;
	font-weight: 900;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.tbtravel-operator-meta {
	display: block;
	margin-top: 4px;
	color: #6f85a3;
	font-size: 11px;
	line-height: 1.25;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: .04em;
}

.tbtravel-sort {
	appearance: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 30px;
	margin: 0;
	border: 1px solid #cfe2fa;
	border-radius: 11px;
	background: #ffffff;
	color: #12345f;
	font-size: 15px;
	line-height: 1;
	font-weight: 900;
	cursor: pointer;
}

.tbtravel-sort:hover {
	border-color: #9ec8fb;
	background: #edf6ff;
}

.tbtravel-rate {
	position: relative;
	display: inline-flex;
	min-width: 104px;
	align-items: center;
	justify-content: center;
	gap: 6px;
	padding: 8px 10px;
	border: 1px solid #e6f0ff;
	border-radius: 14px;
	background: #f7fbff;
	white-space: nowrap;
}

.tbtravel-rate__currency {
	display: none;
	color: #65758c;
	font-size: 12px;
	line-height: 1;
	font-weight: 800;
}

.tbtravel-rate__value {
	color: #06152d;
	font-size: 18px;
	line-height: 1.1;
	font-weight: 900;
	font-variant-numeric: tabular-nums;
}

.tbtravel-rate-diff {
	display: inline-flex;
	align-items: center;
	font-size: 11px;
	line-height: 1;
	font-weight: 900;
	font-variant-numeric: tabular-nums;
}

.tbtravel-rate-diff_up {
	color: #008d56;
}

.tbtravel-rate-diff_down {
	color: #dc3d3d;
}

.tbtravel-rate_best {
	padding-right: 60px;
	border-color: #bdebd3;
	background: #eefbf4;
}

.tbtravel-rate__badge {
	position: absolute;
	top: 50%;
	right: -2px;
	transform: translateY(-50%);
	padding: 3px 7px;
	border-radius: 999px;
	background: #dff7ea;
	color: #087344;
	font-size: 9px;
	line-height: 1;
	font-weight: 900;
	text-transform: uppercase;
	letter-spacing: .035em;
}

.tbtravel-wait-cell {
	padding: 12px 14px !important;
}

.tbtravel-wait-cell button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	min-height: 42px;
	padding: 8px 18px;
	border: 1px solid #f0debd;
	border-radius: 14px;
	background: #fff8ec;
	color: #9b6b13;
	font-size: 13px;
	line-height: 1.2;
	font-weight: 900;
	cursor: pointer;
}

.tbtravel-wait-cell button:hover {
	background: #fff1d7;
	color: #7b5007;
}

.tbtravel-wait-cell button span {
	font-size: 11px;
	font-weight: 800;
}

.tbtravel-forecast-cell {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 7px;
	min-width: 104px;
	min-height: 40px;
	padding: 7px 10px;
	border: 1px solid #e6f0ff;
	border-radius: 14px;
	background: #f7fbff;
	color: #12345f;
	font-size: 12px;
	line-height: 1.2;
	font-weight: 900;
	text-decoration: none;
}

.tbtravel-forecast-cell:hover {
	background: #edf6ff;
	text-decoration: none;
}

.tbtravel-forecast-cell img {
	flex: 0 0 auto;
	display: block;
	width: 20px;
	height: 20px;
}

.tbtravel-forecast-cell span:last-child {
	max-width: 110px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.tbtravel-table-note-row td {
	padding: 16px 18px !important;
	background: #fff7e7 !important;
	color: #7a5a15;
	font-size: 13px;
	line-height: 1.45;
	font-weight: 800;
	text-align: center !important;
}

.tbtravel-table-note-row a {
	color: #1768d8;
	font-weight: 900;
	text-decoration: none;
}

.tbtravel-table-note-row a:hover {
	text-decoration: underline;
}


/* Защита от старых стилей таблиц/сортировки сайта, которые могли быть рассчитаны на div-разметку.
   Важно: только для ПК. На мобиле эти строки должны разваливаться в grid-карточки. */
@media (min-width: 768px) {
	.tbtravel-rates-table .sort__content {
		display: table-row-group !important;
	}

	.tbtravel-rates-table .table__row,
	.tbtravel-rates-table .table__travel,
	.tbtravel-rates-table .tbtravel-table-row {
		display: table-row !important;
	}
}

@media (max-width: 767px) {
	.tbtravel-table-box {
		margin: 14px -12px 22px;
		border: 0;
		border-radius: 0;
		background: #f4f7fb;
		box-shadow: none;
		overflow: visible;
	}

	.tbtravel-table-box::before {
		display: none;
	}

	.tbtravel-table-toolbar {
		margin: 0 12px 12px;
		padding: 12px;
		border: 1px solid #e4edf8;
		border-radius: 16px;
		background: #ffffff;
		box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
	}

	.tbtravel-watch-btn {
		min-height: 38px;
		padding: 9px 14px;
		font-size: 13px;
		max-width: 100%;
	}

	.tbtravel-watch-btn.ring::before,
	.tbtravel-watch-btn.ring::after {
		display: none !important;
		content: none !important;
	}

	.tbtravel-table-toolbar__note {
		max-width: 150px;
		color: #7e8aa0;
		font-size: 11px;
		line-height: 1.3;
	}

	.tbtravel-table-scroll {
		overflow: visible;
		background: transparent;
	}

	.tbtravel-rates-table {
		display: block;
		width: auto;
		min-width: 0;
		margin: 0 10px;
		background: transparent;
		border-collapse: separate;
	}

	.tbtravel-rates-table thead {
		display: none;
	}

	.tbtravel-rates-table tbody.sort__content {
		display: grid !important;
		gap: 12px;
		background: transparent;
	}

	.tbtravel-rates-table .table__row,
	.tbtravel-rates-table .table__travel,
	.tbtravel-rates-table .tbtravel-table-row {
		display: grid !important;
		grid-template-columns: repeat(4, minmax(0, 1fr));
		column-gap: 6px;
		row-gap: 0;
		padding: 16px;
		border: 1px solid #e4edf8;
		border-radius: 16px;
		background: #ffffff;
		box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
	}

	.tbtravel-rates-table th,
	.tbtravel-rates-table td {
		border: 0;
	}

	.tbtravel-rates-table tbody tr:nth-child(even) td,
	.tbtravel-rates-table tbody td,
	.tbtravel-rates-table tbody tr:hover td,
	.tbtravel-rates-table tbody tr:hover .tbtravel-operator-cell,
	.tbtravel-table-row_cbrf td,
	.tbtravel-table-row_cbrf:hover td,
	.tbtravel-table-row_cbrf:hover .tbtravel-operator-cell {
		background: transparent;
	}

	.tbtravel-th-operator,
	.tbtravel-operator-cell {
		position: static;
		left: auto;
		z-index: auto;
		width: auto;
		min-width: 0;
		max-width: none;
		box-shadow: none;
	}

	.tbtravel-operator-cell {
		grid-column: 1 / -1;
		padding: 0 !important;
		margin-bottom: 32px;
	}

	.tbtravel-operator-main {
		gap: 12px;
	}

	.tbtravel-operator-logo {
		flex: 0 0 40px;
		width: 40px;
		height: 40px;
		border: 0;
		border-radius: 50%;
		background: #eaf3ff;
		box-shadow: none;
	}

	.tbtravel-operator-logo img {
		padding: 5px;
	}

	.tbtravel-operator-logo_letter {
		font-size: 18px;
	}

	.tbtravel-operator-name {
		max-width: 230px;
		font-size: 16px;
		line-height: 1.25;
	}

	.tbtravel-operator-meta {
		display: none;
	}

	.tbtravel-rate-cell {
		position: relative;
		padding: 0 !important;
		text-align: center;
	}

	.tbtravel-rate-cell_today-start::before,
	.tbtravel-rate-cell_tomorrow-start::before {
		position: absolute;
		bottom: calc(100% + 8px);
		left: 0;
		width: calc(200% + 6px);
		color: #9aa4b5;
		font-size: 10px;
		line-height: 1.2;
		font-weight: 900;
		text-align: center;
		text-transform: uppercase;
		letter-spacing: .04em;
		pointer-events: none;
	}

	.tbtravel-rate-cell_today-start::before {
		content: "Сегодня";
	}

	.tbtravel-rate-cell_tomorrow-start::before {
		content: "Завтра";
	}

	.tbtravel-rate-cell_tomorrow-start {
		grid-column-start: 3;
	}

	.tbtravel-rate {
		display: flex;
		min-width: 0;
		min-height: 62px;
		width: 100%;
		flex-direction: column;
		align-items: center;
		justify-content: center;
		gap: 4px;
		padding: 8px 4px;
		border: 0;
		border-radius: 9px;
		background: #f8faff;
	}

	.tbtravel-rate__currency {
		display: block;
		font-size: 11px;
	}

	.tbtravel-rate__value {
		font-size: 18px;
		line-height: 1.08;
	}

	.tbtravel-rate-diff {
		font-size: 12px;
		line-height: 1.05;
	}

	.tbtravel-rate-diff__arrow {
		display: inline-block;
		font-size: 13px;
		line-height: 1;
	}

	.tbtravel-rate_best {
		padding-right: 4px;
		background: #eefbf4;
	}

	.tbtravel-rate__badge {
		display: none;
	}

	.tbtravel-wait-cell {
		grid-column: span 2;
		position: relative;
		padding: 0 !important;
	}

	.tbtravel-wait-cell button {
		width: 100%;
		min-height: 62px;
		padding: 8px 8px;
		border: 0;
		border-radius: 9px;
		background: #f8faff;
		color: #909bae;
		font-size: 12px;
		line-height: 1.15;
	}

	.tbtravel-wait-cell button span {
		display: none;
	}

	.tbtravel-forecast-cell {
		display: flex;
		min-width: 0;
		min-height: 62px;
		width: 100%;
		flex-direction: column;
		gap: 4px;
		padding: 8px 4px;
		border: 0;
		border-radius: 9px;
		background: #f8faff;
	}

	.tbtravel-forecast-cell .tbtravel-rate__currency {
		display: block;
	}

	.tbtravel-forecast-cell img {
		width: 28px;
		height: 28px;
	}

	.tbtravel-forecast-cell span:last-child {
		display: none;
	}

	.tbtravel-table-note-row {
		display: block !important;
		padding: 0 !important;
		border: 0 !important;
		border-radius: 0 !important;
		box-shadow: none !important;
	}

	.tbtravel-table-note-row td {
		display: block !important;
		padding: 12px !important;
		border: 1px solid #f1deb8 !important;
		border-radius: 14px;
		background: #fff8e7 !important;
		font-size: 12px;
	}
}

@media (max-width: 374px) {
	.tbtravel-table-toolbar {
		margin-right: 8px;
		margin-left: 8px;
	}

	.tbtravel-rates-table {
		margin-right: 8px;
		margin-left: 8px;
	}

	.tbtravel-rates-table .table__row,
	.tbtravel-rates-table .table__travel,
	.tbtravel-rates-table .tbtravel-table-row {
		padding: 14px;
	}

	.tbtravel-operator-name {
		max-width: 190px;
	}

	.tbtravel-rate__value {
		font-size: 17px;
	}
}

/* Финальный мобильный override: держим ниже всех правил, чтобы строка таблицы точно разваливалась. */
@media (max-width: 767px) {
	.tbtravel-table-box .tbtravel-table-scroll {
		overflow-x: visible !important;
	}

	.tbtravel-table-box table.tbtravel-rates-table,
	.tbtravel-table-box table.tbtravel-rates-table > tbody.sort__content {
		display: block !important;
		width: auto !important;
		min-width: 0 !important;
	}

	.tbtravel-table-box table.tbtravel-rates-table > tbody.sort__content {
		display: grid !important;
		gap: 12px !important;
	}

	.tbtravel-table-box table.tbtravel-rates-table > tbody.sort__content > tr.table__row.tbtravel-table-row {
		display: grid !important;
		grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
		column-gap: 6px !important;
		row-gap: 0 !important;
		width: 100% !important;
		min-width: 0 !important;
		padding: 16px !important;
		border: 1px solid #e4edf8 !important;
		border-radius: 16px !important;
		background: #ffffff !important;
		box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04) !important;
	}

	.tbtravel-table-box table.tbtravel-rates-table > tbody.sort__content > tr.table__row.tbtravel-table-row > td {
		display: block !important;
		border: 0 !important;
		background: transparent !important;
	}

	.tbtravel-table-box table.tbtravel-rates-table > tbody.sort__content > tr.table__row.tbtravel-table-row > td.tbtravel-operator-cell {
		grid-column: 1 / -1 !important;
		margin-bottom: 30px !important;
	}

	.tbtravel-table-box table.tbtravel-rates-table > tbody.sort__content > tr.table__row.tbtravel-table-row > td.tbtravel-rate-cell_tomorrow-start {
		grid-column-start: 3 !important;
	}

	.tbtravel-table-box table.tbtravel-rates-table > tbody.sort__content > tr.table__row.tbtravel-table-row > td.tbtravel-wait-cell {
		grid-column: span 2 !important;
	}
}


/* ПК: логотипы крупнее и заметнее. */
@media (min-width: 768px) {
	.tbtravel-th-operator,
	.tbtravel-operator-cell {
		width: 350px;
		min-width: 350px;
		max-width: 350px;
	}

	.tbtravel-operator-logo {
		flex-basis: 102px;
		width: 102px;
		height: 58px;
		border-radius: 18px;
	}

	.tbtravel-operator-name {
		max-width: 215px;
	}
}

/* Mobile fix для строки с одним colspan="2" — подпись «Завтра» не должна быть в 2 раза шире. */
@media (max-width: 767px) {
	.tbtravel-wait-cell.tbtravel-rate-cell_tomorrow-start::before {
		width: 100% !important;
	}
}


/* v4 — mobile polish: крупнее изменения/стрелки и без наезда колокольчика. */
.tbtravel-table-box .tbtravel-watch-btn.ring::before,
.tbtravel-table-box .tbtravel-watch-btn.ring::after {
	display: none !important;
	content: none !important;
}

@media (max-width: 767px) {
	.tbtravel-table-box .tbtravel-table-toolbar {
		gap: 10px !important;
	}

	.tbtravel-table-box .tbtravel-watch-btn {
		position: relative !important;
		z-index: 1 !important;
		min-width: 0 !important;
		padding-left: 14px !important;
		padding-right: 14px !important;
		overflow: hidden !important;
		text-overflow: ellipsis !important;
	}

	.tbtravel-table-box .tbtravel-rate {
		min-height: 62px !important;
		gap: 4px !important;
	}

	.tbtravel-table-box .tbtravel-rate__value {
		font-size: 18px !important;
		line-height: 1.08 !important;
	}

	.tbtravel-table-box .tbtravel-rate-diff {
		font-size: 12px !important;
		line-height: 1.05 !important;
	}

	.tbtravel-table-box .tbtravel-rate-diff__arrow {
		display: inline-block !important;
		font-size: 13px !important;
		line-height: 1 !important;
	}

	.tbtravel-table-box .tbtravel-forecast-cell,
	.tbtravel-table-box .tbtravel-wait-cell button {
		min-height: 62px !important;
	}

	.tbtravel-table-box .tbtravel-forecast-cell img {
		width: 28px !important;
		height: 28px !important;
	}
}

@media (max-width: 374px) {
	.tbtravel-table-box .tbtravel-rate__value {
		font-size: 17px !important;
	}

	.tbtravel-table-box .tbtravel-rate-diff {
		font-size: 11px !important;
	}

	.tbtravel-table-box .tbtravel-forecast-cell img {
		width: 26px !important;
		height: 26px !important;
	}
}
