/* Базовые стили (мобильная версия по умолчанию) */
header {
	width: 100%;
	background-color: transparent;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: flex-start;
	padding: 12px 16px;
	box-sizing: border-box;
}

header .logo {
	display: block;
	width: auto;
	max-width: 200px;
	margin-bottom: 8px;
}

header nav {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 12px;
	width: 100%;
}

header nav a {
	text-decoration: none;
	color: black;
	font-size: 14px;
	white-space: nowrap;
}

header nav a:hover {
	text-decoration: underline;
}

.container {
	background-color: #fafafa;
	width: 90%;
	margin: 16px auto;
	border-radius: 8px;
	box-shadow: 0px 0px 8px 0px rgba(34, 60, 80, 0.2);
	box-sizing: border-box;
}

.container form input,
.container form textarea {
	width: 100%;
	box-sizing: border-box;
	margin: 12px 0;
	padding: 12px;
	border: 2px solid #999999;
	outline: none;
	border-radius: 5px;
	font-family: "Roboto", sans-serif;
	font-size: 16px;
}

.container form textarea {
	height: 140px;
	resize: none;
}

.container form textarea:hover,
.container form textarea:focus,
.container form input:hover,
.container form input:focus {
	border-color: black;
}

.container form label {
	display: block;
	margin-left: 0;
	margin-bottom: 4px;
}

.container form button {
	width: 100%;
	height: auto;
	min-height: 50px;
	margin: 16px 0;
	border-radius: 25px;
	border: none;
	font-size: 18px;
}

.greeting,
.info_card {
	background-color: #fafafa;
	width: 90%;
	margin: 16px auto;
	border-radius: 8px;
	box-shadow: 0px 0px 8px 0px rgba(34, 60, 80, 0.2);
	padding: 16px;
	box-sizing: border-box;
	text-align: center;
}

.info_card .imp_info {
	display: flex;
	flex-direction: column;
	width: 100%;
	border-radius: 8px;
	margin-top: 16px;
	box-shadow: 0px 0px 8px 0px rgba(34, 60, 80, 0.2);
}

.info_card .photo,
.info_card .mimp_info {
	width: 100%;
}

.info_card .photo img,
.info_card .imp_info .photo img {
	width: 100%;
	height: auto;
	max-height: 300px;
	margin-top: 16px;
	border-radius: 8px;
	box-shadow: 0px 0px 8px 0px rgba(34, 60, 80, 0.2);
	object-fit: cover;
}

.info_card .nonimp_info {
	width: 100%;
	margin-top: 16px;
	box-shadow: 0px 0px 8px 0px rgba(34, 60, 80, 0.2);
	border-radius: 8px;
	padding: 16px;
	box-sizing: border-box;
}

.info_card .other .targets .target {
	padding: 8px 12px;
	margin: 8px 4px;
	box-shadow: 0px 0px 8px 0px rgba(34, 60, 80, 0.2);
	display: inline-block;
	background-color: white;
	border-radius: 8px;
	font-size: 14px;
}

.liked_user_list {
	width: 100%;
	display: flex;
	flex-direction: row;
	flex-wrap: wrap;
	justify-content: center;
	gap: 12px;
	padding: 0 8px;
	box-sizing: border-box;
}

.liked_user_card {
	background-color: #fafafa;
	width: 100%; /* на мобильном — одна карточка в строку */
	max-width: 320px;
	height: auto;
	margin: 0;
	border-radius: 8px;
	box-shadow: 0px 0px 8px 0px rgba(34, 60, 80, 0.2);
}

.liked_user_card img {
	width: 100%;
	height: auto;
	max-height: 240px;
	border-radius: 8px;
	object-fit: cover;
}

.messages {
	display: flex;
	margin: 16px;
	width: calc(100% - 32px);
	min-height: 60vh;
	border-radius: 8px;
	box-shadow: 0px 0px 8px 0px grey;
	background-color: #fafafa;
	box-sizing: border-box;
	flex-direction: column; /* на мобильном — сначала список, потом чат */
}

.messages #sidebar {
	width: 100%;
	border-right: none;
	border-bottom: 1px solid lightgrey;
	height: auto;
	overflow-y: auto;
	white-space: normal;
}

.messages #sidebar .user,
.messages #sidebar .heading {
	display: block;
	height: auto;
	padding: 12px 16px;
	text-align: left;
	border-bottom: 1px solid lightgrey;
}

.messages .message_list {
	width: 100%;
	flex: 1;
	overflow-y: auto;
}

#message_list_1 {
	max-height: 40vh;
	overflow-y: scroll;
	white-space: normal;
}

.messages .message,
.messages .message_left {
	display: block;
	float: none;
	width: 85%;
	max-width: 480px;
	margin: 8px auto;
	padding: 12px 16px;
	border-radius: 12px;
	box-shadow: 0px 0px 8px 0px rgba(34, 60, 80, 0.2);
	font-size: 15px;
	line-height: 1.4;
}

.messages .message {
	text-align: right;
	background-color: #f6f7f8;
	margin-left: auto;
	border-top-right-radius: 4px;
}

.messages .message_left {
	text-align: left;
	background-color: #d2d6da;
	margin-right: auto;
	border-top-left-radius: 4px;
}

.messages .message_send_form {
	border-top: 1px solid lightgrey;
	padding: 12px;
	display: flex;
	flex-direction: row;
	gap: 8px;
	align-items: flex-end;
}

.messages .message_send_form textarea {
	resize: none;
	height: 48px;
	width: 100%;
	border: none;
	outline: none;
	padding: 8px;
}

.messages .message_send_form button {
	height: 48px;
	width: auto;
	padding: 0 20px;
	font-size: 16px;
	outline: none;
	border: none;
	border-radius: 24px;
	box-shadow: 0px 0px 8px 0px rgba(34, 60, 80, 0.2);
}

#city {
background-color: transparent;
width: 100%;
outline: none;
border: none;
border-bottom: 2px solid black;
padding: 12px;
box-sizing: border-box;
font-size: 16px;
}

#update,
#like,
#dislike {
margin: 12px 0;
min-height: 50px;
width: 100%;
border-radius: 25px;
border: none;
font-size: 18px;
}

#page_user {
height: auto;
width: 100%;
margin: 16px auto;
border-radius: 8px;
box-shadow: 0px 0px 8px 0px rgba(34, 60, 80, 0.2);
max-width: 480px;
}

#page_user img {
height: auto;
max-height: 360px;
width: 100%;
object-fit: cover;
}

/* Планшет и десктоп (от 768px) */
@media (min-width: 1090px) {
	header {
		flex-direction: row;
		align-items: center;
		justify-content: space-between;
		padding: 0 1rem;
	}

	header nav {
		display: inline-block;
		width: 60%;
		text-align: right;
		padding-top: 16px;
		gap: unset;
	}

	header .logo {
		width: 30%;
		padding-top: 12px;
		padding-left: 2%;
		margin-bottom: 0;
	}

	header nav {
		width: 60%;
		text-align: right;
		padding-top: 16px;
	}

	header nav a {
		margin-left: 5%;
		font-size: 1rem;
		white-space: normal;
	}

	.container {
		width: 50%;
		margin-left: 25%;
		margin-right: 25%;
	}

	.info_card .imp_info {
		flex-direction: row;
		height: 45vh;
	}

	.info_card .photo {
		width: 30%;
	}

	.info_card .mimp_info {
		width: 70%;
	}

	.messages {
		flex-direction: row;
		width: 90%;
		margin: 16px auto;
		min-height: 80vh;
	}

	.messages #sidebar {
		width: 20%;
		border-right: 1px solid lightgrey;
		border-bottom: none;
		white-space: nowrap;
	}

	.messages .message_list {
		width: 80%;
	}
}

/* Десктоп (как у тебя было, от 992px) */
@media (min-width: 1200px) {
	header {
		height: 8vh;
	}

	.greeting {
		width: 70%;
		margin-left: 15%;
	}

	.info_card {
		width: 85%;
		margin-left: 7.5%;
	}

	.info_card .nonimp_info {
		width: 98%;
		height: 50vh;
		margin-right: 2vh;
	}

	.liked_user_list .liked_user_card {
		width: calc(100% / 4.5);
		height: 50vh;
		margin-left: 1rem;
		margin-top: 1rem;
		margin-right: 1rem;
		margin-bottom: 1rem;
	}

	#page_user {
	height: 75vh;
	width: 25%;
	margin-left: 35%;
	}
	#update,
	#like,
	#dislike {
	margin: 12px 0;
	min-height: 50px;
	width: 50%;
	border-radius: 25px;
	border: none;
	font-size: 18px;
	}
}

