/* MAP */
.mapContainer {
	display: flex;
	position: relative;
	flex: 1;
	width: 100%;
	/* box-shadow: inset 0 4px 6px rgba(99, 99, 99, 0.2); */
}
.sceneViewDiv,
.mapViewDiv {
	margin: 0;
	padding: 0;
	width: 100%;
	height: 100%;
	position: absolute;
	transition: 2000ms cubic-bezier(0.23, 1, 0.32, 1) 0ms opacity;
}

.sceneViewDiv.switch-on,
.mapViewDiv.switch-on {
	opacity: 1;
	z-index: 2;
}

.sceneViewDiv.switch-off,
.mapViewDiv.switch-off {
	opacity: 0;
	z-index: 1;
}

.esri-ui-corner {
	z-index: 5;
}

/* Esri Black Outline View Removed */
.esri-view .esri-view-surface--inset-outline:focus::after,
.esri-view-surface::after {
	outline: none !important;
	border: none !important;
}
.esri-popup__main-container {
	--calcite-color-brand: var(--app-secondary-color);
	--esri-view-outline-color: var(--app-secondary-color);
	border-radius: 5px;
	box-shadow: rgba(0, 0, 0, 0.2) 0px 8px 24px;

	& .esri-widget__table tr:nth-child(odd) {
		background-color: var(--background-color);
	}

	& .esri-widget__table tr:nth-child(2n) {
		background-color: var(--background-highlight-color);
	}
	& .esri-feature__content-element {
		background-color: var(--gray-tertiary);
		border-radius: 3px;
		margin-bottom: 10px;
		padding: 15px;
	}

	& .esri-widget__heading.esri-feature-element-info__title {
		color: var(--app-font-color);
		font-size: 14px;
		font-weight: 500;
		margin-bottom: 0.5rem;
	}

	& .customContent {
		& .heading {
			text-align: start;
			background-color: var(--gray-tertiary);
			font-size: 14px;
			font-weight: 500;
			margin-bottom: 4px;
		}

		& .linkList {
			list-style-type: none;
			margin: 0px;
			background-color: var(--background-color);
			padding: 8px;
			line-height: 1.4rem;

			& li > a:hover {
				color: var(--app-primary-color);
			}
		}

		& h5 {
			margin-top: 0;
			margin-bottom: 0.5rem;
		}
	}

	& .ownerTbl {
		width: 100%;
		border-collapse: collapse;
		color: var(--app-font-color);

		& tr {
			background-color: var(--background-color);
			border-top: 1px solid var(--gray-tertiary);
		}

		& th {
			text-align: start;
			background-color: var(--gray-tertiary);
			font-size: 14px;
			font-weight: 500;
			padding-bottom: 0.5rem;
		}

		& td {
			font-size: 0.75rem;
			vertical-align: top;
			padding: 8px 12px;
		}

		& .col1 {
			width: 90px;
			padding-right: 0px;
		}

		& .col2 {
			width: auto;
			padding-left: 0px;
			padding-right: 0px;
		}

		& .col3 {
			width: 50px;
			padding-left: 0px;
			text-align: right;
		}
	}

	& .ownerDate {
		font-size: 0.7rem;
		font-style: italic;
		margin-top: 0.2rem;
		float: right;
	}
}

/* No display for related Tables with no match */
.esri-feature__content-element:has(calcite-notice) {
	display: none;
}

/* No display for empty content sections, e.g. no owners found in getOwner content */
.esri-feature__content-element:has(> .esri-feature-content:empty) {
	display: none;
}

/* Draggable Popup Styles */

/* Mobile touch improvements */
@media (max-width: 768px) {
	.esri-popup__main-container.esri-popup-drag-mode {
		border-width: 3px !important;
		box-shadow: 0 6px 18px rgba(0, 122, 194, 0.4) !important;
	}
}

/* Popup interaction states - shared styles */
.esri-popup__main-container.esri-popup--dragging,
.esri-popup__main-container.esri-popup--resizing {
	opacity: 0.8 !important;
}

.esri-popup__main-container.esri-popup--dragging {
	cursor: grabbing !important;
}

/* Resize Handle Styles */
.popup-resize-handle {
	cursor: se-resize;
	position: absolute;
	bottom: 0;
	right: 0;
	width: 24px;
	height: 24px;
	background: transparent;
	z-index: 10000;
	opacity: 1;
	transition: opacity 0.2s ease;
}

.popup-resize-handle .resize-indicator {
	position: absolute;
	bottom: 4px;
	right: 4px;
	width: 16px;
	height: 16px;
	background: repeating-linear-gradient(
		-45deg,
		transparent,
		transparent 2px,
		rgba(128, 128, 128, 0.6) 2px,
		rgba(128, 128, 128, 0.6) 4px
	);
	border-radius: 0 0 2px 0;
}

/* Show resize handle on popup hover */
.esri-popup__main-container:hover .popup-resize-handle,
.popup-resize-handle:hover {
	opacity: 0.8 !important;
}

/* Mobile adjustments */
@media (max-width: 768px) {
	.popup-resize-handle {
		opacity: 0.3;
		width: 30px;
		height: 30px;
	}
}

.esri-ui .esri-popup .esri-widget__heading {
	cursor: grab;
	user-select: none;
}

.esri-ui .esri-popup--is-docked .esri-widget__heading {
	cursor: default;
}

.esri-ui .esri-popup--dragging .esri-widget__heading {
	cursor: grabbing;
}
