﻿/* Favorites Page (.fav-*) */
/* FAVORITES PAGE  (.fav-*) */
.fav-wrap {
	min-height: 80vh;
	padding-bottom: 60px;
}

.fav-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 12px;
	padding: 28px 0 20px;
	max-width: 1100px;
	margin-inline: auto;
}

.fav-title {
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 22px;
	font-weight: 800;
	color: #111827;
}

.fav-count {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: #eef2ff;
	color: #123e8a;
	font-size: 13px;
	font-weight: 700;
	min-width: 24px;
	height: 24px;
	padding: 0 6px;
	border-radius: 20px;
}

.fav-back-link {
	font-size: 13px;
	color: #6b7280;
	text-decoration: none;
	transition: color 0.2s;
}

.fav-back-link:hover {
	color: #123e8a;
}

/* Empty state */
.fav-empty {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 12px;
	padding: 80px 20px;
	color: #9ca3af;
	max-width: 400px;
	margin-inline: auto;
	text-align: center;
}

.fav-empty svg {
	opacity: 0.4;
}

.fav-empty__title {
	font-size: 17px;
	font-weight: 700;
	color: #374151;
}

.fav-empty__sub {
	font-size: 14px;
}

.fav-empty__cta {
	margin-top: 8px;
	display: inline-flex;
	padding: 10px 24px;
	background: #123e8a;
	color: #fff;
	font-size: 14px;
	font-weight: 700;
	border-radius: 8px;
	text-decoration: none;
	transition: opacity 0.2s;
}

.fav-empty__cta:hover {
	opacity: 0.85;
}

/* Cards grid */
.fav-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: 20px;
	max-width: 1100px;
	margin-inline: auto;
	padding-bottom: 40px;
}

.fav-card {
	background: #fff;
	border: 1px solid #e5e7eb;
	border-radius: 12px;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	position: relative;
}

.fav-card:hover {
	border-color: #123e8a;
}

.fav-card__img-wrap {
	display: block;
	width: 100%;
	height: 160px;
	overflow: hidden;
}

.fav-card__img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.3s;
}

.fav-card:hover .fav-card__img {
	transform: scale(1.04);
}

.fav-card__body {
	padding: 14px 16px 8px;
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.fav-card__cat {
	display: inline-block;
	font-size: 10px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: #123e8a;
	text-decoration: none;
}

.fav-card__title {
	font-size: 15px;
	font-weight: 700;
	line-height: 1.4;
	color: #111827;
	margin: 0;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.fav-card__title a {
	color: inherit;
	text-decoration: none;
}

.fav-card__title a:hover {
	color: #123e8a;
}

.fav-card__meta {
	display: flex;
	align-items: center;
	gap: 5px;
	font-size: 12px;
	color: #9ca3af;
}

.fav-remove-btn {
	display: inline-flex;
	position: absolute;
	top: 10px;
	right: 10px;
	align-items: center;
	gap: 5px;
	font-size: 12px;
	font-weight: 600;
	color: #6b7280;
	background: #f3f4f6;
	border: none;
	border-radius: 100%;
	padding: 5px;
	cursor: pointer;
}

.fav-remove-btn:hover {
	background: #fee2e2;
	color: #dc2626;
}

body.dark-mode .fav-count {
	background: rgba(18, 62, 138, 0.3);
	color: #60a5fa;
}

body.dark-mode .fav-card:hover {
	border-color: #60a5fa;
}

body.dark-mode .fav-empty__title {
	color: #d1d5db;
}

body.dark-mode .fav-remove-btn {
	background: #2d3036;
	color: #9ca3af;
}

body.dark-mode .fav-remove-btn:hover {
	background: rgba(220, 38, 38, 0.2);
	color: #f87171;
}

/* Favorites toast notification */
.fav-toast {
	padding: 12px 20px;
	border-radius: 8px;
	font-size: 14px;
	font-weight: 600;
	margin-bottom: 16px;
	max-width: 1100px;
	margin-inline: auto;
}

.fav-toast--ok {
	background: #dcfce7;
	color: #15803d;
	border-left: 4px solid #16a34a;
}

body.dark-mode .fav-toast--ok {
	background: rgba(22, 163, 74, 0.18);
	color: #4ade80;
	border-left-color: #4ade80;
}
