*, *::before, *::after {
	box-sizing: border-box;
}

:root {
	--panel: #ffffff;
	--ink: #243238;
	--muted: #65757d;
	--line: #d6dde0;
	--header: #607d8b;
	--header-dark: #4d6b78;
	--primary-button: #607d8b;
	--primary-button-dark: #4d6b78;
	--accent: #607d8b;
	--accent-dark: #4d6b78;
	--ready: #43a047;
	--waiting: #c62828;
	--surface: #f7f8f8;
	--summary-card-surface: #eef3f1;
	--summary-card-ink: #4d6b78;
	--summary-card-border: #607d8b;
	--focus: #2f80ed;
}

body {
	margin: 0;
	padding: 20px;
	background: var(--surface);
	color: var(--ink);
	font-family: "Roboto", "Helvetica", "Arial", sans-serif;
	font-size: 14px;
	font-weight: 400;
	line-height: 20px;
}

a {
	color: #2f6f9f;
}

.sberPoker__container {
	display: flex;
	flex-direction: column;
	align-items: center;
	width: 100%;
}

.pokerApp_content,
#pokerCubes,
#pokercards_container,
.summary-card-container {
	max-width: 1170px;
	width: 100%;
	transition: 0.3s ease;
}

.mdl-card {
	background: var(--panel);
	border: 1px solid rgba(36, 50, 56, 0.08);
	border-radius: 2px;
	min-height: 0;
}

.mdl-shadow--2dp {
	box-shadow: 0 2px 4px rgba(36, 50, 56, 0.16), 0 1px 2px rgba(36, 50, 56, 0.12);
}

.mdl-card__title {
	display: flex;
	align-items: center;
	gap: 12px;
	min-height: 50px;
	padding: 12px 16px;
	background: var(--header);
	color: #fff;
	font-size: 24px;
	font-weight: 300;
	line-height: normal;
}

.mdl-card__titleText {
	min-width: 0;
}

.mdl-card__menu {
	display: flex;
	align-items: center;
	flex: 0 0 auto;
	height: auto;
	margin-left: auto;
	z-index: 2;
}

.mdl-navigation__link {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	height: auto;
	color: #fff;
	text-decoration: none;
	font-size: 14px;
	line-height: 20px;
}

.country_flag--small {
	width: 25px;
	height: 25px;
}

.mdl-card__supporting-text {
	padding: 18px 16px;
	color: rgba(0, 0, 0, 0.54);
	font-size: 1rem;
	line-height: 18px;
}

.pokerApp_form,
.mdl-textfield {
	width: 100%;
}

.mdl-textfield {
	display: flex;
	flex-direction: column-reverse;
	gap: 6px;
	margin: 0 0 14px;
}

.mdl-textfield__input,
select {
	width: 100%;
	height: 40px;
	border: 0;
	border-bottom: 1px solid var(--line);
	background: #fff;
	color: var(--ink);
	font-size: 16px;
	outline: none;
}

.mdl-textfield__input:focus,
select:focus {
	border-bottom-color: var(--focus);
	box-shadow: inset 0 -1px 0 var(--focus);
}

.mdl-textfield__label,
.mdl-panel__content label {
	color: var(--muted);
	font-size: 13px;
}

.mdl-panel {
	width: 100%;
	margin: 0 0 20px;
	padding: 10px;
	background: #fff;
}

.mdl-panel__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	cursor: pointer;
	font-weight: bold;
}

.material-icons {
	direction: ltr;
	display: inline-block;
	font-family: "Material Icons";
	font-feature-settings: "liga";
	font-size: 24px;
	font-style: normal;
	font-weight: normal;
	letter-spacing: normal;
	line-height: 1;
	text-transform: none;
	white-space: nowrap;
	word-wrap: normal;
	-webkit-font-feature-settings: "liga";
	-webkit-font-smoothing: antialiased;
}

.mdl-panel__header i {
	color: var(--header);
	font-size: 2em;
}

.mdl-panel__content {
	display: flex;
	flex-direction: column;
	padding: 15px 0 0;
	overflow: visible;
}

.mdl-panel__content.hideContainer {
	display: none;
	padding: 0;
}

.mdl-panel__contentGroup {
	padding: 0 0 10px;
}

.checkbox-row {
	display: flex;
	align-items: center;
	gap: 8px;
}

.mdl-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	height: 36px;
	min-width: 64px;
	padding: 0 16px;
	border: 0;
	border-radius: 2px;
	cursor: pointer;
	font-family: "Roboto", "Helvetica", "Arial", sans-serif;
	font-size: 14px;
	font-weight: 500;
	line-height: 36px;
	text-transform: uppercase;
	transition: 0.15s ease;
}

.mdl-button--raised {
	box-shadow: 0 2px 3px rgba(36, 50, 56, 0.18);
}

.mdl-button--colored {
	background: var(--primary-button);
	color: #fff;
}

.mdl-button--accent {
	background: var(--accent);
	color: #fff;
}

.mdl-button--colored:hover:not(:disabled) {
	background: var(--primary-button-dark);
}

.mdl-button--accent:hover:not(:disabled) {
	background: var(--accent-dark);
}

.mdl-button:disabled {
	cursor: default;
	opacity: 0.45;
}

footer {
	padding: 8px 0 0;
	color: var(--muted);
	font-size: 12px;
}

#userAndShare > .mdl-card__title .infoMenu {
	margin: 0;
	color: #fff;
	cursor: pointer;
}

#userInfo {
	display: flex;
	flex-direction: row;
	gap: 10px;
	padding: 0;
	max-height: 440px;
	overflow: hidden;
	transition: 0.25s ease;
}

#userInfo.userInfo__show {
	max-height: 0;
}

.mdl-list {
	width: 50%;
	margin: 0;
	padding: 8px 0;
	list-style: none;
}

.mdl-list__item {
	display: flex;
	align-items: center;
	gap: 14px;
	min-height: 68px;
	padding: 8px 16px;
}

.mdl-list__item > span:last-child {
	color: rgba(0, 0, 0, 0.87);
}

.mdl-list__item-icon {
	color: #757575;
	font-size: 24px;
	width: 24px;
}

.mdl-list__item-sub-title {
	display: block;
	max-width: 420px;
	margin-top: 4px;
	color: var(--muted);
	font-size: 14px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

#pokerUrl {
	cursor: pointer;
}

.copy-tooltip {
	position: fixed;
	padding: 6px 10px;
	border-radius: 2px;
	background: rgba(50, 61, 67, 0.96);
	color: #fff;
	font-size: 12px;
	line-height: 16px;
	pointer-events: none;
	box-shadow: 0 2px 6px rgba(36, 50, 56, 0.25);
	transform: translateY(4px);
	z-index: 20;
}

.connection-overlay {
	position: fixed;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
	background: rgba(17, 24, 28, 0.72);
	color: #fff;
	text-align: center;
	z-index: 30;
}

.connection-overlay--blocking-dialogs {
	z-index: 50;
}

.connection-overlay__content {
	max-width: min(760px, 100%);
}

.connection-overlay__title {
	font-size: clamp(28px, 4vw, 46px);
	font-weight: 500;
	line-height: 1.15;
	text-transform: uppercase;
}

.connection-overlay__message {
	margin-top: 16px;
	font-size: clamp(18px, 2vw, 26px);
	font-weight: 300;
	line-height: 1.35;
}

.room-dialog-overlay {
	position: fixed;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	background: rgba(17, 24, 28, 0.28);
	z-index: 40;
}

.room-dialog {
	width: min(480px, 100%);
	padding: 24px;
	border: 1px solid rgba(36, 50, 56, 0.12);
	border-radius: 2px;
	background: #fff;
	color: var(--ink);
}

.room-dialog__title {
	color: var(--ink);
	font-size: 24px;
	font-weight: 400;
	line-height: 30px;
}

.room-dialog__message {
	margin-top: 12px;
	color: var(--muted);
	font-size: 16px;
	line-height: 24px;
}

.room-dialog__option {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-top: 16px;
	color: var(--ink);
	font-size: 14px;
	line-height: 20px;
}

.room-dialog__actions {
	display: flex;
	justify-content: flex-end;
	gap: 8px;
	margin-top: 24px;
}

.room-dialog__cancel,
.room-dialog__decline {
	background: transparent;
	color: var(--header);
}

.room-dialog__cancel:hover,
.room-dialog__decline:hover {
	background: rgba(96, 125, 139, 0.08);
}

#qrCode {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
	width: 230px;
	margin: 22px 18px 0 30px;
	color: var(--muted);
	font-size: 13px;
}

.qr-grid {
	display: grid;
	grid-template-columns: repeat(9, 1fr);
	width: 150px;
	height: 150px;
	padding: 8px;
	border: 8px solid #fff;
	background: #fff;
	box-shadow: inset 0 0 0 1px var(--line);
	gap: 2px;
}

.qr-grid span {
	background: #111;
}

#qrCode img {
	width: 230px;
	height: 230px;
	border: 10px solid #fff;
	box-shadow: 0 1px 3px rgba(36, 50, 56, 0.2);
}

.room-actions {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	padding: 10px 16px 14px;
}

#pokerButtons {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	padding: 0;
}

.room-actions__secondary {
	margin-left: auto;
}

.new-room-button {
	white-space: nowrap;
	text-decoration: none;
}

#pokerButtons i {
	display: none;
}

.new-room-button i {
	display: none;
}

@media screen and (min-width: 1025px) {
	.room-actions__secondary {
		display: flex;
		flex: 0 0 230px;
		justify-content: center;
		margin-right: 2px;
	}
}

#pokerCubes {
	margin-top: 20px;
}

#pokerCubes.hideContainer {
	display: none;
}

#pokerCubes .pokerCubes__content {
	display: flex;
	flex-wrap: wrap;
	width: 100%;
}

.poker_cube_container {
	position: relative;
	width: 250px;
	height: 150px;
	min-height: 0;
	margin: 10px;
	overflow: hidden;
	background: transparent;
	transform-origin: 100% 0;
	transition: 0.3s ease;
}

.poker_cube_container.hideContainer {
	width: 0;
	height: 0;
	margin: 0;
	transform: scale(0);
}

.poker_cube_container figure {
	position: absolute;
	right: -250px;
	display: flex;
	flex-direction: column;
	width: 250px;
	height: 150px;
	min-height: 150px;
	margin: 0;
	transition: 0.3s ease;
}

.poker_cube_container figure.visible {
	right: 0;
}

.cube_not_pokered {
	background: var(--waiting);
}

.cube_pokered {
	background: var(--ready);
}

.cube_shown {
	background: var(--header);
}

.poker_cube_container--inactive figure::after {
	position: absolute;
	inset: 0;
	z-index: 1;
	background: rgba(17, 24, 28, 0.28);
	content: "";
	pointer-events: none;
}

.waitingIcon {
	position: absolute;
	right: 10px;
	bottom: 8px;
	display: none;
	width: 108px;
	height: 108px;
	object-fit: contain;
	filter: drop-shadow(0 2px 3px rgba(17, 24, 28, 0.32));
	pointer-events: none;
	z-index: 2;
}

.poker_cube_container--inactive .cube_not_pokered.visible .waitingIcon,
.poker_cube_container--inactive .cube_pokered.visible .waitingIcon {
	display: block;
}

.cube__header {
	display: flex;
	align-items: flex-start;
}

.cube__header .username {
	width: 100%;
	padding: 15px 15px 0;
	color: #fff;
	font-size: 1.5em;
	line-height: 1.5em;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.closeCardBtn {
	padding: 10px 10px 0;
	border: 0;
	background: transparent;
	color: #fff;
	cursor: pointer;
	line-height: 1;
	transition: 0.15s ease;
}

.closeCardBtn:hover {
	transform: rotate(90deg);
}

.cube__footer {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	height: 100%;
}

.pokerNumber {
	margin: 20px 50px 0 0;
	color: #fff;
	font-family: Verdana, sans-serif;
	font-size: 4em;
	font-weight: bold;
}

#pokercards_container {
	margin-top: 0;
	padding: 20px 0;
	overflow: hidden;
	transform-origin: 100% 0;
	transition: 0.25s ease;
}

#pokercards_container.hideContainer {
	max-height: 0;
	padding: 0;
	transform: scaleY(0);
}

.mdl-grid {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	padding: 16px;
}

.pokercard_selection {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 140px;
	height: 140px;
	border: 0;
	background: var(--header);
	color: #fff;
	cursor: pointer;
}

.pokercard_selection:hover {
	background: var(--header-dark);
}

.pokerNumber_selection_text {
	max-width: 135px;
	padding: 0;
	color: #fff;
	font-family: Verdana, sans-serif;
	font-size: 1.4em;
	font-weight: bold;
	overflow-wrap: anywhere;
	text-align: center;
}

.pokerNumber_selection {
	color: #fff;
	font-family: Verdana, sans-serif;
	font-size: 2.4em;
	font-weight: bold;
	padding: 10px;
}

.summary-card-container {
	display: flex;
	justify-content: flex-start;
	margin: 16px 0 0;
	padding: 0 10px 20px;
	overflow: visible;
}

.summary-card {
	display: flex;
	flex-direction: column;
	flex: 0 0 auto;
	width: max-content;
	min-width: min(375px, calc(100vw - 40px));
	max-width: calc(100vw - 40px);
	min-height: 150px;
	border: 2px solid var(--summary-card-border);
	background: var(--summary-card-surface);
	color: var(--summary-card-ink);
	overflow: hidden;
	box-shadow: 0 2px 4px rgba(36, 50, 56, 0.14), 0 1px 2px rgba(36, 50, 56, 0.1);
}

.summary-card__header {
	width: 100%;
	padding: 15px 15px 0;
	font-size: 1.5em;
	line-height: 1.5em;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.summary-card__footer {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	flex: 1 1 auto;
	min-width: 0;
}

.summary-card__value {
	margin: 20px 50px 0 0;
	font-family: Verdana, sans-serif;
	font-size: 56px;
	font-weight: bold;
	line-height: 1;
	overflow: hidden;
	text-align: center;
	white-space: nowrap;
}

.summary-card--wide {
	width: max-content;
}

.summary-card--pop {
	animation: summary-card-pop 0.32s ease-out;
}

@keyframes summary-card-pop {
	0% {
		transform: scale(0.92);
	}

	55% {
		transform: scale(1.04);
	}

	100% {
		transform: scale(1);
	}
}

@media (prefers-reduced-motion: reduce) {
	.summary-card--pop {
		animation: none;
	}
}

.language-grid {
	align-items: stretch;
	justify-content: center;
	min-height: 260px;
}

.country_box {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 18px;
	width: 220px;
	min-height: 150px;
	padding: 18px 12px;
	color: var(--ink);
	text-align: center;
	text-decoration: none;
}

.country_box strong {
	color: var(--accent);
	text-transform: uppercase;
}

.country_flag--big {
	width: 64px;
	height: 64px;
}

.flag-icon {
	position: relative;
	display: inline-block;
	overflow: hidden;
	border: 1px solid rgba(0, 0, 0, 0.16);
	border-radius: 50%;
	background: #fff;
	box-shadow: 0 1px 2px rgba(36, 50, 56, 0.16);
	flex: 0 0 auto;
}

.flag-ru {
	background: linear-gradient(to bottom, #fff 0 33.333%, #0039a6 33.333% 66.666%, #d52b1e 66.666% 100%);
}

.flag-us {
	background: repeating-linear-gradient(to bottom, #b22234 0 7.692%, #fff 7.692% 15.384%);
}

.flag-us::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	width: 54%;
	height: 54%;
	background: #3c3b6e;
}

.flag-us::after {
	content: "";
	position: absolute;
	top: 4%;
	left: 4%;
	width: 46%;
	height: 46%;
	background-image: radial-gradient(circle, #fff 0 18%, transparent 20%);
	background-size: 20% 20%;
}

.toast {
	position: fixed;
	top: 20px;
	right: 20px;
	max-width: min(420px, calc(100vw - 40px));
	padding: 14px 16px;
	background: #323d43;
	color: #fff;
	box-shadow: 0 6px 20px rgba(36, 50, 56, 0.25);
	z-index: 10;
}

.hideElement,
[hidden] {
	display: none !important;
}

@media screen and (max-width: 1024px) {
	.pokercard_selection {
		width: 116px;
		height: 116px;
	}

	.pokercard_selection .pokerNumber_selection_text {
		font-size: 1em;
	}

	#qrCode {
		display: none;
	}
}

@media screen and (max-width: 600px) {
	body {
		padding: 0;
		background: #fff;
	}

	.pokerApp_content {
		border-radius: 0;
		box-shadow: none;
	}

	#userInfo {
		flex-direction: column;
		max-height: 0;
	}

	#userInfo.userInfo__show {
		max-height: 520px;
	}

	.mdl-list {
		width: 100%;
	}

	.room-actions {
		align-items: stretch;
	}

	#pokerButtons {
		display: flex;
		flex: 1 1 auto;
		min-width: 0;
	}

	#pokerButtons button {
		flex: 1;
		min-width: 0;
	}

	#pokerButtons span,
	.new-room-button span {
		display: none;
	}

	#pokerButtons i,
	.new-room-button i {
		display: inline;
		color: #fff;
		font-size: 24px;
	}

	.room-actions__secondary {
		display: flex;
		flex: 0 0 auto;
	}

	.new-room-button {
		width: 44px;
		min-width: 44px;
		padding: 0;
	}

	#pokerCubes {
		margin-top: 0;
	}

	.poker_cube_container {
		width: 160px;
		height: 90px;
	}

	.poker_cube_container figure {
		right: -160px;
		width: 160px;
		height: 90px;
		min-height: 90px;
	}

	.cube__header .username {
		padding: 8px 8px 0;
		font-size: 1.2em;
		line-height: 1.2em;
	}

	.closeCardBtn {
		padding: 4px 6px 0;
		font-size: 20px;
	}

	.pokerNumber {
		margin: 10px 20px 0 0;
		font-size: 36px;
	}

	.waitingIcon {
		right: 6px;
		bottom: 4px;
		width: 76px;
		height: 76px;
	}

	.summary-card-container {
		margin-top: 10px;
	}

	.summary-card {
		min-width: min(240px, calc(100vw - 24px));
		min-height: 90px;
	}

	.summary-card__header {
		padding: 8px 8px 0;
		font-size: 1.2em;
		line-height: 1.2em;
	}

	.summary-card__value {
		margin: 10px 20px 0 0;
		font-size: 36px;
	}

	#pokercards_container {
		box-shadow: none;
	}

	.mdl-grid {
		justify-content: center;
		gap: 10px;
	}

	.country_box {
		width: 48%;
	}
}
