/* Listing page */

.map-container {
	border-radius: 12px;
	background-color: var(--edirt-off-white);
	overflow: hidden;
	position: relative;
}

.map-size-button {
	position: absolute;
	top: 8px;
	right: 8px;
	width: 40px !important;
	height: 40px !important;
	z-index: 10;
	padding: 10px !important;
	display: none; /* Hidden for now */
}

.map-edit-button {
	position: absolute;
	top: 8px;
	right: 8px;
	z-index: 10;
}

.map-container .coordinates {
	position: absolute;
	left: 4px;
	bottom: 4px;
	right: 4px;
	z-index: 10;
	background-color: var(--edirt-white);
	border-radius: 8px;
	padding: 16px;
}

.map-container .coordinates span {
	color: var(--edirt-white);
	padding-left: 12px;
	padding-right: 12px;
	font-size: 12px;
}

#map {
	width: 100%;
	height: calc(100dvh - 200px);
}

#small-map {
	width: 100%;
	aspect-ratio: 408 / 422;
}

#map .map-pin {
	cursor: pointer;
}

#small-map .mapboxgl-ctrl-scale {
	margin: 0;
	position: absolute;
	left: 4px;
	bottom: 150px;
}

.summary-location #small-map {
	width: 100%;
	aspect-ratio: 520 / 170;
}

#mini-card-holder {
	position: absolute;
	bottom: 16px;
	left: 16px;
	right: 16px;
}

@media screen and (max-width: 1024px) {
	#small-map {
		aspect-ratio: auto;
		height: 400px;
	}

	#desktop-overview.overview-top {
		flex-direction: column;
		gap: 16px;
	}

	#desktop-overview .overview-top-left {
		display: flex;
		position: relative;
		justify-content: center !important;
		align-items: center;
		width: 100%;
	}

	#desktop-overview .overview-top-left a {
		position: absolute;
		left: 0;
	}

	#mobile-overview .overview-top-left {
		display: flex;
		position: relative;
		justify-content: center !important;
		align-items: center;
		width: 100%;
	}

	#mobile-overview .overview-top-left button {
		position: absolute;
		left: 0;
		top: -2.5px;
	}
}

@media screen and (max-width: 600px) {
	#desktop-overview .overview-top-right {
		width: 100%;
	}
}

@media screen and (max-width: 1024px) {
	#map {
		height: calc(100dvw / 3);
	}

	.col-md-4 .map-container {
		margin-top: 16px;
	}

	.soil-profiles-map {
		order: 1;
		margin-bottom: 32px;
	}

	.soil-profiles {
		order: 2;
	}
}

/* Status cards */

.status-cards {
	display: grid;
	gap: 4px;
	grid-template-columns: repeat(4, 1fr);
}

.status-card {
	display: flex;
	flex-direction: column;
	background-color: var(--edirt-white);
	padding: 6px;
	border-radius: 8px;
}

.status-card.inprogress,
.status-card.submitted,
.status-card.approved,
.status-card.rejected {
	cursor: pointer;
}

/* In Progress */
.status-card.inprogress .status-count,
.soil-profile.inprogress .status-name {
	color: var(--edirt-info-blue);
}

.status-card.inprogress .status-bar,
.soil-profile.inprogress .status-bar {
	background: var(--edirt-info-blue);
}

/* In Progress - Selected */
.status-card.inprogress.selected
{
	background: var(--edirt-info-blue);
}

.status-card.inprogress.selected .status-count,
.status-card.inprogress.selected .status-name {
	color: var(--edirt-white);
}

.status-card.inprogress.selected .status-bar
{
	background: var(--edirt-blue-3);
}

/* Submitted */
.status-card.submitted .status-count,
.soil-profile.submitted .status-name {
	color: var(--edirt-yellow-1);
}

.status-card.submitted .status-bar,
.soil-profile.submitted .status-bar {
	background-color: var(--edirt-yellow-2);
}

/* Submitted - Selected */
.status-card.submitted.selected
{
	background-color: var(--edirt-yellow-2);
}

.status-card.submitted.selected .status-count,
.status-card.submitted.selected .status-name {
	color: var(--edirt-grey-1);
}

.status-card.submitted.selected .status-bar
{
	background: var(--edirt-yellow-3);
}

/* Approved */
.status-card.approved .status-count,
.soil-profile.approved .status-name {
	color: var(--edirt-success-green);
}

.status-card.approved .status-bar,
.soil-profile.approved .status-bar {
	background-color: var(--edirt-success-green);
}

/* Approved - Selected */
.status-card.approved.selected
{
	background-color: var(--edirt-success-green);
}

.status-card.approved.selected .status-count,
.status-card.approved.selected .status-name {
	color: var(--edirt-white);
}

.status-card.approved.selected .status-bar
{
	background: var(--edirt-green-3);
}

/* Rejected */
.status-card.rejected .status-count,
.soil-profile.rejected .status-name {
	color: var(--edirt-error-red);
}

.status-card.rejected .status-bar,
.soil-profile.rejected .status-bar {
	background-color: var(--edirt-error-red);
}

/* Rejected - Selected */
.status-card.rejected.selected
{
	background-color: var(--edirt-error-red);
}

.status-card.rejected.selected .status-count,
.status-card.rejected.selected .status-name {
	color: var(--edirt-white);
}

.status-card.rejected.selected .status-bar
{
	background: var(--edirt-red-3);
}

.status-count {
	color: var(--edirt-grey-3);
	font-size: 22px;
	line-height: 30px;
}

.status-name {
	color: var(--edirt-grey-1);
	font-size: 10px;
	line-height: 16px;
}

.status-bar {
	height: 4px;
	width: 100%;
	background-color: var(--edirt-grey-3);
	border-radius: 6px;
	margin-top: 8px;
}

.status-bar.vertical {
	height: auto;
	width: 4px;
	margin-right: 12px;
	margin-top: 0;
}

/* List */

.soil-profile-container {
	background-color: var(--edirt-white);
	border: 1px solid var(--edirt-grey-3);
	border-radius: 8px;
	overflow: hidden;
}

.soil-profile {
	padding: 12px;
	border-bottom: 1px solid var(--edirt-grey-3);
	width: 100%;
	cursor: pointer;
}

.soil-profile:hover {
	background-color: var(--edirt-slightly-off-white);
}

.soil-profile-container .soil-profile-inner-container:last-child .soil-profile {
	border-bottom: none;
}

.soil-profile .status-name {
	font-weight: 400;
	font-size: 10px;
	line-height: 16px;
}

.badge {
	padding-left: 10px;
	padding-right: 10px;
	border-radius: 12px;
	background-color: var(--edirt-grey-1);
	color: var(--edirt-white);
}

.badge.inprogress {
	background-color: var(--edirt-blue-1);
}

.badge.submitted {
	background-color: var(--edirt-yellow-2);
	color: var(--edirt-grey-1);
}

.badge.approved {
	background-color: var(--edirt-success-green);
}

.badge.rejected {
	background-color: var(--edirt-error-red);
}

/* List - survey selector */

.survey-selector select {
	-webkit-appearance: none;
	-moz-appearance: none;
	appearance: none;
	font-weight: 700;
	font-size: 12px;
	line-height: 18px;
	color: var(--edirt-blue-1);
	background-image: url('data:image/svg+xml;utf8,<svg width="11" height="6" viewBox="0 0 11 6" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M0.75 0.75L5.25 5.25L9.75 0.75" stroke="%23002664" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>');
	background-repeat: no-repeat;
	background-position: right 5px center;
	background-size: 11px 6px;
	background-color: transparent;
	border: none;
	cursor: pointer;
	padding-left: 0;
}

.survey-selector select:focus {
	outline: none;
}

/* View - page padding and tint */

.view-page.page-full-screen .main-body {
	padding-top: 0;
}

.view-page.page-full-screen.admin-view-mode {
	padding-top: 26px;
}

.page-full-screen.sample-page.admin-view-mode {
	padding-top: 26px;
}

.admin-view-mode-header {
	position: absolute;
	top: -26px;
	width: 100vw;
	display: flex;
	flex-direction: row;
	color: var(--edirt-white);
	justify-content: center;
	align-items: start;
	gap: 10px;
	background-color: var(--edirt-grey-1);
	height: 40px;
	z-index: -1;
	padding-top: 2px;
}

.form-page.admin-view-mode .admin-view-mode-header {
	z-index: 55;
	top: 0;
	height: 26px;
	position: fixed;
}

.form-page.admin-view-mode .page-buttons-wrapper {
	top: 26px;
}

.form-page.admin-view-mode .main-content-narrow {
	padding-top: 26px;
}

.page-inprogress .main-white-card {
	box-shadow: 0 -14px 0 0 var(--edirt-info-blue);
	margin-top: 14px;
}

.page-submitted .main-white-card {
	box-shadow: 0 -14px 0 0 var(--edirt-yellow-2);
	margin-top: 14px;
}

.page-approved .main-white-card {
	box-shadow: 0 -14px 0 0 var(--edirt-success-green);
	margin-top: 14px;
}

.page-rejected .main-white-card {
	box-shadow: 0 -14px 0 0 var(--edirt-error-red);
	margin-top: 14px;
}

/* View - tabs */

.view-tab-items {
	display: flex;
	justify-content: start;
	align-items: center;
	padding: 0 24px;
	border-bottom: 1px solid var(--edirt-grey-3);
}

.view-tab-item {
	padding: 12px 16px;
	font-weight: 700;
	color: var(--edirt-blue-1);
	cursor: pointer;
	font-size: 16px;
}

.view-tab-item-selected {
	border-bottom: 2px solid var(--edirt-blue-2);
	padding-bottom: 10px;
}

.view-tab-item-invalid {
	display: flex;
	gap: 6px;
}

.view-tab-item:not(.view-tab-item-invalid) .view-tab-item-invalid-icon {
	display: none;
}

.view-tab {
	display: none;
	padding: 38px 24px 24px;
}

.view-tab-selected {
	display: block;
}

.view-tab-title {
	font-weight: 700;
	font-size: 22px;
	line-height: 30px;
	color: var(--edirt-grey-1);
}

@media screen and (max-width: 600px) {
	.view-tab-items {
		padding: 0;
		justify-content: center;
	}

	.view-tab-item {
		font-size: 12px;
	}

	#debug-tab-item {
		display: none;
	}
}

/* View - columns */

.view-columns {
	display: flex;
	justify-content: start;
	align-items: start;
	gap: 24px;
}

.view-column-two-thirds {
	flex-basis: calc(66.6% - 12px);
}

.view-column-one-third {
	flex-basis: calc(33.3% - 12px);
}

.view-column-left {
	flex-basis: 300px;
	min-width: 300px;
	align-self: start;
}

.view-column-grow {
	flex-grow: 1;
}

.view-site-form-column {
	max-width: 800px; 
}

.view-layers-form-column {
	max-width: 800px;
}

@media screen and (min-width: 601px) and (max-width: 1024px) {
	#core-tab .view-column-two-thirds,
	#core-tab .view-column-one-third {
		flex-basis: auto;
		width: 50%;
		margin-left: 0 !important;
		margin-right: 0 !important;
	}

	#core-tab .view-columns {
		gap: 0 !important;
	}

	#core-tab .view-column-two-thirds {
		border-right: 1px solid var(--edirt-grey-3);
		padding-right: 24px;
	}

	#core-tab .view-column-one-third {
		padding-left: 24px;
	}
}

@media screen and (max-width: 600px) {
	#core-tab .view-columns {
		flex-direction: column;
	}

	.view-column-two-thirds,
	.view-column-one-third {
		flex-basis: auto;
		width: 100%;
		margin-left: 0 !important;
		margin-right: 0 !important;
	}
}

@media screen and (max-width: 1024px) {
	#site-tab .view-column-left {
		width: 33%;
		flex-basis: auto;
	}

	#site-tab .view-column-grow {
		width: 66%;
		flex-basis: auto;
	}
}

@media screen and (max-width: 600px) {
	#site-tab .view-columns {
		flex-direction: column;
	}

	#site-tab .view-column-left {
		width: 100%;
		flex-basis: auto;
		min-width: auto;
	}

	#site-tab .view-column-grow {
		width: 100%;
		flex-basis: auto;
	}

	.view-layers-form-column {
		max-width: 100%;
	}

	#layers-tab .view-columns {
		flex-direction: column;
	}

	#layers-tab .view-column-left {
		width: 100%;
		flex-basis: auto;
		min-width: auto;
	}

	#layers-tab .view-column-grow {
		width: 100%;
		flex-basis: auto;
	}

	.view-layers-form-column {
		max-width: 100%;
	}
}

@media screen and (min-width: 601px) and (max-width: 1024px) {
	#layers-tab .view-column-left {
		width: 50%;
		flex-basis: auto;
	}

	#layers-tab .view-column-grow {
		width: 66%;
		flex-basis: auto;
		min-width: auto;
	}
}

/* View - core */

#core-tab .view-column-two-thirds {
	margin-left: 40px;
	margin-right: 40px;
}

.view-core-survey-name {
	font-size: 24px;
	line-height: 32px;
	font-weight: 700;
	color: var(--edirt-grey-1);
}

.view-core-summary {
	padding: 0 24px;
}

.view-core-template-display {
	border: 2px solid var(--edirt-grey-4);
	border-radius: 8px;
	padding: 12px 16px;
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 16px;
}

.view-core-areas {
	border: 1px solid var(--edirt-grey-3);
	border-radius: 8px;
}

.view-core-area {
	border-bottom: 1px solid var(--edirt-grey-3);
	padding: 8px 24px;
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.view-core-area:last-child {
	border-bottom: none;
}

/* TODO : This needs HTML I think */
.rejected-message-container {
	display: flex;
	flex-direction: row;
	gap: 16px;
	align-items: start;
	background-color: var(--edirt-red-4);
	padding: 16px;
	width: 100%;
	border-radius: 4px;
	margin-bottom: 12px;
	margin-top: 12px;
}

/* View - HTMX transitions */

.htmx-swapping {
	opacity: 0;
	transition: opacity 0.2s ease-in;
}

.htmx-added {
	opacity: 0;
}

.htmx-settling {
	opacity: 1;
	transition: opacity 0.3s ease-in;
}

.htmx-indicator {
	display: none;
}

.htmx-request .htmx-indicator {
	display: block;
}

/* View - form elements */

.main-content-narrow.form-container {
	padding-top: 0;
}

.view-items-empty {
	padding: 24px;
	display: flex;
	justify-content: center;
	align-items: center;
	background-color: var(--edirt-off-white);
	border: 1px solid var(--edirt-grey-3);
	border-radius: 8px;
	font-size: 12px;
}

.form-container-error-anchor {
	position: fixed;
	bottom: 0;
	width: 800px;
}

.form-container-error-anchor .modal-panel-error {
	width: 100%;
	bottom: 16px;
}

/* View - layers */

.view-layer-heading {
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.view-layer-delete {
	cursor: pointer;
	padding: 2px;
}

.depth-selection {
	display: flex;
	align-items: center;
	gap: 16px;
}

.depth-container {
	flex-basis: 50%;
	flex-grow: 1;
	background-color: var(--edirt-blue-2);
	padding: 6px 14px;
	border-radius: 8px;
	cursor: pointer;
}

.depth-container .depth-type {
	font-size: 12px;
	color: var(--edirt-white);
}

.depth-container .depth-value {
	font-size: 14px;
	font-weight: 700;
	color: var(--edirt-white);
}

.depth-container.disabled {
	background-color: var(--edirt-grey-2);
	cursor: auto;
}



.overview-content {
}

.overview-top {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 16px 24px 0;
}

.overview-top-left {
	display: flex;
	justify-content: start;
	align-items: center;
	gap: 16px;
}

.page-alert-container {
	padding: 16px 24px 0;
}

.page-alert-container .alert .icon,
#diagnostic-info-btn {
	cursor: pointer;
}

.overview-status-label {
	padding: 1px 8px;
	border-radius: 16px;
	font-size: 12px;
}

.page-inprogress .overview-status-label {
	border: 1px solid var(--edirt-info-blue);
	color: var(--edirt-info-blue);
	background: var(--edirt-info-blue-bg);
}

.page-submitted .overview-status-label {
	border: 1px solid var(--edirt-yellow-2);
	color: var(--edirt-yellow-1);
	background: var(--edirt-yellow-4);
}

.page-approved .overview-status-label {
	border: 1px solid var(--edirt-success-green);
	color: var(--edirt-success-green);
	background: var(--edirt-success-green-bg);
}

.page-rejected .overview-status-label {
	border: 1px solid var(--edirt-error-red);
	color: var(--edirt-error-red);
	background: var(--edirt-error-red-bg);
}

.overview-top-right {
	display: flex;
	justify-content: end;
	align-items: center;
	gap: 16px;
}

.overview-summary {
	padding: 24px 24px;
}

.overview-summary-items {
	display: flex;
	justify-content: start;
	align-items: center;
	gap: 16px;
}

.overview-summary-item {
	flex-basis: calc(25% - 12px);
	display: flex;
	justify-content: start;
	align-items: center;
	gap: 8px;
}

.overview-add-sample-button,
.overview-add-image-button {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 10px;
	border: 2px solid var(--edirt-blue-1);
	border-radius: 4px;
	color: var(--edirt-blue-1);
	font-weight: 600;
	cursor: pointer;
	background: var(--edirt-off-white);
}

/* Overview - samples */

.overview-samples-list-headings {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 12px;
}

.overview-samples-list {
	border: 1px solid var(--edirt-grey-3);
	border-radius: 8px;
	overflow: hidden;
}

.overview-sample {
	padding: 12px 16px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	color: var(--edirt-grey-1);
	font-weight: 400;
	border-bottom: 1px solid var(--edirt-grey-3);
	background-color: var(--edirt-white);
	transition: background-color 0.2s ease-in-out;
}

.overview-sample:hover {
	background-color: var(--edirt-info-blue-bg);
}

.overview-sample:last-child {
	border-bottom: none;
}

.overview-sample-title {
	color: var(--edirt-blue-1);
	font-weight: 600;
	font-size: 16px;
}

.overview-sample-right {
	display: flex;
	justify-content: flex-end;
	align-items: center;
	gap: 24px;
}

.overview-sample-depth {
	display: flex;
	align-items: center;
	gap: 8px;
}

/* View - image form */

.form-field-image-box {
	border: 1px solid var(--edirt-grey-3);
	border-radius: 8px;
	padding: 8px;
}

.image-field-invalid .form-field-image-box  {
	border-color: var(--edirt-error-red);
	box-shadow: 0 0 0 4px var(--edirt-error-red-bg);
}

.image-field-invalid .form-field-invalid-message {
	display: block;
}

.form-field-image-message {
	height: 120px;
	display: flex;
	justify-content: center;
	align-items: center;
	font-size: 12px;
	color: var(--edirt-grey-2);
}

.form-field-image-preview {
	display: flex;
	justify-content: center;
	align-items: center;
	min-height: 120px;
}

.form-field-image-preview img {
	max-width: 100%;
	max-height: 320px;
	border-radius: 4px;
}

.view-profile-images {
	display: grid;
	grid-template-columns: repeat(auto-fill, calc(20% - 20px));
	gap: 24px;
	justify-content: start;
}

.view-profile-image {
	width: 100%;
	aspect-ratio: 290 / 286;
	overflow: hidden;
	cursor: pointer;
}

.view-profile-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: 8px;
}

.view-profile-image-template {
	display: none;
}

/* Overview - image overlay */

#profile-image-overlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-color: rgba(0, 0, 0);
	z-index: 101;
	transition: opacity 0.2s ease-in-out;
	opacity: 0;
}

#modal-container.open #profile-image-overlay {
	opacity: 1;
}

.profile-image-overlay-button {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 8px;
	width: auto;
	height: 40px;
	border: 2px solid var(--edirt-white);
	border-radius: 4px;
	color: var(--edirt-white);
	cursor: pointer;
	padding: 0 16px;
}

.profile-image-overlay-close {
	position: absolute;
	top: 16px;
	right: 16px;
}

.profile-image-overlay-image {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, calc(-50% - 50px));
}

.profile-image-overlay-image img {
	max-width: 90vh;
	max-height: 70vh;
	border-radius: 8px;
	display: block;
}

.profile-image-overlay-prev {
	position: absolute;
	top: 40%;
	left: 16px;
	padding: 0 8px;
}

.profile-image-overlay-next {
	position: absolute;
	top: 40%;
	right: 16px;
	padding: 0 8px;
}

.profile-image-overlay-prev.profile-image-overlay-disabled,
.profile-image-overlay-next.profile-image-overlay-disabled
{
	opacity: 0.5;
	cursor: auto;
}

.profile-image-overlay-info {
	position: absolute;
	left: 16px;
	right: 16px;
	bottom: 16px;
	width: calc(100% - 32px);
	border: 1px solid var(--edirt-grey-2);
	border-radius: 8px;
	padding: 16px;
	color: var(--edirt-grey-3);
	display: flex;
	justify-content: space-between;
	align-items: start;
}

.profile-image-overlay-info-title {
	color: var(--edirt-white);
	font-size: 16px;
}

.profile-image-overlay-info-date {
	font-size: 12px;
}

.profile-image-overlay-info-right {
	display: flex;
	justify-content: flex-end;
	align-items: center;
	gap: 16px;
}

/* View - Debug */

.debug-validation-list {
	border: 1px solid var(--edirt-grey-3);
	border-radius: 8px;
}

.debug-validation-item {
	padding: 8px;
	border-bottom: 1px solid var(--edirt-grey-3);
}

.debug-validation-item:last-child {
	border-bottom: none;
}

.debug-validation-item-template {
	display: none;
}

.debug-data-json-view {
	background-color: var(--edirt-off-white);
	border-radius: 8px;
	padding: 8px;
	white-space: pre;
	font-size: 10px;
	line-height: 14px;
	font-family: monospace;
}

/* Form page */

.form-page-container .form-fragment-title {
	display: none;
}

/* Layers page */

.layers-page-top {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 16px 24px 0;
}

.layers-page-columns {
	padding: 24px;
	display: flex;
	align-items: start;
	justify-content: start;
	gap: 24px;
}

.layers-page-layers {
	flex-basis: calc(33.3% - 12px);
}

.layers-page-sections {
	flex-basis: calc(66.6% - 12px);
}

/* Depth editor */



/* Sections list */

.sections-list {
	border: 1px solid var(--edirt-grey-3);
	border-radius: 8px;
	overflow: hidden;
}

.sections-list-item {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 10px 16px;
	gap: 10px;
}

.sections-list-item:not(.display-none) {
	border-bottom: none;
}

.sections-list-item:not(.display-none):has(~ .sections-list-item:not(.display-none)) {
	border-bottom: 1px solid var(--edirt-grey-3);
}

.sections-list-item.selected {
	background-color: var(--edirt-blue-1);
}

.sections-list-item.selected .sections-list-label {
	color: var(--edirt-white); !Important;
}

.sections-list-item:first-child {
	border-top: none;
}

.sections-list-label {
	flex-grow: 1;
}

.sections-list-icons {
	display: flex;
	align-items: center;
	gap: 6px;
}

.sections-list-icon {
	justify-content: center;
	align-items: center;
	min-width: 20px;
	height: 20px;
	display: none;
}

.sections-list-icon.sections-list-invalid {
	position: relative;
}

.sections-list-icon.sections-list-invalid .icon {
	z-index: 2;
}

.sections-list-icon.sections-list-invalid .sections-list-invalid-backing {
	position: absolute;
	top: 2px;
	left: 2px;
	width: 16px;
	height: 16px;
	border-radius: 50%;
	background-color: var(--edirt-white);
}

.sections-list-icon.sections-list-value-count {
	background: var(--edirt-info-blue);
	color: var(--edirt-white);
	border-radius: 10px;
	font-size: 12px;
	padding: 0 6px;
}

.sections-list-item .sections-list-icon.sections-list-chevron {
	display: flex;
}

.sections-list-item.section-has-values .sections-list-icon.sections-list-value-count,
.sections-list-item.section-invalid .sections-list-icon.sections-list-value-count{
	display: flex;
}

.sections-list-item.section-invalid .sections-list-icon.sections-list-invalid {
	display: flex;
}

.sections-list-item.selected .sections-list-icon.sections-list-invalid .icon {
	background: var(--edirt-red-2); !Important;
}

.sections-list-item.selected .sections-list-icon.sections-list-value-count  {
	background: var(--edirt-off-white);
	color: var(--edirt-info-blue);
}

.sections-list-item.selected .sections-list-icon.sections-list-chevron .icon {
	background: var(--edirt-white); !Important;
}

/* Layers box */

.layers-box {
	border: 1px solid var(--edirt-grey-3);
	border-radius: 8px;
	overflow: hidden;
}

.layers-box-layer {
	padding: 10px 16px;
	display: flex;
	justify-content: space-between;
	align-items: center;
	border-bottom: 1px solid var(--edirt-grey-3);
	gap: 10px;
	cursor: pointer;
}

.layers-box-layer-right {
	display: flex;
	gap: 6px;
	align-items: center;
}

.layers-box-layer-right .layers-box-layer-value-count {
	display: flex;
	background: var(--edirt-info-blue);
	color: var(--edirt-white);
	border-radius: 10px;
	font-size: 12px;
	height: 20px;
	width: 20px;
	justify-content: center;
	align-items: center;
}

.layers-box-layer-depths-container {
	display: flex;
	flex-direction: column;
	margin-left: 6px;
	align-items: end;
	justify-content: center;
}

.layer-box-depths {
	display: flex;
	flex-direction: row;
	gap: 6px;
	align-items: center;
	justify-content: center;
}

.layers-box-layer.layers-box-layer-current {
	background-color: var(--edirt-blue-1);
}

.layers-box-layer-current .layers-box-layer-label {
	color: var(--edirt-white);
}

.layers-box-layer-current .layers-box-layer-depths {
	color: var(--edirt-grey-3);
}

.layers-box-layer-current .layer-box-depths .icon {
	background: var(--edirt-grey-3);
}

.layers-box-layer:last-child {
	border-bottom: none;
}

.layers-box-layer.layers-box-disabled,
.layers-box-layer.layers-box-add {
	justify-content: start;
}

.layers-box-add.layers-box-disabled .icon {
	background: var(--edirt-grey-3);
}

.layers-box-add.layers-box-disabled .layers-box-add-label {
	color: var(--edirt-grey-3);
}

.layers-box-add {
	cursor: pointer;
}

.layers-box-add.layers-box-disabled {
	cursor: default;
}

.layers-box-add-template, .layers-box-layer-template {
	display: none;
}

.layers-box-layer:not(.layers-box-layer-invalid) .layers-box-layer-invalid-icon {
	display: none;
}

/* Add layers modal */

.layers-modal {
	display: flex;
	flex-direction: column;
	align-items: stretch;
}

.layers-modal-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 16px 24px;
	border-bottom: 1px solid var(--edirt-grey-3);
}

.layers-modal-close {
	cursor: pointer;
}

.layers-modal-body {
	flex-grow: 1;
	position: relative;
	padding: 0 24px;
	overflow: hidden;
	cursor: grab;
}

.layers-modal-depth-scroller {
	position: relative;
	left: 0;
	top: -305px;
	width: 100%;
	height: auto;
}

.layers-modal-markers {
	z-index: 30;
	position: absolute;
	top: 0;
	left: 0;
}

.layers-modal-10-marker {
	position: relative;
	width: 29px;
	height: 1px;
	margin-bottom: 3px;
	background-color: var(--edirt-grey-2);
}

.layers-modal-10-marker-label {
	position: absolute;
	left: 36px;
	top: -11px;
	font-size: 12px;
}

.layers-modal-1-marker {
	width: 17px;
	height: 1px;
	margin-bottom: 3px;
	background-color: var(--edirt-grey-3);
}

.layers-modal-surface {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 537px;
	background-color: var(--edirt-red-4);
	border-bottom: 2px solid var(--edirt-red-3);
	z-index: 25;
}

.layers-modal-surface-label {
	position: absolute;
	left: 84px;
	bottom: 3px;
	font-size: 12px;
	color: var(--edirt-error-red);
	z-index: 27;
}

.layers-modal-depth-indicator {
	position: absolute;
	top: 230px;
	left: 24px;
	width: calc(100% - 48px);
	height: 2px;
	background-color: var(--edirt-blue-2);
	z-index: 40;
}

.layers-modal-depth-indicator-value {
	position: absolute;
	top: -18px;
	left: 50%;
	color: var(--edirt-white);
	font-size: 18px;
	font-weight: 600;
	background-color: var(--edirt-blue-2);
	border-radius: 8px;
	translate: -50% 0;
	height: 36px;
	padding: 0 12px;
	display: flex;
	justify-content: center;
	align-items: center;
}

.layers-modal-depth-indicator-input {
	background: none;
	border: none;
	outline: none;
	color: var(--edirt-white);
	font-size: 18px;
	font-weight: 600;
	width: 5ch;
	text-align: right;
	padding: 0;
	cursor: text;
	font-family: 'Public Sans', sans-serif;
}

.layers-modal-existing-layer {
	position: absolute;
	width: 100%;
	left: 0;
	background: var(--edirt-grey-4);
	border-bottom: 1px solid var(--edirt-grey-3);
	z-index: 26;
}

.layers-modal-existing-layer-organic
{
	background: #A8EDB355;
	border-bottom: none;
	border-top: 1px solid var(--edirt-green-3);
}

.layers-modal-existing-layer div {
	position: absolute;
	top: 4px;
	right: 12px;
	font-size: 12px;
}

.layers-modal-footer {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 14px 24px 24px;
	border-top: 1px solid var(--edirt-grey-3);
	gap: 16px;
}

.layers-modal-footer .page-button {
	flex-grow: 1;
	flex-basis: calc(50% - 8px);
}

/* Sample page */

.sample-page.page-full-screen .main-body {
	padding-top: 0;
}

.sample-page-top {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 16px 24px 0;
}

.same-page-top-left {
	display: flex;
	justify-content: start;
	align-items: center;
	gap: 16px;
}

.sample-page-top-right {
	display: flex;
	justify-content: flex-end;
	align-items: center;
	gap: 8px;
}

.sample-page-header {
	padding: 24px;
}

.sample-page-stats {
	display: flex;
	justify-content: flex-start;
	gap: 8px;
}

.sample-page-stat {
	flex-basis: calc(33% - 6px);
}

.sample-page-stat-value {
	display: flex;
	justify-content: flex-start;
	align-items: center;
	gap: 8px;
	margin-top: 12px;
	font-size: 18px;
	font-weight: 600;
	color: var(--edirt-grey-1);
}

.sample-page-results {
	padding: 24px;
}

/* Sample page - lab results table */

.sample-page-lab-results {
	margin-top: 12px;
}

.lab-results-table {
	width: 100%;
	border-spacing: 0;
	border-collapse: separate;
}

.lab-results-table thead td {
	font-weight: 600;
	padding-bottom: 4px;
}

.lab-results-table tbody tr:hover {
	background-color: var(--edirt-white);
	transition: background-color 0.2s ease-in-out;
}

.lab-results-table tbody tr:hover {
	background-color: var(--edirt-info-blue-bg);
}

.lab-results-table tbody td {
	padding: 12px 0 12px 12px;
	border-bottom: 1px solid var(--edirt-grey-3);
	cursor: pointer;
}

.lab-results-table tbody tr:first-child td {
	border-top: 1px solid var(--edirt-grey-3);
}

.lab-results-table tbody td:first-child {
	border-left: 1px solid var(--edirt-grey-3);
	padding-left: 16px;
}

.lab-results-table tbody td:last-child {
	border-right: 1px solid var(--edirt-grey-3);
}

.lab-results-table tbody tr:first-child td:first-child {
	border-top-left-radius: 8px;
}

.lab-results-table tbody tr:first-child td:last-child {
	border-top-right-radius: 8px;
}

.lab-results-table tbody tr:last-child td:first-child {
	border-bottom-left-radius: 8px;
}

.lab-results-table tbody tr:last-child td:last-child {
	border-bottom-right-radius: 8px;
}

.lab-results-table tbody td.lab-results-test-name {
	width: 80%;
}

.lab-results-table tbody td.lab-results-delete-cell {
	padding-left: 16px;
	padding-right: 16px;
}

.lab-results-table tbody td.lab-results-delete-cell .icon {
	min-width: 20px;
}

.lab-results-table tbody td.lab-results-test-name {
	font-weight: 600;
}

/* Sample page - lab results form */

.test-search-result {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding-right: 8px !important;
}

.test-search-result .test-search-result-name {
	color: var(--edirt-blue-1);
}

.test-search-result .test-search-result-code {
	color: var(--edirt-grey-1);
}

.laboratory-test-selected {
	border: 2px solid var(--edirt-blue-2);
	padding: 12px 6px 12px 18px;
	border-radius: 8px;
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 6px;
}

.laboratory-test-selected .icon {
	min-width: 20px;
}

.laboratory-test-selected .laboratory-test-selected-info {
	flex-grow: 1;
	padding-left: 6px;
}

.laboratory-test-selected .laboratory-test-selected-name {
	color: var(--edirt-grey-1);
	font-weight: 600;
}

.laboratory-test-selected .laboratory-test-selected-code {
	margin-top: 2px;
	color: var(--edirt-grey-2);
	font-size: 12px;
}

.laboratory-test-selected .laboratory-test-selected-remove {
	padding: 6px;
	cursor: pointer;
}

/* Profile core - Survey */

.big-button {
	background-color: transparent;
	border-radius: 8px;
	border: 2px solid var(--edirt-blue-1);
	color: var(--edirt-grey-2);
	width: 100%;
	cursor: pointer;
	padding: 28px;
	text-align: center;
}

.survey-search-result {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding-right: 8px !important;
}

/* Profile core - Template */

.profile-template-change-warning {
	background-color: var(--edirt-warning-orange-bg);
	border-radius: 8px;
	padding: 16px;
}

.profile-templates-list {
	display: flex;
	flex-direction: column;
	gap: 8px;
	align-items: stretch;
}

.profile-template {
	padding: 12px 18px;
	cursor: pointer;
	display: flex;
	gap: 18px;
	justify-content: start;
	align-items: center;
	border: 2px solid var(--edirt-grey-4);
	border-radius: 8px;
}

.profile-template-name {
	font-weight: bold;
	font-size: 16px;
}

.profile-template-subtitle {
	font-size: 12px;
	color: var(--edirt-grey-2);
}

.profile-template.selected {
	border-color: var(--edirt-blue-2-alpha);
	background-color: var(--edirt-blue-2-alpha);
}

/* Profile core - Summary */

.summary-header {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 12px;
}

.summary-info {
	padding: 0 20px;
	display: flex;
	justify-content: space-between;
	gap: 20px;
}

.summary-info-label {
	display: flex;
	justify-content: start;
	align-items: center;
	gap: 8px;
}

.summary-edit-buttons {
	display: flex;
	justify-content: space-between;
	gap: 12px;
}

/* Profile core - Location */

#location-map {
	width: 100%;
	height: 420px;
	border-radius: 8px;
}

#view-map .map-layer-container {
	top: 20%;
	transform: translateY(-20%);
}

.map-layer-container {
	display: flex;
	flex-direction: column;
	gap: 2px;
	padding: 2px;
	border-radius: 6px;
	background-color: rgba(0, 0, 0, 0.8);
	position: absolute;
	align-items: center;
	right: 16px;
	top: 50%;
	transform: translateY(-50%);
	z-index: 10;
}

.map-pin {
	filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.2));
}

.map-pin.white .map-pin-dot-inner {
	border: 1px solid var(--edirt-white);
}

.map-pin.white .map-pin-number {
	color: var(--edirt-grey-1);
}

.map-pin.white .map-pin-top {
	background: var(--edirt-white);
	border: 1px solid var(--edirt-grey-1);
}

.map-pin-inprogress .map-pin-dot {
	background-color: var(--edirt-blue-4);
}

.map-pin-inprogress .map-pin-dot-inner {
	background-color: var(--edirt-info-blue);
}

.map-pin-submitted .map-pin-dot {
	background-color: var(--edirt-yellow-4);
}

.map-pin-submitted .map-pin-dot-inner {
	background-color: var(--edirt-yellow-2);
}

.map-pin-approved .map-pin-dot {
	background-color: var(--edirt-green-4);
}

.map-pin-approved .map-pin-dot-inner {
	background-color: var(--edirt-success-green);
}

.map-pin-rejected .map-pin-dot {
	background-color: var(--edirt-red-4);
}

.map-pin-rejected .map-pin-dot-inner {
	background-color: var(--edirt-error-red);
}

.map-pin-top {
	background: var(--edirt-grey-1);
	height: 22px;
	border-radius: 22px;
	padding: 0 3px 0 3px;
	display: flex;
	align-items: center;
	gap: 6px;
	border: 1px solid var(--edirt-white);
}

.map-pin-dot {
	height: 15px;
	width: 15px;
	border-radius: 15px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.map-pin-dot-inner {
	height: 9px;
	width: 9px;
	border-radius: 9px;
	border: 1px solid var(--edirt-grey-1);
}

.map-pin-dot.triangle {
	width: 15px;
	height: 15px;
	border-radius: 0;
	clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
	margin-left: 3px;
}

.map-pin-dot.triangle .map-pin-dot-inner {
	width: 8px;
	height: 8px;
	border-radius: 0;
	border: none;
	clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
	align-self: end;
	margin-bottom: 2px;
}

.map-pin-number {
	color: var(--edirt-white);
	font-weight: 700;
	font-size: 14px;
	margin-right: 6px;
}

.location-type {
	border: 2px solid var(--edirt-blue-2);
	padding: 12px;
	border-radius: 8px;
	cursor: pointer;
}

.location-type-display {
	display: flex;
	justify-content: center;
	align-items: center;
}

.location-type-display-item {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: start;
	gap: 8px;
	flex-grow: 1;
	border-right: 1px solid var(--edirt-grey-4);
}

.location-type-display-item:last-child {
	border-right: none;
}

/* Review page */

.review-field {
	display: flex;
	justify-content: start;
	gap: 12px;
	align-items: start;
}

.review-field-object .review-field-label {
	padding-left: 16px;
}

.review-field-label {
	flex-basis: calc(40% - 6px);
	font-weight: 500;
}

.review-field-value {
	flex-basis: calc(60% - 6px);
	font-weight: 400;
}

.review-field-calculated {
	display: none;
}

.review-images-container {
	display: flex;
	flex-direction: column;
	gap: 24px;
}

.review-image img {
	width: 100%;
	height: auto;
	border-radius: 4px;
}

.review-sample {
	display: flex;
	flex-direction: row;
}

.review-sample-test {
	flex-grow: 1;
}

.review-sample-test span {
	font-weight: 700;
}

.review-sample-result {
	flex-shrink: 0;
}

/* Common elements */

.soil-profile-number {
	display: flex;
	align-items: center;
	padding: 8px 14px;
	border-radius: 20px;
	font-size: 20px;
	font-weight: bold;
	color: var(--edirt-white);
	background-color: var(--edirt-info-blue);
}

.page-inprogress .soil-profile-number {
	background-color: var(--edirt-info-blue);
}

.page-submitted .soil-profile-number {
	background-color: var(--edirt-yellow-2);
	color: var(--edirt-grey-1);
}

.page-approved .soil-profile-number {
	background-color: var(--edirt-success-green);
}

.page-rejected .soil-profile-number {
	background-color: var(--edirt-error-red);
}

@media screen and (max-width: 600px) {
	.soil-profile-list-container {
		margin: 16px -32px -16px;
	}
}