/* Layout hierarchy overrides. Loaded after the legacy planner stylesheet. */
.w40iq-deployment-planner-guest__field-panel.w40iq-deployment-planner-guest__section-card {
	display: block !important;
	grid-template-columns: none !important;
	align-items: stretch !important;
	justify-content: stretch !important;
	min-height: 0 !important;
	margin: 10px 14px 0;
	padding: 0 !important;
	overflow: visible !important;
	background: rgba(12, 12, 9, 0.9);
	border: 1px solid rgba(240, 217, 166, 0.2);
	border-radius: 8px;
}

.w40iq-deployment-planner-guest__field-panel > .w40iq-deployment-planner-guest__section-summary {
	border-left-color: #2d93b8;
}

.w40iq-deployment-planner-guest__field-settings-grid {
	display: grid;
	grid-template-columns:
		minmax(280px, 1fr)
		minmax(190px, 0.72fr)
		minmax(230px, 0.82fr)
		minmax(96px, 0.36fr)
		minmax(190px, 0.58fr);
	align-items: end;
	gap: 10px;
	width: auto;
	margin: 0 !important;
	padding: 10px 14px 14px;
	background: rgba(7, 7, 5, 0.46);
	border-radius: 0 0 7px 7px;
}

.w40iq-deployment-planner-guest__layout-options-row {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 10px;
	min-width: 0;
	max-width: 100%;
	box-sizing: border-box;
	padding: 10px 14px 0;
}

.w40iq-deployment-planner-guest__layout-options-row > .w40iq-deployment-planner-guest__field {
	min-width: 0;
	max-width: 100%;
}

.w40iq-deployment-planner-guest__layout-options-row select {
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
}


.w40iq-deployment-planner-guest__field-panel:not([open]) > .w40iq-deployment-planner-guest__field-settings-grid {
	display: none !important;
}

.w40iq-deployment-planner-guest.is-locked.has-image .w40iq-deployment-planner-guest__field-panel.w40iq-deployment-planner-guest__section-card > .w40iq-deployment-planner-guest__section-summary {
	display: grid !important;
}

.w40iq-deployment-planner-guest.is-locked.has-image .w40iq-deployment-planner-guest__field-panel.w40iq-deployment-planner-guest__section-card[open] > .w40iq-deployment-planner-guest__field-settings-grid {
	display: grid !important;
}

.w40iq-deployment-planner-guest.is-locked.has-image .w40iq-deployment-planner-guest__field-panel.w40iq-deployment-planner-guest__section-card:not([open]) > .w40iq-deployment-planner-guest__field-settings-grid {
	display: none !important;
}

.w40iq-deployment-planner-guest__field-settings-grid > *,
.w40iq-deployment-planner-guest__field-settings-grid .w40iq-deployment-planner-guest__icon-button[data-w40iq-lock] {
	min-width: 0;
	max-width: 100%;
}

.w40iq-deployment-planner-guest__field-settings-grid .w40iq-deployment-planner-guest__icon-button[data-w40iq-lock] {
	width: 100% !important;
	height: var(--w40iq-control-height);
	min-height: var(--w40iq-control-height);
	max-height: var(--w40iq-control-height);
}

.w40iq-deployment-planner-guest__section-count.is-locked {
	color: #0b0a07;
	background: var(--w40iq-warning-yellow);
	border-color: rgba(117, 75, 0, 0.9);
}

.w40iq-deployment-planner-guest__section-count.is-ready {
	color: #0b0a07;
	background: var(--w40iq-grot-green);
	border-color: rgba(0, 79, 27, 0.82);
}

.w40iq-deployment-planner-guest__library-save-row {
	display: grid;
	grid-template-columns: minmax(190px, 0.55fr) minmax(380px, 1.45fr);
	align-items: center;
	gap: 16px;
	padding: 11px 12px;
	background:
		linear-gradient(90deg, rgba(243, 198, 59, 0.08), transparent 56%),
		rgba(21, 19, 13, 0.74);
	border: 1px solid rgba(240, 217, 166, 0.18);
	border-radius: 7px;
}

.w40iq-deployment-planner-guest__library-save-copy {
	display: grid;
	gap: 3px;
	min-width: 0;
}

.w40iq-deployment-planner-guest__library-save-copy strong {
	color: #fff4ce;
	font-size: 0.86rem;
	line-height: 1.2;
}

.w40iq-deployment-planner-guest__library-save-copy span {
	color: rgba(240, 217, 166, 0.66);
	font-size: 0.74rem;
	line-height: 1.3;
}

.w40iq-deployment-planner-guest__library-save-row .w40iq-deployment-planner-guest__save-area {
	display: grid;
	grid-template-columns: minmax(220px, 1fr) 112px 72px;
	gap: 8px;
	width: 100%;
	min-height: var(--w40iq-control-height);
}

.w40iq-deployment-planner-guest__library-save-row .w40iq-deployment-planner-guest__layout-name,
.w40iq-deployment-planner-guest__library-save-row .w40iq-deployment-planner-guest__layout-name input {
	width: 100%;
	min-width: 0;
}

.w40iq-deployment-planner-guest.is-shared-readonly .w40iq-deployment-planner-guest__field-panel > .w40iq-deployment-planner-guest__section-summary {
	opacity: 1;
	pointer-events: auto;
}

@media (min-width: 981px) {
	.w40iq-deployment-planner-guest__storage-panels {
		grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
		gap: 10px !important;
	}

	.w40iq-deployment-planner-guest__storage-panel {
		height: auto !important;
		min-height: 0 !important;
	}

	.w40iq-deployment-planner-guest__storage-panel .w40iq-deployment-planner-guest__army-storage-head {
		display: grid !important;
		grid-template-columns: minmax(0, 1fr) !important;
		align-items: center !important;
		min-height: 58px !important;
		height: auto !important;
		padding: 9px 48px 9px 14px !important;
		text-align: left !important;
	}

	.w40iq-deployment-planner-guest__storage-panel .w40iq-deployment-planner-guest__army-storage-icon-image,
	.w40iq-deployment-planner-guest__storage-panel.is-storage-expanded .w40iq-deployment-planner-guest__army-storage-icon-image {
		display: none !important;
	}

	.w40iq-deployment-planner-guest__storage-panel .w40iq-deployment-planner-guest__army-storage-copy {
		display: grid !important;
		align-content: center !important;
		gap: 3px !important;
		min-height: 0 !important;
		margin: 0 !important;
		text-align: left !important;
	}

	.w40iq-deployment-planner-guest__storage-panel .w40iq-deployment-planner-guest__army-storage-copy h4 {
		justify-content: flex-start !important;
		text-align: left !important;
	}

	.w40iq-deployment-planner-guest__storage-panel .w40iq-deployment-planner-guest__army-storage-copy p {
		margin: 0 !important;
		text-align: left !important;
	}
}

@media (max-width: 980px) {
	.w40iq-deployment-planner-guest__field-settings-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.w40iq-deployment-planner-guest__field-settings-grid .w40iq-deployment-planner-guest__field--maps {
		grid-column: 1 / -1;
	}

	.w40iq-deployment-planner-guest__library-save-row {
		grid-template-columns: minmax(0, 1fr);
	}
}

@media (max-width: 720px) {
	.w40iq-deployment-planner-guest__field-panel.w40iq-deployment-planner-guest__section-card {
		margin-inline: 8px;
	}

	.w40iq-deployment-planner-guest__field-settings-grid,
	.w40iq-deployment-planner-guest__library-save-row .w40iq-deployment-planner-guest__save-area {
		grid-template-columns: minmax(0, 1fr);
	}

	.w40iq-deployment-planner-guest__field-settings-grid .w40iq-deployment-planner-guest__field--maps {
		grid-column: auto;
	}
}

/* Aufstellungslayout/Terrain aus dem 11E-Datensatz ersetzt den manuellen
 * Spielfeldgroessen-/Hintergrundbild-Workflow. Steuerung bleibt im Markup/JS
 * vorhanden (fuer eine moegliche spaetere Reaktivierung), nur visuell/interaktiv
 * deaktiviert. */
.w40iq-deployment-planner-guest__field-settings-grid {
	display: none !important;
}
