/* Complemento Ubicaciones: selector de ciudad, ventana y aviso fuera de cobertura. */

.mango-location-picker {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 10px 18px;
	border: 1.5px solid currentColor;
	border-radius: 999px;
	background: transparent;
	color: var(--mango-color-primary, #2563eb);
	font: inherit;
	font-weight: 700;
	line-height: 1.2;
	cursor: pointer;
	transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}

.mango-location-picker:hover { background: var(--mango-color-primary, #2563eb); border-color: var(--mango-color-primary, #2563eb); color: #fff; }
.mango-location-picker-icon { display: inline-flex; }
.mango-location-picker-icon svg { width: 1.1em; height: 1.1em; fill: none; stroke: currentColor; }
.mango-location-picker-chevron { width: 7px; height: 7px; border: solid currentColor; border-width: 0 2px 2px 0; transform: rotate(45deg) translateY(-2px); margin-left: 2px; }

.mango-location-modal {
	width: min(520px, calc(100vw - 24px));
	max-height: calc(100vh - 32px);
	padding: 0;
	border: 0;
	border-radius: 24px;
	box-shadow: 0 30px 80px rgba(15, 23, 42, .3);
	color: #0f172a;
}

/* La ventana puede ser alta (mapa): se desplaza dentro. */
.mango-location-modal { overflow-y: auto; }
.mango-location-modal::backdrop { background: rgba(15, 23, 42, .55); backdrop-filter: blur(2px); }
.mango-location-box { position: relative; padding: 32px 28px 28px; text-align: center; }
.mango-location-box h2 { margin: 12px 0 6px; font-size: 22px; line-height: 1.25; }
.mango-location-intro { margin: 0 0 20px; color: #64748b; font-size: 15px; }

.mango-location-close {
	position: absolute;
	top: 14px;
	right: 14px;
	width: 36px;
	height: 36px;
	border: 0;
	border-radius: 50%;
	background: #f1f5f9;
	color: #0f172a;
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
}

.mango-location-pin {
	display: inline-block;
	width: 56px;
	height: 56px;
	border-radius: 50%;
	background: var(--mango-color-primary, #2563eb) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 22s7-6.2 7-12a7 7 0 1 0-14 0c0 5.8 7 12 7 12z'/%3E%3Ccircle cx='12' cy='10' r='2.5'/%3E%3C/svg%3E") center / 26px no-repeat;
}

.mango-location-gps {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	width: 100%;
	padding: 13px 18px;
	border: 1.5px solid var(--mango-color-primary, #2563eb);
	border-radius: 999px;
	background: #f5f8ff;
	color: var(--mango-color-primary, #2563eb);
	font: inherit;
	font-weight: 800;
	cursor: pointer;
}

.mango-location-gps:hover { background: var(--mango-color-primary, #2563eb); color: #fff; }
.mango-location-gps-icon { width: 18px; height: 18px; border: 2px solid currentColor; border-radius: 50%; position: relative; }
.mango-location-gps-icon::after { content: ""; position: absolute; inset: 3px; border-radius: 50%; background: currentColor; }
.mango-location-gps.is-loading .mango-location-gps-icon { animation: mango-location-pulse 1s ease-in-out infinite; }

@keyframes mango-location-pulse { 50% { transform: scale(.7); opacity: .5; } }

.mango-location-or { display: flex; align-items: center; gap: 12px; margin: 16px 0; color: #94a3b8; font-size: 13px; }
.mango-location-or::before, .mango-location-or::after { content: ""; flex: 1; height: 1px; background: #e2e8f0; }

.mango-location-search { margin-bottom: 12px; text-align: left; }
.mango-location-search gmp-place-autocomplete,
.mango-location-search-input { width: 100%; }
.mango-location-map { height: 200px; margin-bottom: 12px; border-radius: 16px; overflow: hidden; background: #eef2f7; }

.mango-location-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; text-align: left; }
.mango-location-fields .is-wide { grid-column: 1 / -1; }
.mango-location-fields label { display: flex; flex-direction: column; gap: 5px; }
.mango-location-fields span { color: #475569; font-size: 13px; font-weight: 600; }

.mango-location-fields input,
.mango-location-fields select,
.mango-location-search-input {
	width: 100%;
	min-height: 46px;
	padding: 10px 14px;
	border: 1.5px solid #e2e8f0;
	border-radius: 12px;
	background: #fff;
	color: #0f172a;
	font: inherit;
	font-size: 15px;
}

.mango-location-fields input:focus,
.mango-location-fields select:focus,
.mango-location-search-input:focus { outline: none; border-color: var(--mango-color-primary, #2563eb); box-shadow: 0 0 0 3px rgba(37, 99, 235, .15); }

.mango-location-status {
	margin-top: 14px;
	padding: 12px 14px;
	border-radius: 14px;
	background: #f1f5f9;
	color: #334155;
	font-size: 14px;
	line-height: 1.5;
	text-align: left;
}

.mango-location-status.is-ok { background: #ecfdf5; color: #047857; font-weight: 600; }
.mango-location-status.is-warn { background: #fff7ed; color: #9a3412; }

.mango-location-foot { margin: 14px 0 0; color: #64748b; font-size: 13px; line-height: 1.6; }

.mango-location-other {
	padding: 0;
	border: 0;
	background: none;
	color: var(--mango-color-primary, #2563eb);
	font: inherit;
	font-weight: 700;
	text-decoration: underline;
	cursor: pointer;
}

@media (max-width: 480px) {
	.mango-location-box { padding: 28px 18px 20px; }
	.mango-location-fields { grid-template-columns: minmax(0, 1fr); }
}

.mango-location-save {
	width: 100%;
	margin-top: 18px;
	padding: 14px 20px;
	border: 0;
	border-radius: 999px;
	background: var(--mango-color-primary, #2563eb);
	color: #fff;
	font: inherit;
	font-weight: 800;
	cursor: pointer;
}

.mango-location-save:disabled { opacity: .5; cursor: not-allowed; }

/* Botón de compra sustituido por el aviso (fuera de cobertura). */
.mango-purchase-blocked {
	display: flex;
	gap: 12px;
	align-items: flex-start;
	padding: 16px 18px;
	border-radius: 16px;
	background: #fff7ed;
	color: #9a3412;
	font-size: 15px;
	line-height: 1.5;
}

.mango-purchase-blocked button {
	flex: 0 0 auto;
	margin-left: auto;
	padding: 8px 14px;
	border: 1.5px solid currentColor;
	border-radius: 999px;
	background: transparent;
	color: inherit;
	font: inherit;
	font-size: 13px;
	font-weight: 700;
	cursor: pointer;
	white-space: nowrap;
}
