﻿
/* Nuova Palette - Sample EDUTECH */

:root {
	--primary-color: #5bc0de; /* Bootstrap - INFO */
	--accent-bg: #c6f2ff; /* Azzurrino */

	--primary-dark: #5489b6; /* Bootstrap - PRIMARY */
	--secondary-color: #1565c0; /* Blu bottoni azioni */

	--primary-gradient: linear-gradient(to bottom, #5bc0de, #5489b6);
	--bg-color: #f4f6f9;
	--text-dark: #333;
	--text-light: #666;
	--white: #ffffff;
	--border-radius: 8px;
	/*danger*/
	--danger: #dc3545;
	--danger-bg: #fff0f3;
	/*success*/
	--success: #1a7a32; /* era #28a745, WCAG AA: 4.58:1 su #e6f9ea */
	--success-bg: #e6f9ea;
	/*warning*/
	/*--warning: #ffc107;
	--warning-bg: #ffc107;*/
	--warning: #8a6d00; /* era #d4a017, WCAG AA: 4.52:1 su #fff8e1 */
	--warning-bg: #fff8e1;
	/*Info*/
	--info: #17a2b8; /*#28a745;*/
	--info-bg: #effcff; /* #e6f9ea; */
	/*Layout*/
	--border-color: #eee;
	--input-border-color: #ddd;
	--progress-bg: #eee;
	--text-secondary: #767676; /* era #888, da MOCKUP, WCAG AA compliant (4.5:1) */
	--text-muted: #767676; /* era #999, da MOCKUP, WCAG AA compliant (4.5:1) */
}

/* Styli nuovo Header */
/* --- HEADER --- */
header {
	background-color: var(--white);
	padding: 15px 40px;
	display: flex;
	justify-content: space-between;
	align-items: center;
	box-shadow: 0 2px 10px rgba(0,0,0,0.05);
	position: sticky;
	top: 0;
	z-index: 100;
}

	header .logo {
		color: var(--primary-color) !important;
		font-weight: 700;
		font-size: 24px;
		display: flex;
		align-items: center;
		gap: 10px;
		text-decoration: none;
		max-height: 60px;
		flex-shrink: 0;
	}

	header .logo img {
		width: 180px;
		height: auto;
	}

	header .nav-menu {
		display: flex;
		gap: 20px;
		align-items: center;
		font-size: 14px;
		color: var(--text-light);
		flex: 1 1 auto;
		flex-wrap: wrap;
		min-width: 0;
		justify-content: center;
	}

	header .nav-item {
		display: flex;
		align-items: center;
		gap: 5px;
		cursor: pointer;
		padding: 8px 16px;
		border-radius: 5px;
		transition: 0.3s;
		text-decoration: none;
		color: inherit;
		text-align: center;
	}
	/* Link Navigazione */
		header .nav-item.active,
		header .nav-item.active i {
			background-color: var(--primary-color) !important;
			color: white !important;
		}

		header .nav-item:hover {
			background-color: #f0f0f0;
			text-decoration: none;
		}

	header .user-profile {
		display: flex;
		align-items: center;
		gap: 10px;
		flex-shrink: 0;
	}

	header .user-profile .user-name {
		font-weight: 700;
	}

	header .user-profile .user-title {
		color: var(--text-secondary); /* #767676, WCAG AA 4.5:1 su bianco */
	}

	header div#header {
		display: none;
	}

	header div#page-box {
		margin-top: 0px;
	}

	header a.avatar {
		text-decoration: none;
	}

		header a.avatar img {
			width: 40px;
			height: 40px;
			border-radius: 50%;
			object-fit: cover;
		}

		header a.avatar span {
			background-color: #FFB74D;
			width: 40px;
			height: 40px;
			display: block;
			font-size: 20px;
			padding-top: 5px;
			text-align: center;
			border-radius: 50%;
			text-decoration: none;
		}

div#page-box {
	margin-top: 0px;
}

/*.avatar {
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background-image: url('https://ui-avatars.com/api/?name=Mario+Rossi&background=random');
	background-size: cover;
}*/


/* --- RESPONSIVE HEADER: larghezze intermedie --- */
@media (max-width: 1300px) {
	header {
		padding: 12px 20px;
	}

	header .nav-menu {
		gap: 8px;
	}

	header .nav-item {
		padding: 6px 10px;
		font-size: 13px;
	}
}

/* --- RESPONSIVE HEADER --- */
@media (max-width: 900px) {
	header {
		padding: 12px 16px;
		flex-wrap: wrap; /* permette la seconda riga */
		gap: 10px;
	}

		/* riga 1: logo a sinistra */
		header .logo {
			order: 1;
			flex: 0 0 auto;
		}

		/* riga 1: user a destra */
		header .user-profile {
			order: 2;
			margin-left: auto; /* spinge a destra */
			flex: 0 0 auto;
		}

		/* riga 2: menu sotto, a capo se serve */
		header .nav-menu {
			order: 3;
			flex: 1 1 100%;
			width: 100%;
			gap: 8px;
			flex-wrap: wrap; /* i bottoni vanno a capo */
			justify-content: flex-start;
		}

		header .nav-item {
			padding: 8px 10px;
			white-space: nowrap; /* evita spezzare "Da Completare" */
		}
}


/* ============================================
   NOTIFICHE - Campanella e modali
   ============================================ */

/* Campanella nell'header */
.notification-bell-wrapper {
	position: relative;
	display: inline-block;
}

.notification-bell {
	position: relative;
	cursor: pointer;
	padding: 4px;
}

.notification-badge {
	position: absolute;
	top: -4px;
	right: -8px;
	background-color: #dc3545;
	color: white;
	border-radius: 50%;
	font-size: 10px;
	min-width: 18px;
	height: 18px;
	line-height: 18px;
	text-align: center;
	padding: 0 4px;
	font-weight: bold;
}

/* Animazione slide up */
@keyframes notifSlideUp {
	from {
		opacity: 0;
		transform: translateY(20px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* Overlay con blur */
.modal.notif-modal {
	background: rgba(0, 0, 0, 0.5);
	backdrop-filter: blur(4px);
	display: flex !important;
	justify-content: center;
	align-items: center;
}

/* Dialog centrato */
.modal.notif-modal .modal-dialog {
	margin: 0;
	max-width: 600px;
	width: 90%;
}

/* Container principale */
.modal.notif-modal .modal-content {
	width: 100%;
	border: none !important;
	border-radius: 16px;
	overflow: hidden;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
	animation: notifSlideUp 0.3s ease-out;
}

/* Header con gradiente */
.modal.notif-modal .modal-header {
	background: var(--primary-gradient);
	background-color: var(--primary-color);
	padding: 20px 25px;
	border: none;
	border-radius: 0;
}

.modal.notif-modal .modal-header .modal-title {
	color: white;
	font-size: 20px;
	font-weight: 700;
}

/* Pulsante close rotondo */
.modal.notif-modal .modal-header .close,
.modal.notif-modal .modal-header button.close {
	background: rgba(255, 255, 255, 0.2);
	border: none;
	color: white;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: 0.2s;
	opacity: 1;
	padding: 0;
	margin: 0;
	font-size: 20px;
	line-height: 1;
}

.modal.notif-modal .modal-header .close:hover,
.modal.notif-modal .modal-header button.close:hover {
	background: rgba(255, 255, 255, 0.4);
	opacity: 1;
}

.modal.notif-modal .modal-header .close span {
	color: white;
}

/* Body con padding e scroll */
.modal.notif-modal .modal-body {
	padding: 25px;
	max-height: 70vh;
	overflow-y: auto;
}

/* Notification row */
.modal.notif-modal .notif-row {
	border: 1px solid #eee;
	border-radius: 12px;
	padding: 15px 20px;
	margin-bottom: 10px;
	transition: 0.2s;
	background: #fff;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
	display: flex;
	align-items: center;
	gap: 10px;
}

.modal.notif-modal .notif-row:hover {
	border-color: var(--primary-color);
	box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.modal.notif-modal .notif-row.unread {
	background: #f0f9ff;
	border-color: var(--primary-color);
}

.modal.notif-modal .notif-top {
	display: flex;
	gap: 15px;
	flex: 1;
	min-width: 0;
}

.modal.notif-modal .notif-icon-box {
	width: 40px;
	height: 40px;
	background: var(--accent-bg);
	color: var(--primary-color);
	border-radius: 10px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 18px;
	flex-shrink: 0;
}

.modal.notif-modal .notif-icon-box i {
	color: var(--primary-color);
}

.modal.notif-modal .notif-info {
	flex: 1;
	min-width: 0;
}

.modal.notif-modal .notif-info h4 {
	font-size: 15px;
	font-weight: 700;
	color: var(--text-dark);
	margin-bottom: 4px;
	line-height: 1.3;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.modal.notif-modal .notif-time {
	font-size: 12px;
	color: var(--text-muted); /* era #999, da MOCKUP, WCAG AA */
}

.modal.notif-modal .notif-time i {
	margin-right: 4px;
}

/* Dismiss X button */
.modal.notif-modal .notif-dismiss {
	background: none;
	border: none;
	color: #ccc;
	cursor: pointer;
	padding: 4px 8px;
	font-size: 14px;
	transition: 0.2s;
	flex-shrink: 0;
}

.modal.notif-modal .notif-dismiss:hover {
	color: #dc3545;
}

/* Message detail */
.modal.notif-modal .notif-detail-row {
	display: flex;
	gap: 10px;
	padding: 4px 0;
	font-size: 14px;
}

.modal.notif-modal .notif-detail-row strong {
	min-width: 80px;
	color: #666;
}

.modal.notif-modal .notif-message-body {
	padding: 15px;
	background: #f8f9fa;
	border-radius: 8px;
	font-size: 14px;
	line-height: 1.6;
}

/* Footer */
.modal.notif-modal .modal-footer {
	padding: 15px 25px;
	border-top: 1px solid #eee;
	display: flex;
	align-items: center;
}