/*
 * „Mein Bereich“ und Abmelden-Knopf im Office-Kasten (N54-01, 0.5.7).
 *
 * Eigener Rahmen der Suite, unabhängig vom Theme und davon, ob die Seite mit
 * Elementor bearbeitet wurde: Inhaltsbreite wie die Shop-Seiten (Elementor-Box
 * 1140 px mit 10 px Spaltenabstand → 1120 px Inhalt), am Handy 16 px Rand.
 */
.hsuite-myarea {
	--hsuite-ma-red: var(--hgm-brand-red, #d9001c);
	--hsuite-ma-text: #2d2e30;
	--hsuite-ma-muted: #5f5f5f;
	--hsuite-ma-line: #e5e5e5;
	--hsuite-ma-surface: #f6f6f6;
	--hsuite-ma-radius: var(--hgm-button-radius, 3px);
	box-sizing: border-box;
	color: var(--hsuite-ma-text);
	display: grid;
	gap: 24px;
	margin: 0 auto;
	max-width: 1140px;
	padding: 0 10px 40px;
	width: 100%;
}

.hsuite-myarea *,
.hsuite-myarea *::before,
.hsuite-myarea *::after {
	box-sizing: border-box;
}

.hsuite-myarea .hsuite-myarea__title {
	color: var(--hsuite-ma-text);
	font-size: 40px;
	font-weight: 500;
	line-height: 1.2;
	margin: 8px 0 0;
}

.hsuite-myarea .hsuite-myarea__card {
	background: #fff;
	border: 1px solid var(--hsuite-ma-line);
	border-radius: 4px;
	min-width: 0;
	padding: 24px;
}

.hsuite-myarea .hsuite-myarea__card h2 {
	color: var(--hsuite-ma-text);
	font-size: 22px;
	font-weight: 500;
	line-height: 1.3;
	margin: 0 0 16px;
}

/* Kopf: Angemeldet als … und Abmelden */
.hsuite-myarea .hsuite-myarea__head {
	align-items: center;
	display: flex;
	flex-wrap: wrap;
	gap: 12px 24px;
	justify-content: space-between;
}

.hsuite-myarea .hsuite-myarea__hello {
	font-size: 16px;
	margin: 0;
}

.hsuite-myarea .hsuite-myarea__logout {
	margin: 0;
}

/* Knopf „Abmelden“ – gleiche Gestalt in „Mein Bereich“ und im Office-Kasten */
.hsuite-myarea .hsuite-myarea__btn,
.gcth-office-panel .gcth-office-panel__session a {
	align-items: center;
	background: #fff;
	border: 0;
	border-radius: var(--hgm-button-radius, 3px);
	box-shadow: inset 0 0 0 1.5px #2d2e30;
	color: #2d2e30;
	cursor: pointer;
	display: inline-flex;
	font-family: inherit;
	font-size: 15px;
	font-weight: 600;
	gap: 8px;
	justify-content: center;
	letter-spacing: normal;
	line-height: 1.2;
	min-height: 44px;
	padding: 10px 20px;
	text-decoration: none;
	text-transform: none;
	white-space: nowrap;
}

.hsuite-myarea .hsuite-myarea__btn:hover,
.hsuite-myarea .hsuite-myarea__btn:focus-visible,
.gcth-office-panel .gcth-office-panel__session a:hover,
.gcth-office-panel .gcth-office-panel__session a:focus-visible {
	background: #2d2e30;
	color: #fff;
}

.hsuite-myarea .hsuite-myarea__btn:focus-visible,
.gcth-office-panel .gcth-office-panel__session a:focus-visible {
	outline: 2px solid #1a5fb4;
	outline-offset: 2px;
}

.gcth-office-panel .gcth-office-panel__session {
	align-items: center;
	display: flex;
	flex-wrap: wrap;
	gap: 8px 16px;
	justify-content: space-between;
	margin-top: 0.8rem;
}

/* Zuletzt angesehen: Kacheln wie im Shop */
.hsuite-myarea .hsuite-myarea__grid {
	display: grid;
	gap: 20px;
	grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
	list-style: none;
	margin: 0;
	padding: 0;
}

.hsuite-myarea .hsuite-myarea__grid li {
	margin: 0;
	min-width: 0;
}

.hsuite-myarea .hsuite-myarea__grid a {
	color: inherit;
	display: flex;
	flex-direction: column;
	gap: 6px;
	height: 100%;
	text-align: center;
	text-decoration: none;
}

.hsuite-myarea .hsuite-myarea__grid img {
	aspect-ratio: 1;
	background: #fff;
	display: block;
	height: auto;
	margin: 0 0 6px;
	object-fit: contain;
	width: 100%;
}

.hsuite-myarea .hsuite-myarea__name {
	font-size: 15px;
	font-weight: 600;
	line-height: 1.35;
	overflow-wrap: anywhere;
}

.hsuite-myarea .hsuite-myarea__grid a:hover .hsuite-myarea__name,
.hsuite-myarea .hsuite-myarea__grid a:focus-visible .hsuite-myarea__name {
	color: var(--hsuite-ma-red);
}

.hsuite-myarea .hsuite-myarea__sku {
	color: var(--hsuite-ma-muted);
	font-size: 13px;
}

/* Interne Dokumente */
.hsuite-myarea .hsuite-myarea__docs {
	margin: 0;
}

.hsuite-myarea .hsuite-myarea__docs dt {
	font-weight: 600;
	margin: 14px 0 4px;
}

.hsuite-myarea .hsuite-myarea__docs dt:first-child {
	margin-top: 0;
}

.hsuite-myarea .hsuite-myarea__docs dd {
	margin: 2px 0 0;
}

.hsuite-myarea .hsuite-myarea__docs dd span {
	color: var(--hsuite-ma-muted);
}

/* Leerzustand */
.hsuite-myarea .hsuite-myarea__empty {
	background: var(--hsuite-ma-surface);
	border-radius: var(--hsuite-ma-radius);
	color: var(--hsuite-ma-muted);
	margin: 0;
	padding: 16px 20px;
}

.hsuite-myarea .hsuite-myarea__empty strong {
	color: var(--hsuite-ma-text);
	display: block;
	margin-bottom: 2px;
}

/* Handy: 16 px Rand zum Fensterrand, unabhängig vom Innenabstand des Themes */
@media (max-width: 767px) {
	.hsuite-myarea {
		gap: 16px;
		margin-left: calc(50% - 50vw);
		margin-right: calc(50% - 50vw);
		max-width: none;
		padding: 0 16px 32px;
		width: 100vw;
	}

	.hsuite-myarea .hsuite-myarea__title {
		font-size: 30px;
	}

	.hsuite-myarea .hsuite-myarea__card {
		padding: 16px;
	}

	.hsuite-myarea .hsuite-myarea__card h2 {
		font-size: 20px;
		margin-bottom: 12px;
	}

	.hsuite-myarea .hsuite-myarea__head {
		align-items: stretch;
		flex-direction: column;
	}

	.hsuite-myarea .hsuite-myarea__btn {
		width: 100%;
	}

	.hsuite-myarea .hsuite-myarea__grid {
		gap: 16px 12px;
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}
