/* Modul Cloud — Dashboard
   Widgets are level-2 surfaces: a card resting on the page, defined by its
   border and a very shallow shadow. They do not lift, scale or fade in on a
   stagger — a dashboard that animates itself every time you open it stops
   being a place you glance at. */

#dashboard, .dashboard {
	background: var(--mt-page-bg);
}

#dashboard h2, .dashboard h2 {
	font-size: var(--mt-text-section);
	font-weight: var(--mt-weight-semibold);
	letter-spacing: var(--mt-tracking-tight);
}

.panel {
	background: var(--mt-surface-card) !important;
	border: 1px solid var(--mt-border) !important;
	border-radius: var(--mt-radius-card) !important;
	box-shadow: var(--mt-elevation-2) !important;
	transition: border-color var(--mt-duration-fast) var(--mt-ease);
	overflow: hidden;
}

.panel:hover {
	border-color: var(--mt-border-strong) !important;
}

.panel--header {
	font-size: var(--mt-text-ui);
	font-weight: var(--mt-weight-semibold);
	border-bottom: 1px solid var(--mt-border) !important;
}

.widget-items .dashboard-widget-item,
.widget-items li {
	border-radius: var(--mt-radius-control) !important;
	transition: background-color var(--mt-duration-fast) var(--mt-ease);
}

.widget-items .dashboard-widget-item:hover,
.widget-items li:hover {
	background-color: var(--mt-hover-bg-strong) !important;
}

.dashboard-widget-item__icon {
	border-radius: var(--mt-radius-xs) !important;
}

/* Nextcloud paints dashboard widget headers in the on-primary colour, because
   its own dashboard sits on the background image. Ours sit on surfaces, so
   they follow the theme text instead — otherwise a light workspace shows
   white headings on white cards. */
#app-dashboard .panel h2,
#app-dashboard .panel--header,
#app-dashboard .dashboard-panel h2 {
	color: var(--mt-text) !important;
}

/* The greeting is the one piece of text that sits directly on the image.
   Forcing it white only works over dark photographs, so instead it keeps the
   theme's text colour and carries a halo in the theme's *surface* colour —
   dark text with a white glow on a light workspace, light text with a black
   glow on a dark one, legible over either kind of picture. */
#app-dashboard > h2,
#app-dashboard .dashboard__greeting,
.dashboard > h2 {
	color: var(--mt-on-desk) !important;
	text-shadow: var(--mt-on-desk-shadow);
}
