.cjsc-ticket-dashboard__map-shell {
	display: grid;
	gap: 10px;
}

.cjsc-ticket-dashboard__map-summary {
	align-items: center;
	display: flex;
	font-size: 13px;
	gap: 12px;
	justify-content: flex-end;
}

.cjsc-ticket-dashboard__map-warning {
	background: #fffaeb;
	border: 1px solid #fedf89;
	border-radius: 999px;
	color: #93370d;
	cursor: help;
	font-size: 12px;
	font-weight: 700;
	padding: 5px 9px;
}

.cjsc-ticket-dashboard__map {
	background: #eaf0f6;
	border: 1px solid var(--cjsc-line);
	border-radius: 14px;
	height: clamp(540px, 72vh, 850px);
	overflow: hidden;
}

.cjsc-ticket-dashboard__map-marker {
	align-items: center;
	background: var(--cjsc-accent) !important;
	border: 3px solid #ffffff !important;
	border-radius: 50%;
	box-shadow: 0 4px 12px rgba(15, 23, 42, 0.28);
	color: #ffffff !important;
	cursor: pointer;
	display: flex;
	font: 800 12px/1 system-ui, sans-serif;
	height: 34px;
	justify-content: center;
	padding: 0 !important;
	width: 34px;
}

.cjsc-ticket-dashboard__map-marker > span {
	display: block;
}

.cjsc-ticket-dashboard__map-popup {
	color: var(--cjsc-text);
	display: grid;
	font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	gap: 10px;
	min-width: 280px;
}

.cjsc-ticket-dashboard__map-popup-title {
	font-size: 17px;
	line-height: 1.25;
	padding-right: 30px;
}

.cjsc-ticket-dashboard__map-popup-warning {
	background: #fffaeb;
	border-radius: 8px;
	color: #93370d;
	font-size: 11px;
	line-height: 1.35;
	margin: 0;
	padding: 7px 8px;
}

.cjsc-ticket-dashboard__map-ticket {
	border-top: 1px solid #e4e7ec;
	display: grid;
	column-gap: 12px;
	grid-template-columns: minmax(0, 1fr) auto;
	row-gap: 6px;
	padding-top: 11px;
}

.cjsc-ticket-dashboard__map-ticket-top {
	align-items: center;
	display: flex;
	gap: 12px;
	grid-column: 1 / -1;
	justify-content: space-between;
}

.cjsc-ticket-dashboard__map-ticket-primary {
	grid-column: 1 / -1;
	margin-top: 2px;
}

.cjsc-ticket-dashboard__map-ticket-id {
	font-size: 12px;
	letter-spacing: 0.01em;
}

.cjsc-ticket-dashboard__map-status {
	background: var(--cjsc-accent-soft);
	border-radius: 999px;
	color: var(--cjsc-accent-dark);
	font-size: 11px;
	font-weight: 750;
	line-height: 1.2;
	padding: 4px 7px;
	white-space: nowrap;
}

.cjsc-ticket-dashboard__map-customer {
	font-size: 16px;
	line-height: 1.25;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.cjsc-ticket-dashboard__map-ticket-meta {
	align-items: center;
	color: var(--cjsc-muted);
	display: flex;
	font-size: 13px;
	gap: 9px;
	grid-column: 1;
}

.cjsc-ticket-dashboard__map-urgency {
	background: #10b981;
	border: 0;
	border-radius: 999px;
	box-shadow: 0 1px 3px rgba(15, 23, 42, 0.18);
	display: block;
	flex: 0 0 auto;
	height: 7px;
	width: 34px;
}

.cjsc-ticket-dashboard__map-urgency.urgency-level-2 { background: #3b82f6; }
.cjsc-ticket-dashboard__map-urgency.urgency-level-3 { background: #f59e0b; }
.cjsc-ticket-dashboard__map-urgency.urgency-level-4 { background: #f97316; }
.cjsc-ticket-dashboard__map-urgency.urgency-level-5 { background: #ef4444; }

.cjsc-ticket-dashboard__map-tags {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
	grid-column: 1;
	padding-left: 0;
}

.cjsc-ticket-dashboard__map-tag {
	background: #f8fafc;
	border: 1px solid #d7deea;
	border-radius: 999px;
	color: #475467;
	font-size: 11px;
	font-weight: 700;
	line-height: 1.2;
	max-width: 120px;
	overflow: hidden;
	padding: 3px 6px;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.cjsc-ticket-dashboard__map-tag.has-custom-color {
	background: color-mix(in srgb, var(--tag-color) 9%, #fff);
	border-color: var(--tag-color);
	color: var(--tag-color);
}

.cjsc-ticket-dashboard__map-ticket .cjsc-ticket-dashboard__doc-link {
	align-self: end;
	font-size: 12px;
	grid-column: 2;
	grid-row: 3 / span 2;
	min-height: 32px;
	padding: 6px 10px;
}

.maplibregl-popup-content {
	border-radius: 12px;
	box-shadow: 0 12px 30px rgba(15, 23, 42, 0.18);
	padding: 16px;
}


.cjsc-ticket-dashboard__map-review-button { display: block; margin-top: 6px; padding: 4px 8px; border: 1px solid #b45309; border-radius: 6px; background: #fffbeb; color: #92400e; font-size: 12px; cursor: pointer; }

.cjsc-ticket-dashboard__advanced-options .cjsc-map-link-field { margin: 12px 0; max-width: 100%; }
.cjsc-ticket-dashboard__advanced-options .cjsc-map-link-field small { display: block; margin-top: 6px; font-size: 12px; line-height: 1.45; color: #64748b; font-weight: 400; }

.cjsc-ticket-dashboard__map-review-button { display:inline-flex; align-items:center; justify-content:center; width:32px; height:32px; padding:5px; margin:2px 4px; border:0; background:transparent; color:#ea580c; vertical-align:middle; }
.cjsc-ticket-dashboard__map-review-button:hover { background:#fff7ed; }
.cjsc-map-review { width:min(560px, calc(100vw - 32px)); max-height:85vh; overflow:auto; box-sizing:border-box; border:1px solid #d6dfeb; border-radius:18px; padding:24px; color:#172033; background:white; }
.cjsc-map-review::backdrop { background:rgba(15,23,42,.45); }
.cjsc-map-review h2 { font-size:22px; margin:0 0 16px; }
.cjsc-map-review p { font-size:14px; line-height:1.5; margin:12px 0; overflow-wrap:anywhere; }
.cjsc-map-review button { padding:10px 14px; margin:8px 8px 8px 0; border:1px solid #cbd5e1; border-radius:8px; background:white; color:#334155; cursor:pointer; }
.cjsc-map-review button.is-primary { background:#2563eb; color:white; border-color:#2563eb; }
.cjsc-map-review button:disabled { opacity:.5; cursor:default; }
.cjsc-map-review__candidate { padding:14px; margin:12px 0; border:1px solid #d6dfeb; border-radius:10px; }
.cjsc-map-review__candidate button { display:block; }
.cjsc-map-review input { display:block; box-sizing:border-box; width:100%; padding:10px; margin:8px 0; }

/* Service pins keep MapLibre's positioning transform on the outer button. */
.cjsc-ticket-dashboard__map-marker.cjsc-service-map-pin {
 background: transparent !important; border: 0 !important; border-radius: 0;
 box-shadow: none; width: 36px; height: 44px; overflow: visible;
}
.cjsc-service-map-pin__shape {
 position: absolute; top: 2px; left: 3px; width: 30px; height: 30px;
 box-sizing: border-box; background: var(--pin-fill, #64748b);
 border: 3px solid white; border-radius: 50% 50% 0 50%; transform: rotate(45deg);
 box-shadow: 2px 2px 5px #0f172a55;
}
.cjsc-service-map-pin__shape::after {
 content: ''; position: absolute; width: 8px; height: 8px;
 top: 8px; left: 8px; background: white; border-radius: 50%;
}
.cjsc-service-map-pin__count {
 position: absolute; right: -6px; top: -5px; min-width: 20px; height: 20px;
 padding: 2px; border-radius: 12px; background: #172033; color: white;
 border: 2px solid white; box-sizing: border-box; font: 700 10px/12px system-ui;
}
.cjsc-ticket-dashboard__map-marker.cjsc-service-map-pin:focus-visible {
 outline: 3px solid #172033; outline-offset: 3px; border-radius: 8px;
}
.cjsc-ticket-dashboard__map-popup p.cjsc-ticket-dashboard__map-popup-precision {
 margin: 0 !important; padding: 0 !important; font-size: 12px; line-height: 1.35;
}
