﻿/* =============================================
   GIFTS MODULE — GHOST TEMPLATE STYLES
   ============================================= */

.gifts-container {
	max-width: 1100px;
	margin: 0 auto;
	padding: 15px;
	font-family: 'Exo 2', sans-serif;
	color: #b7bacd;
}

/* ---------- Уведомления ---------- */
#gifts-messages {
	position: fixed;
	top: 80px;
	right: 20px;
	z-index: 10000;
	max-width: 400px;
}
.gifts-message {
	padding: 12px 20px;
	margin-bottom: 8px;
	border-radius: 3px;
	font-size: 14px;
	line-height: 1.4;
	box-shadow: 0 4px 15px rgba(0,0,0,0.4);
	animation: gifts-slide-in 0.3s ease;
	border: 1px solid rgba(255,255,255,0.05);
}
.gifts-msg-success {
	background: #2a3a2e;
	border-left: 3px solid #4caf50;
	color: #a5d6a7;
}
.gifts-msg-error {
	background: #3a2a2a;
	border-left: 3px solid #ef5350;
	color: #ef9a9a;
}
@keyframes gifts-slide-in {
	from { transform: translateX(100px); opacity: 0; }
	to { transform: translateX(0); opacity: 1; }
}

/* ---------- Шапка ---------- */
.gifts-header {
	background: #252836;
	border-radius: 3px;
	padding: 15px 20px;
	margin-bottom: 10px;
	border: 1px solid #2F3553;
}
.gifts-header h1 {
	margin: 0 0 8px 0;
	font-size: 22px;
	color: #d0d3e6;
	font-weight: 700;
}
.gifts-header-stats {
	display: flex;
	gap: 20px;
	flex-wrap: wrap;
}
.gifts-stat {
	font-size: 13px;
	color: rgba(183,186,205,0.7);
}
.gifts-stat b {
	color: #fff;
}

/* ---------- Вкладки ---------- */
.gifts-tabs {
	display: flex;
	gap: 4px;
	margin-bottom: 10px;
}
.gifts-tab-btn {
	background: #252836;
	border: 1px solid #2F3553;
	border-radius: 3px;
	padding: 10px 20px;
	font-size: 13px;
	cursor: pointer;
	transition: all 0.15s;
	font-weight: 600;
	font-family: 'Exo 2', sans-serif;
	color: #b7bacd;
}
.gifts-tab-btn:hover {
	background: #313448;
	border-color: #454a68;
	color: #d0d3e6;
}
.gifts-tab-btn.active {
	background: #313448;
	border-color: #454a68;
	color: #fff;
}

/* ---------- Каталог подарков (сетка) ---------- */
.gifts-catalog-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
	gap: 10px;
}
.gifts-card {
	background: #252836;
	border: 1px solid #2F3553;
	border-radius: 3px;
	padding: 15px;
	text-align: center;
	transition: all 0.2s;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
}
.gifts-card:hover {
	border-color: #454a68;
	transform: translateY(-2px);
	box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}
.gifts-card-image {
	font-size: 48px;
	line-height: 1;
	margin-bottom: 4px;
	width: 100%;
	height: 100px;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
}
.gifts-card-image img {
	max-width: 100%;
	max-height: 100%;
	object-fit: contain;
}
.gifts-card-name {
	font-size: 14px;
	font-weight: 700;
	color: #d0d3e6;
}
.gifts-card-rarity {
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}
.gifts-card-desc {
	font-size: 11px;
	color: rgba(183,186,205,0.5);
	line-height: 1.3;
}
.gifts-card-price {
	font-size: 15px;
	font-weight: 700;
	color: #ffcc80;
}
.gifts-stock {
	font-size: 11px;
	color: rgba(183,186,205,0.5);
}
.gifts-out-of-stock {
	color: #ef5350;
}

/* ---------- Редкость — рамки ---------- */
.gifts-rarity-common {
	border-left: 3px solid #6e7087;
}
.gifts-rarity-rare {
	border-left: 3px solid #42a5f5;
}
.gifts-rarity-epic {
	border-left: 3px solid #ab47bc;
}
.gifts-rarity-legendary {
	border-left: 3px solid #ffd54f;
	box-shadow: 0 0 8px rgba(255,213,79,0.1);
}
.gifts-rarity-common .gifts-card-rarity { color: #6e7087; }
.gifts-rarity-rare .gifts-card-rarity { color: #42a5f5; }
.gifts-rarity-epic .gifts-card-rarity { color: #ab47bc; }
.gifts-rarity-legendary .gifts-card-rarity { color: #ffd54f; }

/* ---------- Кнопки ---------- */
.gifts-btn {
	border: 1px solid #2F3553;
	border-radius: 3px;
	padding: 6px 14px;
	font-size: 12px;
	cursor: pointer;
	transition: all 0.15s;
	font-weight: 600;
	font-family: 'Exo 2', sans-serif;
	background-color: #313448;
	color: #b7bacd;
}
.gifts-btn:hover {
	background-color: #3a3e55;
	border-color: #454a68;
	color: #d0d3e6;
}
.gifts-btn-send {
	background-color: #2e4a36;
	border-color: #3a5c44;
	color: #a5d6a7;
	width: 100%;
	margin-top: 6px;
}
.gifts-btn-send:hover {
	background-color: #3a5c44;
	color: #c8e6c9;
}
.gifts-btn-disabled {
	opacity: 0.4;
	cursor: not-allowed;
	width: 100%;
	margin-top: 6px;
}
.gifts-btn-primary {
	background-color: #2e4a36;
	border-color: #3a5c44;
	color: #a5d6a7;
	padding: 10px 30px;
	font-size: 14px;
}
.gifts-btn-primary:hover {
	background-color: #3a5c44;
	color: #c8e6c9;
}

/* ---------- Список подарков (полученные/отправленные) ---------- */
.gifts-list {
	display: flex;
	flex-direction: column;
	gap: 8px;
}
.gifts-item {
	background: #252836;
	border: 1px solid #2F3553;
	border-radius: 3px;
	padding: 12px 15px;
	display: flex;
	align-items: center;
	gap: 15px;
	transition: all 0.15s;
}
.gifts-item:hover {
	border-color: #454a68;
}
.gifts-item-image {
	font-size: 36px;
	line-height: 1;
	flex-shrink: 0;
	width: 60px;
	height: 60px;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
}
.gifts-item-image img {
	max-width: 100%;
	max-height: 100%;
	object-fit: contain;
	border-radius: 4px;
}
.gifts-item-info {
	flex: 1;
	min-width: 0;
}
.gifts-item-name {
	font-size: 15px;
	font-weight: 700;
	color: #d0d3e6;
	margin-bottom: 2px;
}
.gifts-item-sender {
	font-size: 12px;
	color: rgba(183,186,205,0.6);
}
.gifts-item-sender b {
	color: #90caf9;
}
.gifts-item-message {
	font-size: 12px;
	color: rgba(183,186,205,0.5);
	font-style: italic;
	margin-top: 3px;
}
.gifts-item-price {
	font-size: 12px;
	color: #ffcc80;
}
.gifts-item-date {
	font-size: 11px;
	color: rgba(183,186,205,0.35);
	margin-top: 3px;
}

/* ---------- Пагинация ---------- */
.gifts-pagination {
	display: flex;
	gap: 4px;
	margin-top: 12px;
	justify-content: center;
}
.gifts-page-btn {
	background: #252836;
	border: 1px solid #2F3553;
	border-radius: 3px;
	padding: 6px 12px;
	font-size: 12px;
	cursor: pointer;
	color: #b7bacd;
	font-family: 'Exo 2', sans-serif;
}
.gifts-page-btn:hover, .gifts-page-btn.active {
	background: #313448;
	border-color: #454a68;
	color: #fff;
}

/* ---------- Модальное окно ---------- */
.gifts-modal {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: 9999;
	display: flex;
	align-items: center;
	justify-content: center;
}
.gifts-modal-overlay {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0,0,0,0.6);
}
.gifts-modal-content {
	position: relative;
	background: #252836;
	border: 1px solid #2F3553;
	border-radius: 3px;
	width: 450px;
	max-width: 95%;
	max-height: 80vh;
	overflow-y: auto;
	z-index: 1;
}
.gifts-modal-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 12px 18px;
	border-bottom: 1px solid #2F3553;
}
.gifts-modal-header h3 {
	margin: 0;
	font-size: 16px;
	color: #d0d3e6;
}
.gifts-modal-close {
	font-size: 22px;
	cursor: pointer;
	color: rgba(183,186,205,0.5);
	transition: color 0.15s;
}
.gifts-modal-close:hover {
	color: #ef5350;
}
.gifts-modal-body {
	padding: 18px;
}

/* ---------- Формы ---------- */
.gifts-form-group {
	margin-bottom: 12px;
}
.gifts-form-group label {
	display: block;
	font-size: 12px;
	color: rgba(183,186,205,0.6);
	margin-bottom: 4px;
}
.gifts-input, .gifts-textarea {
	width: 100%;
	background: #1F222D;
	border: 1px solid #2F3553;
	border-radius: 3px;
	padding: 8px 12px;
	font-size: 13px;
	color: #b7bacd;
	font-family: 'Exo 2', sans-serif;
	outline: none;
	transition: border-color 0.15s;
	box-sizing: border-box;
}
.gifts-input:focus, .gifts-textarea:focus {
	border-color: #454a68;
}
.gifts-textarea {
	resize: vertical;
	min-height: 60px;
}
.gifts-checkbox-label {
	display: flex !important;
	align-items: center;
	gap: 6px;
	cursor: pointer;
	font-size: 13px !important;
	color: #b7bacd !important;
}

/* ---------- Поиск пользователей ---------- */
.gifts-user-results {
	background: #1F222D;
	border: 1px solid #2F3553;
	border-radius: 0 0 3px 3px;
	max-height: 180px;
	overflow-y: auto;
}
.gifts-user-results:empty {
	display: none;
}
.gifts-user-result {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 7px 12px;
	cursor: pointer;
	font-size: 13px;
	transition: background 0.1s;
	border-bottom: 1px solid #252836;
}
.gifts-user-result:hover {
	background: #313448;
}
.gifts-user-ava {
	width: 34px;
	height: 34px;
	border-radius: 50%;
	object-fit: cover;
	flex-shrink: 0;
	border: 1px solid #3a3f5c;
}
.gifts-user-result-info {
	display: flex;
	flex-direction: column;
	gap: 1px;
	min-width: 0;
}
.gifts-user-result-login {
	color: #d0d3e6;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.gifts-user-result-id {
	color: rgba(183,186,205,0.45);
	font-size: 11px;
}
.gifts-no-results {
	color: rgba(183,186,205,0.4);
	cursor: default;
}
.gifts-no-results:hover {
	background: transparent;
}
.gifts-selected-user {
	background: #313448;
	border: 1px solid #454a68;
	border-radius: 3px;
	padding: 7px 12px;
	margin-top: 6px;
	font-size: 13px;
	color: #90caf9;
	display: flex;
	align-items: center;
	gap: 10px;
	justify-content: flex-start;
}
.gifts-selected-ava {
	width: 32px;
	height: 32px;
	border-radius: 50%;
	object-fit: cover;
	flex-shrink: 0;
	border: 1px solid #3a3f5c;
}
.gifts-selected-user-info {
	display: flex;
	flex-direction: column;
	gap: 1px;
	flex: 1;
	min-width: 0;
}
.gifts-selected-user-login {
	color: #90caf9;
}
.gifts-selected-user-id {
	color: rgba(183,186,205,0.4);
	font-size: 11px;
}
.gifts-remove-user {
	cursor: pointer;
	font-size: 18px;
	color: #ef5350;
	margin-left: 10px;
}

/* ---------- Виджет профиля ---------- */
.gifts-profile-widget {
	margin-top: 10px;
}
.gifts-profile-list {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}
.gifts-profile-item {
	background: #252836;
	border: 1px solid #2F3553;
	border-radius: 3px;
	padding: 6px 8px;
	text-align: center;
	cursor: default;
}
.gifts-profile-icon {
	font-size: 24px;
	line-height: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 60px;
	height: 60px;
	overflow: hidden;
}
.gifts-profile-icon img {
	max-width: 100%;
	max-height: 100%;
	object-fit: contain;
	border-radius: 3px;
}
.gifts-profile-empty {
	font-size: 12px;
	color: rgba(183,186,205,0.4);
	padding: 8px;
}

/* ---------- Пустые состояния ---------- */
.gifts-empty {
	text-align: center;
	padding: 40px 20px;
	color: rgba(183,186,205,0.4);
	font-size: 14px;
}
.gifts-loading {
	text-align: center;
	padding: 30px;
	color: rgba(183,186,205,0.4);
}
.gifts-not-auth {
	text-align: center;
	padding: 60px 20px;
}
.gifts-not-auth h2 {
	font-size: 28px;
	color: #d0d3e6;
	margin-bottom: 10px;
}
.gifts-not-auth p {
	color: rgba(183,186,205,0.5);
}


/* ---------- Кнопка Подарить (в профиле) ---------- */
.gifts-profile-btn {
display: inline-block;
float: right;
font-size: 11px;
background: rgba(255,255,255,0.08);
color: #90caf9;
padding: 2px 8px;
border-radius: 3px;
cursor: pointer;
transition: background 0.15s;
}
.gifts-profile-btn:hover {
background: rgba(255,255,255,0.15);
color: #fff;
}

/* ---------- Тултип при наведении на подарок ---------- */
.gifts-profile-item {
position: relative;
cursor: pointer;
}
.gifts-profile-item::after {
content: attr(data-tooltip);
position: absolute;
bottom: calc(100% + 6px);
left: 50%;
transform: translateX(-50%);
background: #1c1e2a;
color: #d0d3e6;
padding: 5px 10px;
border-radius: 4px;
font-size: 12px;
white-space: normal;
text-align: center;
pointer-events: none;
opacity: 0;
transition: opacity 0.15s;
z-index: 200;
border: 1px solid #2F3553;
min-width: 120px;
max-width: 220px;
box-shadow: 0 4px 12px rgba(0,0,0,.4);
}
.gifts-profile-item:hover::after {
opacity: 1;
}

/* ---------- Мини-каталог (профиль — модал) ---------- */
.gifts-mini-catalog {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
gap: 8px;
max-height: 250px;
overflow-y: auto;
padding: 4px 0 8px 0;
margin-bottom: 8px;
}
.gifts-mini-card {
background: #252836;
border: 2px solid #2F3553;
border-radius: 6px;
padding: 8px 4px;
text-align: center;
cursor: pointer;
transition: border-color 0.15s, background 0.15s;
}
.gifts-mini-card:hover {
background: #313448;
border-color: #5c6bc0;
}
.gifts-mini-card.selected {
border-color: #2196F3 !important;
background: #1a2744;
}
.gifts-mini-card-disabled {
opacity: 0.4;
cursor: default;
pointer-events: none;
}
.gifts-mini-card-image {
font-size: 26px;
line-height: 1;
height: 36px;
display: flex;
align-items: center;
justify-content: center;
margin-bottom: 4px;
}
.gifts-mini-card-img {
max-width: 34px;
max-height: 34px;
object-fit: contain;
border-radius: 3px;
}
.gifts-mini-card-name {
font-size: 11px;
color: #b7bacd;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.gifts-mini-card-price {
font-size: 11px;
color: rgba(183,186,205,0.5);
margin-top: 2px;
}
.gifts-mini-card-na {
font-size: 10px;
color: #ef5350;
}
.gifts-mini-card.gifts-rarity-rare      { border-color: #1565C0; }
.gifts-mini-card.gifts-rarity-epic      { border-color: #6A1B9A; }
.gifts-mini-card.gifts-rarity-legendary { border-color: #E65100; }
.gifts-profile-selected-gift {
background: #1e2e1e;
border: 1px solid #4caf50;
border-radius: 4px;
padding: 7px 12px;
font-size: 13px;
color: #a5d6a7;
margin-bottom: 8px;
}
/* ---------- Адаптив ---------- */
@media (max-width: 768px) {
	.gifts-catalog-grid {
		grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
	}
	.gifts-header-stats {
		flex-direction: column;
		gap: 4px;
	}
	.gifts-tabs {
		flex-wrap: wrap;
	}
	.gifts-tab-btn {
		flex: 1;
		text-align: center;
		padding: 8px 10px;
		font-size: 12px;
	}
	.gifts-modal-content {
		width: 95%;
	}
}

/* ---------- Вкладки категорий ---------- */
.gifts-catalog-tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-bottom: 14px;
}
.gifts-cat-tab {
	padding: 5px 14px;
	font-size: 13px;
	background: rgba(128,128,128,.12);
	border: 1px solid rgba(128,128,128,.22);
	border-radius: 20px;
	color: inherit;
	cursor: pointer;
	transition: background .2s, border-color .2s, color .2s;
	outline: none;
	white-space: nowrap;
}
.gifts-cat-tab:hover {
	background: rgba(128,128,128,.25);
}
.gifts-cat-tab.active {
	background: #2196F3;
	border-color: #2196F3;
	color: #fff;
}

/* ---------- Профиль — большой модал отправки подарка ---------- */
#gifts-profile-modal .gifts-modal-content {
	width: 740px;
	max-width: 96vw;
	max-height: 90vh;
}
#gifts-profile-modal .gifts-modal-body {
	padding: 14px 18px 18px;
}
/* Сетка каталога: больше карточек, выше */
#gifts-profile-modal .gifts-mini-catalog {
	grid-template-columns: repeat(auto-fill, minmax(95px, 1fr));
	max-height: 380px;
	gap: 10px;
}
#gifts-profile-modal .gifts-mini-card {
	padding: 10px 6px;
}
#gifts-profile-modal .gifts-mini-card-image {
	font-size: 30px;
	height: 42px;
}
#gifts-profile-modal .gifts-mini-card-img {
	max-width: 40px;
	max-height: 40px;
}
#gifts-profile-modal .gifts-mini-card-name {
	font-size: 12px;
}
#gifts-profile-modal .gifts-mini-card-price {
	font-size: 12px;
}
/* Вкладки категорий внутри модала */
#gifts-profile-modal .gifts-catalog-tabs {
	margin-bottom: 10px;
	border-bottom: 1px solid rgba(255,255,255,0.08);
	padding-bottom: 8px;
}
/* Заголовок активной категории */
.gifts-catalog-section-heading {
	font-size: 12px;
	font-weight: 600;
	color: rgba(183,186,205,0.5);
	text-transform: uppercase;
	letter-spacing: 0.05em;
	margin-bottom: 8px;
	padding: 0 2px;
}
