/* Style dla systemu powiadomień */
.notification-container {
	position: fixed;
	z-index: 1000;
	display: flex;
	flex-direction: column;
	gap: 12px;
	padding: 10px;
	width: 350px; /* Zwiększona szerokość z 300px */
	max-width: 100%;
	pointer-events: none;
}

.notification-container.top-right {
	top: calc(
		var(--navbar-height) + 10px
	); /* Przesunięcie niżej o wysokość paska nawigacyjnego */
	right: 10px;
}

.notification-container.top-left {
	top: calc(
		var(--navbar-height) + 10px
	); /* Przesunięcie niżej o wysokość paska nawigacyjnego */
	left: 10px;
}

.notification-container.bottom-right {
	bottom: 10px;
	right: 10px;
}

.notification-container.bottom-left {
	bottom: 10px;
	left: 10px;
}

.notification {
	display: flex;
	align-items: flex-start;
	padding: 18px; /* Zwiększony padding z 15px */
	border-radius: 10px; /* Zwiększony promień zaokrąglenia z 8px */
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
	transform: translateX(120%);
	transition: transform 0.3s ease, opacity 0.3s ease;
	opacity: 0;
	pointer-events: auto;
	overflow: hidden;
	position: relative;
	font-size: 1.05rem; /* Zwiększony rozmiar czcionki */
}

.notification.show {
	transform: translateX(0);
	opacity: 1;
}

.notification.hide {
	transform: translateX(120%);
	opacity: 0;
}

/* Style dla różnych typów powiadomień */
.notification.light {
	background-color: #f8f9fa;
	color: #343a40;
	border-left: 4px solid #6c757d;
}

.notification.dark {
	background-color: #343a40;
	color: #f8f9fa;
	border-left: 4px solid #6c757d;
}

.notification.info.light {
	border-left-color: #007bff;
}

.notification.success.light {
	border-left-color: #28a745;
}

.notification.warning.light {
	border-left-color: #ffc107;
}

.notification.error.light {
	border-left-color: #dc3545;
}

.notification.youtube.light {
	border-left-color: #ff0000;
}

.notification.twitch.light {
	border-left-color: #6441a5;
}

.notification.tiktok.light {
	border-left-color: #000000;
}

.notification.info.dark {
	border-left-color: #0d6efd;
}

.notification.success.dark {
	border-left-color: #198754;
}

.notification.warning.dark {
	border-left-color: #ffc107;
}

.notification.error.dark {
	border-left-color: #dc3545;
}

.notification.youtube.dark {
	border-left-color: #ff0000;
}

.notification.twitch.dark {
	border-left-color: #9147ff;
}

.notification.tiktok.dark {
	border-left-color: #ffffff;
}

.notification-icon-container {
	flex-shrink: 0;
	width: 28px; /* Zwiększone z 24px */
	height: 28px; /* Zwiększone z 24px */
	margin-right: 15px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.notification-icon {
	width: 28px; /* Zwiększone z 24px */
	height: 28px; /* Zwiększone z 24px */
	object-fit: contain;
}

.notification-content {
	flex-grow: 1;
	margin-right: 10px;
}

.notification-content p {
	margin: 0;
	padding: 0;
	line-height: 1.4;
}

.notification-content a {
	color: inherit;
	text-decoration: underline;
}

.notification-close {
	background: none;
	border: none;
	font-size: 20px;
	line-height: 1;
	cursor: pointer;
	padding: 0;
	height: 24px;
	width: 24px;
	display: flex;
	align-items: center;
	justify-content: center;
	color: inherit;
	opacity: 0.7;
	transition: opacity 0.2s;
}

.notification-close:hover {
	opacity: 1;
}

/* Style dla stałych powiadomień (bez auto-zamykania) */
.notification.notification-persistent {
	border-width: 4px;
	box-shadow: 0 5px 15px rgba(0, 0, 0, 0.25);
}

.notification.notification-persistent .notification-close {
	opacity: 1;
	font-weight: bold;
	animation: notification-pulse 1.5s infinite alternate;
}

@keyframes notification-pulse {
	from {
		transform: scale(1);
	}
	to {
		transform: scale(1.15);
	}
}

/* Podświetlenie stałych powiadomień */
.notification.notification-persistent.light {
	background-color: #f8f9fa;
	border-color: #dc3545;
}

.notification.notification-persistent.dark {
	background-color: #343a40;
	border-color: #dc3545;
}

/* Lista powiadomień wyświetlana po kliknięciu w dzwoneczek */
.notifications-panel {
	position: absolute;
	right: 15px; /* Przesunięte w lewo z 0px na 15px */
	top: calc(var(--navbar-height) + 15px); /* Przesunięcie niżej o 15px */
	width: 380px;
	max-width: calc(100vw - 20px);
	max-height: calc(
		100vh - var(--navbar-height) - 40px
	); /* Zmniejszyłem nieco, żeby zawsze było miejsce na dolny margines */
	background-color: var(--card-background);
	border-radius: 12px;
	box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
	overflow: hidden;
	z-index: 1001;
	transform-origin: top right;
	transform: scale(0);
	opacity: 0;
	pointer-events: none;
	transition: transform 0.3s ease, opacity 0.3s ease;
	display: flex;
	flex-direction: column; /* Zapewnia, że nagłówek pozostaje widoczny podczas przewijania */
}

.notifications-panel.active {
	transform: scale(1);
	opacity: 1;
	pointer-events: auto;
}

.notifications-panel-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 15px 20px;
	border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.notifications-panel-title {
	font-size: 1.1rem;
	font-weight: 600;
	color: var(--text-color);
	margin: 0;
	display: flex;
	align-items: center;
}

.notifications-panel-title i {
	margin-right: 10px;
	color: var(--primary-color);
}

.notifications-panel-actions {
	display: flex;
	gap: 10px;
}

.notifications-panel-action {
	background: none;
	border: none;
	font-size: 0.9rem;
	color: var(--text-color);
	opacity: 0.7;
	cursor: pointer;
	padding: 5px 10px;
	border-radius: 4px;
	transition: opacity 0.2s ease, background-color 0.2s ease;
}

.notifications-panel-action:hover {
	opacity: 1;
	background-color: rgba(255, 255, 255, 0.1);
}

.notifications-panel-content {
	padding: 10px;
	overflow-y: auto; /* Zapewnia przewijanie w pionie */
	max-height: calc(
		100vh - var(--navbar-height) - 120px
	); /* Uwzględnia wysokość nagłówka panelu */
	flex-grow: 1; /* Pozwala zawartości zajmować dostępną przestrzeń */
	scrollbar-width: thin; /* Cieńszy pasek przewijania w Firefox */
	scrollbar-color: rgba(255, 255, 255, 0.3) transparent; /* Kolor paska przewijania w Firefox */
}

/* Stylizacja paska przewijania dla WebKit (Chrome, Safari, Edge) */
.notifications-panel-content::-webkit-scrollbar {
	width: 6px;
}

.notifications-panel-content::-webkit-scrollbar-track {
	background: transparent;
}

.notifications-panel-content::-webkit-scrollbar-thumb {
	background-color: rgba(255, 255, 255, 0.3);
	border-radius: 3px;
}

.notifications-panel-content::-webkit-scrollbar-thumb:hover {
	background-color: rgba(255, 255, 255, 0.5);
}

.notifications-panel-empty {
	padding: 40px 20px;
	text-align: center;
	color: var(--text-color);
	opacity: 0.7;
	font-style: italic;
}

.notifications-panel-item {
	display: flex;
	align-items: flex-start;
	padding: 14px;
	border-radius: 8px;
	margin-bottom: 8px;
	background-color: rgba(255, 255, 255, 0.05);
	transition: background-color 0.2s ease;
	cursor: pointer;
	position: relative;
	overflow: hidden;
}

.notifications-panel-item::before {
	content: "";
	display: block;
	position: absolute;
	top: 0;
	right: 0;
	width: 0%;
	height: 100%;
	background: linear-gradient(
		90deg,
		rgba(255, 255, 255, 0) 0%,
		rgba(255, 255, 255, 0.1) 100%
	);
	transition: width 0.3s ease;
	z-index: 0;
	pointer-events: none;
}

.notifications-panel-item:hover::before {
	width: 100%;
}

.notifications-panel-item.read {
	opacity: 0.7;
}

.notifications-panel-item.unread {
	position: relative;
}

.notifications-panel-item.unread::after {
	content: "";
	display: block;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background-color: var(--primary-color);
	position: absolute;
	right: 12px;
	top: 12px;
}

.notifications-panel-item-delete {
	position: absolute;
	right: 8px;
	top: 8px;
	width: 20px;
	height: 20px;
	border-radius: 50%;
	background-color: rgba(255, 255, 255, 0.1);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 12px;
	color: var(--text-color);
	opacity: 0;
	transition: opacity 0.2s ease, background-color 0.2s ease;
	cursor: pointer;
	z-index: 2;
}

.notifications-panel-item:hover .notifications-panel-item-delete {
	opacity: 0.8;
}

.notifications-panel-item-delete:hover {
	opacity: 1 !important;
	background-color: rgba(220, 53, 69, 0.2);
}

.notifications-panel-item-icon {
	flex-shrink: 0;
	width: 24px;
	height: 24px;
	margin-right: 12px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.notifications-panel-item-icon img {
	width: 24px;
	height: 24px;
	object-fit: contain;
}

.notifications-panel-item-content {
	flex-grow: 1;
}

.notifications-panel-item-title {
	font-weight: 600;
	margin: 0 0 3px 0;
	font-size: 0.95rem;
	color: var(--text-color);
}

.notifications-panel-item-message {
	margin: 0;
	font-size: 0.85rem;
	color: var(--text-color);
	opacity: 0.8;
}

.notifications-panel-item-time {
	font-size: 0.75rem;
	color: var(--text-color);
	opacity: 0.6;
	margin-top: 5px;
}

.notifications-panel-item.youtube .notifications-panel-item-icon {
	color: #ff0000;
}

.notifications-panel-item.twitch .notifications-panel-item-icon {
	color: #9147ff;
}

.notifications-panel-item.tiktok .notifications-panel-item-icon {
	color: #25f4ee;
}

.notifications-panel-item.info .notifications-panel-item-icon {
	color: #0d6efd;
}

.notifications-panel-item.warning .notifications-panel-item-icon {
	color: #ffc107;
}

.notifications-panel-item.success .notifications-panel-item-icon {
	color: #198754;
}

.notifications-panel-item.error .notifications-panel-item-icon {
	color: #dc3545;
}

/* Modyfikacja stylu dzwoneczka */
.notifications-toggle {
	position: relative;
}

.notifications-toggle.new-notification::after {
	content: "";
	display: block;
	width: 8px;
	height: 8px;
	background-color: var(--primary-color);
	border-radius: 50%;
	position: absolute;
	top: 0;
	right: 0;
	transform: translate(0%, -25%);
}

/* Responsywność */
@media (max-width: 480px) {
	.notification-container {
		width: calc(100% - 20px);
		max-width: none;
	}
}
