/**
 * Employee portal — holiday calendar.
 */

.adat-portal-holidays {
	display: flex;
	flex-direction: column;
	gap: 1.25rem;
}

.adat-portal-holiday-toolbar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem 1.25rem;
	margin-bottom: 1rem;
}

.adat-portal-holiday-legend {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem 1.25rem;
	list-style: none;
	margin: 0;
	padding: 0;
	flex: 1 1 12rem;
}

.adat-portal-holiday-legend__item {
	display: inline-flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.4rem;
	font-size: 0.85rem;
	color: #475569;
}

.adat-portal-holiday-legend__swatch {
	width: 1.1rem;
	height: 1.1rem;
	border-radius: 4px;
	flex-shrink: 0;
	border: 1px solid rgba(15, 23, 42, 0.06);
}

.adat-portal-holiday-legend__swatch--public {
	background: #f0f9ff;
	border-color: #bae6fd;
}

.adat-portal-holiday-legend__swatch--restricted {
	background: #faf5ff;
	border-color: #ddd6fe;
}

.adat-portal-holiday-legend__swatch--weekend {
	background: #fef2f2;
	border-color: #fecaca;
}

.adat-portal-holiday-legend__tag {
	font-size: 0.7rem;
}

.adat-portal-holiday-legend__hint {
	font-size: 0.78rem;
	color: #64748b;
}

.adat-portal-holiday-year-form {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem 0.65rem;
	padding: 0.65rem 0.85rem;
	border: 1px solid var(--adat-portal-border, #e2e8f0);
	border-radius: 10px;
	background: #fff;
}

.adat-portal-holiday-year-form label {
	font-size: 0.8rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: #64748b;
}

.adat-portal-holiday-year-form select {
	min-width: 5.5rem;
	padding: 0.4rem 0.55rem;
	border: 1px solid #cbd5e1;
	border-radius: 6px;
	font-size: 0.95rem;
	background: #fff;
}

.adat-portal-card--holiday-calendar {
	margin-top: 0;
	overflow: hidden;
}

.adat-portal-holiday-empty {
	padding: 2rem 1rem;
	text-align: center;
	color: #64748b;
}

.adat-portal-holiday-table-wrap {
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}

.adat-portal-holiday-table {
	width: 100%;
	border-collapse: separate;
	border-spacing: 0;
	font-size: 0.9rem;
}

.adat-portal-holiday-table thead th {
	position: sticky;
	top: 0;
	z-index: 1;
	padding: 0.75rem 1rem;
	text-align: left;
	font-size: 0.72rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: #64748b;
	background: #f1f5f9;
	border-bottom: 2px solid #e2e8f0;
}

.adat-portal-holiday-table tbody td {
	padding: 0.85rem 1rem;
	vertical-align: top;
	border-bottom: 1px solid #e2e8f0;
}

.adat-portal-holiday-table .column-serial {
	width: 3.5rem;
	text-align: center;
}

.adat-portal-holiday-serial {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 1.65rem;
	height: 1.65rem;
	border-radius: 999px;
	background: #f1f5f9;
	color: #475569;
	font-size: 0.8rem;
	font-weight: 700;
}

.adat-portal-holiday-row--gazetted {
	background: #f8fafc;
}

.adat-portal-holiday-row--gazetted .adat-portal-holiday-serial {
	background: #e0f2fe;
	color: #0369a1;
}

.adat-portal-holiday-row--restricted {
	background: #faf5ff;
}

.adat-portal-holiday-row--restricted .adat-portal-holiday-serial {
	background: #ede9fe;
	color: #5b21b6;
}

.adat-portal-holiday-row--weekend {
	background: #fef2f2;
}

.adat-portal-holiday-row--weekend .adat-portal-holiday-serial {
	background: #fee2e2;
	color: #b91c1c;
}

.adat-portal-holiday-row--restricted.adat-portal-holiday-row--weekend {
	background: linear-gradient(90deg, #faf5ff 0%, #fef2f2 100%);
}

.adat-portal-holiday-row--restricted.adat-portal-holiday-row--weekend .adat-portal-holiday-serial {
	background: #fce7f3;
	color: #9d174d;
}

.adat-portal-holiday-date time {
	display: block;
	font-weight: 600;
	color: #0f172a;
}

.adat-portal-holiday-row--weekend .adat-portal-holiday-date time {
	color: #b91c1c;
}

.adat-portal-holiday-type-cell {
	display: flex;
	flex-wrap: wrap;
	gap: 0.35rem;
	align-items: center;
}

.adat-portal-holiday-weekend-tag {
	display: inline-block;
	padding: 0.22rem 0.55rem;
	border-radius: 999px;
	background: #fecaca;
	color: #991b1b;
	font-size: 0.75rem;
	font-weight: 700;
	line-height: 1.35;
}

.adat-portal-holiday-title strong {
	font-size: 0.95rem;
	color: #0f172a;
}

.adat-portal-holiday-type {
	display: inline-block;
	padding: 0.22rem 0.55rem;
	border-radius: 999px;
	font-size: 0.75rem;
	font-weight: 700;
	line-height: 1.35;
	max-width: 14rem;
}

.adat-portal-holiday-type--gazetted,
.adat-portal-holiday-type--mandatory {
	background: #dbeafe;
	color: #1e40af;
}

.adat-portal-holiday-type--restricted {
	background: #ddd6fe;
	color: #5b21b6;
}

@media (max-width: 720px) {
	.adat-portal-holiday-table thead {
		display: none;
	}

	.adat-portal-holiday-table tbody tr {
		display: block;
		margin-bottom: 0.75rem;
		border: 1px solid #e2e8f0;
		border-radius: 10px;
		overflow: hidden;
	}

	.adat-portal-holiday-table tbody td {
		display: flex;
		flex-wrap: wrap;
		gap: 0.25rem 0.5rem;
		justify-content: space-between;
		padding: 0.55rem 0.85rem;
		border-bottom: 1px solid #f1f5f9;
	}

	.adat-portal-holiday-table tbody td:last-child {
		border-bottom: none;
	}

	.adat-portal-holiday-table tbody td::before {
		content: attr(data-label);
		font-size: 0.7rem;
		font-weight: 700;
		text-transform: uppercase;
		letter-spacing: 0.04em;
		color: #94a3b8;
		flex: 0 0 100%;
	}

	.adat-portal-holiday-table .column-serial {
		text-align: left;
	}
}
