/* Gasolineras de España: Settings › Gas stations in Spain (the same layout as Weather Widget Pro) and the search of the forms */

.gdew-settings .gdew-step {
	max-width: 760px;
}

.gdew-settings .gdew-gen-card {
	max-width: 1100px;
}

.gdew-gen [hidden] {
	display: none !important;
}

.gdew-gen {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 24px;
}

@media (min-width: 1100px) {
	.gdew-gen {
		grid-template-columns: minmax(0, 1fr) minmax(0, 520px);
	}

	.gdew-gen-side {
		position: sticky;
		top: 48px;
		align-self: start;
	}
}

.gdew-gen-group {
	margin: 0 0 16px;
	padding: 8px 12px 12px;
	border: 1px solid #dcdcde;
	border-radius: 4px;
}

.gdew-gen-group legend {
	padding: 0 6px;
	font-weight: 600;
}

.gdew-gen-row {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 8px 12px;
	margin: 8px 0;
}

.gdew-gen-row > label:first-child {
	flex: 0 0 12em;
}

.gdew-gen-control {
	position: relative;
	flex: 1 1 22em;
	max-width: 22em;
}

.gdew-gen-control .regular-text,
.gdew-gen-control select {
	width: 100%;
	max-width: 100%;
}

.gdew-gen-check {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	min-width: 15em;
	margin: 4px 12px 4px 0;
}

.gdew-gen-preview {
	min-height: 120px;
	padding: 16px;
	border-radius: 4px;
	background: #f0f0f1;
	overflow: hidden;
}

.gdew-gen-preview .gdew-preview {
	color: #1e1e1e;
}

.gdew-gen-preview .gdew-card {
	margin: 0;
	background: var(--gdew-bg, #fff);
}

.gdew-chosen {
	margin: 6px 0 0;
}

.gdew-chosen li {
	margin: 2px 0;
}

.gdew-copied {
	margin-left: 8px;
	color: #00a32a;
}

.gdew-gen-options:not([data-mode=near]) .gdew-only-near,
.gdew-gen-options:not([data-mode=place]):not([data-mode=average]) .gdew-only-place,
.gdew-gen-options:not([data-mode=stations]) .gdew-only-stations,
.gdew-gen-options[data-mode=stations] .gdew-not-stations,
.gdew-gen-options[data-mode=average] .gdew-not-average,
.gdew-gen-options:not([data-colors=custom]) .gdew-only-custom {
	display: none;
}

/* the search (gdew-picker.js) */
.gdew-picker-list {
	position: absolute;
	z-index: 100000;
	left: 0;
	right: 0;
	max-height: 260px;
	margin: 2px 0 0;
	padding: 0;
	overflow-y: auto;
	list-style: none;
	background: #fff;
	border: 1px solid #8c8f94;
	border-radius: 4px;
	box-shadow: 0 4px 12px rgba(0, 0, 0, .12);
}

.gdew-picker-list[hidden] {
	display: none !important;
}

.gdew-picker-list li {
	display: flex;
	justify-content: space-between;
	gap: 8px;
	margin: 0;
	padding: 6px 10px;
	cursor: pointer;
}

.gdew-picker-list li[aria-selected=true],
.gdew-picker-list li:hover {
	background: #f0f6fc;
}

.gdew-picker-type {
	color: #646970;
	font-size: 12px;
	white-space: nowrap;
}

.gdew-picker-empty {
	color: #646970;
	cursor: default !important;
}

/* the widget form (classic or card): only the options of the design and the mode chosen. Without :has(), all show */
.GDEW-form:has(select[id$="-design"] option[value="card"]:checked) .gdew-only-classic,
.GDEW-form:has(select[id$="-design"] option[value="classic"]:checked) .gdew-only-card,
.GDEW-form:has(select[id$="-design"] option[value="card"]:checked):has(select[id$="-mode"] option[value="near"]:checked) .gdew-not-near,
.GDEW-form:has(select[id$="-design"] option[value="card"]:checked):has(select[id$="-mode"] option[value="place"]:checked) .gdew-not-place,
.GDEW-form:has(select[id$="-design"] option[value="card"]:checked):has(select[id$="-mode"] option[value="stations"]:checked) .gdew-not-stations,
.GDEW-form:has(select[id$="-design"] option[value="card"]:checked):has(select[id$="-mode"] option[value="average"]:checked) .gdew-not-average,
.GDEW-form:has(select[id$="-design"] option[value="card"]:checked):has(select[id$="-colors"] option[value="theme"]:checked) .gdew-colors {
	display: none;
}

.GDEW-form .autoComplete_wrapper,
.GDEW-form .form-line {
	position: relative;
}

/* the block (gdew-block.js): results of the search and chosen gas stations in the side panel */
.gdew-block-results {
	display: flex;
	flex-direction: column;
	gap: 2px;
	margin: -8px 0 12px;
}

.gdew-block-results .components-button.gdew-block-result {
	height: auto;
	min-height: 32px;
	padding: 4px 8px;
	justify-content: flex-start;
	text-align: left;
	white-space: normal;
	line-height: 1.3;
}

.gdew-block-empty {
	color: #757575;
}

.gdew-block-chosen {
	margin: 4px 0 8px;
}

.gdew-block-color {
	margin-bottom: 16px;
}
