/* Gifts — VK-style carousel + large picker */

/* ========== Профиль: блок подарков ========== */
.profile-gifts__head {
	margin-bottom: 12px;
}

.profile-gifts__head .profile-card__title {
	margin-bottom: 0;
}

.profile-gifts__count {
	font-weight: 500;
	color: var(--tt-fade);
}

.profile-gifts__carousel {
	position: relative;
	margin-bottom: 12px;
}

.profile-gifts__carousel[hidden] {
	display: none !important;
}

.profile-gifts__track {
	display: flex;
	flex-wrap: nowrap;
	gap: 10px;
	overflow-x: auto;
	overflow-y: hidden;
	scroll-behavior: smooth;
	scrollbar-width: none;
	-ms-overflow-style: none;
	padding: 4px 2px 8px;
	width: 100%;
}

.profile-gifts__track::-webkit-scrollbar {
	display: none;
}

.profile-gifts__item {
	flex: 0 0 90px;
	width: 90px;
	height: 90px;
	border: 0;
	padding: 0;
	border-radius: 12px;
	background: none;
	cursor: pointer;
	display: grid;
	place-items: center;
	overflow: hidden;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.profile-gifts__item:hover {
	transform: scale(1.03);
	background: none;
}

.profile-gifts__item-emoji {
	font-size: 64px;
	line-height: 1;
}

.profile-gifts__item img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	padding: 8px;
}

.profile-gifts__nav {
	position: absolute;
	top: 50%;
	z-index: 3;
	width: 36px;
	height: 36px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(0, 0, 0, 0.55);
	color: rgba(255, 255, 255, 0.85);
	font-size: 14px;
	cursor: pointer;
	display: grid;
	place-items: center;
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transform: translateY(-50%);
	transition: opacity 0.2s ease, visibility 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.profile-gifts__nav--prev {
	left: 6px;
}

.profile-gifts__nav--next {
	right: 6px;
}

/* VK: стрелки только при наведении и только если можно листать */
.profile-gifts__carousel.has-overflow:hover .profile-gifts__nav.is-available {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
}

.profile-gifts__carousel.has-overflow:hover .profile-gifts__nav.is-available:hover {
	background: rgba(0, 0, 0, 0.72);
	color: #fff;
}

.profile-gifts__empty {
	font-size: 13px;
	color: var(--tt-fade);
	margin: 0 0 12px;
	line-height: 1.4;
}

.profile-gifts__empty[hidden] {
	display: none !important;
}

.profile-gifts__send-btn {
	display: block;
	width: 100%;
	height: 40px;
	border: 0;
	border-radius: 10px;
	background: var(--bg-darker);
	color: var(--tt-fade);
	font-size: 13px;
	font-weight: 500;
	cursor: pointer;
	transition: background 0.2s ease, color 0.2s ease;
}

.profile-gifts__send-btn:hover {
	background: var(--bg);
	color: var(--tt);
}

.profile-gifts__send-btn[hidden],
.profile-gifts__send-btn.is-hidden {
	display: none !important;
}

/* ========== Общие модалки ========== */
.gifts-modal {
	position: fixed;
	inset: 0;
	z-index: 1250;
	display: none;
	align-items: center;
	justify-content: center;
	padding: 16px;
}

.gifts-modal:not([hidden]) {
	display: flex;
}

.gifts-modal[hidden] {
	display: none !important;
}

.gifts-modal__overlay {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.75);
	backdrop-filter: blur(3px);
}

.gifts-modal__close {
	position: fixed;
	top: 20px;
	right: 20px;
	z-index: 1252;
	width: 40px;
	height: 40px;
	border: 0;
	border-radius: var(--ui-elem-bdrs, 8px);
	background: var(--bg-darker);
	border: 1px solid var(--bdc);
	color: var(--tt-fade);
	font-size: 16px;
	cursor: pointer;
	display: none;
	place-items: center;
	padding: 0;
}

.gifts-modal:not([hidden]) .gifts-modal__close {
	display: grid;
}

.gifts-modal__close:hover {
	color: var(--tt);
	border-color: var(--accent);
}

.gifts-modal__dialog {
	position: relative;
	width: min(520px, 100%);
	max-height: calc(100vh - 32px);
	background: var(--bg-black);
	border: 1px solid var(--bdc);
	border-radius: 12px;
	box-shadow: var(--ui-bsh, 0 12px 40px rgba(0, 0, 0, 0.45));
	overflow: hidden;
}

.gifts-send__dialog {
	width: min(680px, 100%);
}

.gifts-detail__dialog {
	width: min(400px, 100%);
}

.gifts-modal__content {
	padding: 24px 22px 22px;
	overflow-y: auto;
	max-height: calc(100vh - 32px);
}

.gifts-modal__header {
	margin-bottom: 14px;
}

.gifts-modal__title {
	margin: 0 0 6px;
	font-size: 20px;
	font-weight: 700;
	color: var(--tt);
	line-height: 1.2;
}

.gifts-modal__recipient {
	margin: 0;
	font-size: 14px;
	color: var(--tt-fade);
}

.gifts-modal__recipient strong {
	color: var(--tt);
	font-weight: 600;
}

.gifts-modal__bonus {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 14px;
	padding: 8px 12px;
	border-radius: 8px;
	background: var(--bg);
	border: 1px solid var(--bdc);
	font-size: 13px;
	color: var(--tt-fade);
}

.gifts-modal__bonus strong {
	color: var(--accent);
	font-weight: 700;
}

/* ========== Дарение: горизонтальный пикер (VK) ========== */
.gifts-send__picker {
	position: relative;
	min-height: 150px;
	margin-bottom: 8px;
}

.gifts-modal__loader {
	display: none;
	position: absolute;
	inset: 0;
	align-items: center;
	justify-content: center;
	z-index: 2;
	background: rgba(0, 0, 0, 0.35);
	border-radius: 10px;
}

.gifts-modal__loader.is-active {
	display: flex;
}

.gifts-modal__loader-spin {
	font-size: 28px;
	color: var(--accent);
}

.gifts-send__scroll {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	overflow-x: auto;
	overflow-y: hidden;
	scroll-behavior: smooth;
	scrollbar-width: thin;
	scrollbar-color: var(--bdc) transparent;
	padding: 8px 4px 12px;
	flex-direction: row;
	justify-content: center;
}

.gifts-send__picker.is-loading .gifts-send__scroll {
	visibility: hidden;
	pointer-events: none;
}

.gifts-picker__item {
	flex: 0 0 110px;
	width: 110px;
	border: 0;
	padding: 0 0 8px;
	background: transparent;
	cursor: pointer;
	display: flex;
	flex-direction: column;
	height: auto;
	align-items: center;
	gap: 8px;
	text-align: center;
	transition: transform 0.15s ease;
}

.gifts-picker__item:hover {
	transform: translateY(-2px);
	background: none;
}

.gifts-picker__item.is-sending {
	opacity: 0.45;
	pointer-events: none;
}

.gifts-picker__icon {
	width: 110px;
	height: 110px;
	border-radius: 12px;
	background: var(--bg-darker);
	display: grid;
	place-items: center;
	font-size: 64px;
	line-height: 1;
	overflow: hidden;
}

.gifts-picker__icon img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	padding: 10px;
}

.gifts-picker__price {
	font-size: 13px;
	font-weight: 500;
	color: var(--accent);
	line-height: 1.2;
}

.gifts-picker__price.is-free {
	color: #6bc06b;
}

.gifts-modal__message {
	margin-top: 12px;
}

.gifts-modal__message-label {
	display: block;
	font-size: 11px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--tt-fade);
	margin-bottom: 8px;
}

.gifts-modal__message-input {
	width: 100%;
	height: 44px;
	padding: 0 14px;
	border-radius: 8px;
	border: 1px solid #292929;
	background: #222222;
	color: var(--tt);
	font-size: 14px;
	transition: border-color 0.2s ease;
}

.gifts-modal__message-input:focus {
	outline: none;
	border-color: var(--accent);
}

.gifts-modal__empty,
.gifts-modal__guest {
	margin: 12px 0 0;
	padding: 18px 12px;
	text-align: center;
	font-size: 14px;
	color: var(--tt-fade);
	background: var(--bg-darker);
	border-radius: 10px;
	border: 1px dashed var(--bdc);
}

/* ========== Просмотр подарка ========== */
.gifts-detail__content {
	text-align: center;
	padding-top: 28px;
	padding-bottom: 28px;
}

.gifts-detail__visual {
	width: 160px;
	height: 160px;
	margin: 0 auto 20px;
	border-radius: 14px;
	background: var(--bg-darker);
	display: grid;
	place-items: center;
	font-size: 96px;
	line-height: 1;
	overflow: hidden;
}

.gifts-detail__visual img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	padding: 12px;
}

.gifts-detail__message {
	margin: 0 0 16px;
	font-size: 15px;
	line-height: 1.45;
	color: var(--tt);
	font-style: italic;
}

.gifts-detail__message[hidden] {
	display: none !important;
}

.gifts-detail__meta {
	margin: 0 0 6px;
	font-size: 14px;
	color: var(--tt-fade);
	line-height: 1.4;
}

.gifts-detail__meta strong {
	color: var(--tt);
	font-weight: 600;
}

.gifts-detail__price {
	margin: 14px 0 0;
	font-size: 15px;
	font-weight: 600;
	color: var(--accent);
}

.gifts-detail__price.is-free {
	color: #6bc06b;
}

/* ========== Чат: меню у аватарки ========== */
.site-chat__avatar-menu {
	position: fixed;
	z-index: 12060;
	min-width: 168px;
	padding: 6px;
	background: var(--bg-black);
	border: 1px solid var(--bdc);
	border-radius: 10px;
	box-shadow: var(--ui-bsh, 0 8px 24px rgba(0, 0, 0, 0.45));
}

.site-chat__avatar-menu-item {
	display: flex;
	align-items: center;
	width: 100%;
	padding: 10px 12px;
	text-align: left;
	background: none;
	border: none;
	border-radius: 8px;
	color: var(--tt);
	font-size: 13px;
	font-weight: 500;
	cursor: pointer;
	justify-content: flex-start;
	text-decoration: none;
	height: auto;
	transition: background-color 0.2s ease, color 0.2s ease;
}

.site-chat__avatar-menu-item:hover {
	background: var(--bg);
	color: var(--tt);
}

@media (max-width: 480px) {
	.gifts-modal__close {
		top: 12px;
		right: 12px;
	}

	.profile-gifts__item,
	.gifts-picker__icon {
		flex: 0 0 96px;
		width: 96px;
		height: 96px;
	}

	.gifts-picker__item {
		flex: 0 0 96px;
		width: 96px;
	}
}
