/* Point popup */

.rwatch-map .field--name-field-measure-date { /* Make counter not occupy the whole row */
	display: flex;
}
.rwatch-map .field--name-field-measure-date .field__item { /* Margin between label and item for date field */
	margin-left: 3px;
}

.rwatch-map .field--name-field-measure-date .revs-counter { /* Styling counter */
	margin-left: 5px;
	font-size: 80%;
	margin-top: -2px;

	border: 1px solid gray;
	color: gray;
	border-radius: 10px;
	padding: 3px;
}

.gm-style-iw { /* Popup size */
	width: 620px;
	height: auto;
	max-height: 350px;
}

.gm-style-iw button.gm-ui-hover-effect { /* Popup close button */
	top: -5px !important;
	right: -5px !important;
}

.gm-style .gm-style-iw .block-field-blocknodemap-pointtitle {
	width: 95% !important;
}

/* Removing unneeded margins from popup */
.gm-style .gm-style-iw div:first-child,
.gm-style .gm-style-iw-c,
.gm-style .gm-style-iw div:first-child, 
.gm-style .gm-style-iw .field:first-child {
	padding: 0;
}
.gm-style .gm-style-iw button.gm-ui-hover-effect {
	position: absolute !important;
}

/* Image styling */
.node--type-map-point.node--view-mode-map-popup div.field--name-field-image img {
	border-radius: 8px;
}
.node--type-map-point.node--view-mode-map-popup .field--name-field-image { 
	margin: 0;
}

.gm-style-iw-d {
	display: contents; /*Without this Chrome adds unneeded padding */ 
}


.node--type-map-point.node--view-mode-map-popup,
.poi-info-window /* This is for non-Drupal points */ {
	margin: .6rem;
}

.node--type-map-point.node--view-mode-map-popup .field--label-inline { /* Margins after fields */
	margin-bottom: 4px;
}

.node--type-map-point.node--view-mode-map-popup .block-field-blocknodemap-pointtitle { /* Exra margin after title */
	margin-bottom: .5rem;
}

.node--type-map-point.node--view-mode-map-popup .field--name-title { /* Title styling */
	font-weight: 700;
	font-size: 16px;
	line-height: 22px;
}

.node--type-map-point.node--view-mode-map-popup .field > .field__label,
.node--type-map-point.node--view-mode-map-popup .field > .field__item { /* Font size for fields */
	font-size: 13px;
	line-height: 18px;
}

/* Grid-like layout for parameter fields */
.node--type-map-point.node--view-mode-map-popup .layout__region--second { 
	display: flex;
	flex-direction: row;
	flex-wrap: wrap;
	align-content: flex-start;
}

/* Title  styling */
.node--view-mode-map-popup .field--name-title a::after
{
  content: "";
  width: 11px;
  height: 11px;
  margin-left: 4px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='currentColor' viewBox='0 0 16 16'%3E%3Cpath fill-rule='evenodd' d='M8.636 3.5a.5.5 0 0 0-.5-.5H1.5A1.5 1.5 0 0 0 0 4.5v10A1.5 1.5 0 0 0 1.5 16h10a1.5 1.5 0 0 0 1.5-1.5V7.864a.5.5 0 0 0-1 0V14.5a.5.5 0 0 1-.5.5h-10a.5.5 0 0 1-.5-.5v-10a.5.5 0 0 1 .5-.5h6.636a.5.5 0 0 0 .5-.5z'/%3E%3Cpath fill-rule='evenodd' d='M16 .5a.5.5 0 0 0-.5-.5h-5a.5.5 0 0 0 0 1h3.793L6.146 9.146a.5.5 0 1 0 .708.708L15 1.707V5.5a.5.5 0 0 0 1 0v-5z'/%3E%3C/svg%3E");
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  display: inline-block;
}




/* xs-sm ruleset */
@media (max-width: 767px) {

	.node--type-map-point.node--view-mode-map-popup .layout--twocol-section {
		flex-direction: column; /* Image and content should be in a column on smaller screens */
	}

	/* Image should occupy 100% of width */
	.node--type-map-point.node--view-mode-map-popup .field--name-field-image {
		width: 100%; 
	}
	.node--type-map-point.node--view-mode-map-popup .field--name-field-image img {
		width: 100%;
		object-fit: cover;
	}

	div.gm-style-iw {
		max-height: 380px !important;
	}
}

/* md-xl ruleset */
@media (min-width: 768px) {

	.node--type-map-point.node--view-mode-map-popup div.layout__region--first { /* Required for margin after image */
		padding-right: .7em;
	}

}


/* lg ruleset */
@media (min-width: 992px) and (max-width: 1199px) {

	div.gm-style-iw {
		max-width: 600px !important;
	}

}


/* sm ruleset */
@media (min-width: 576px) and (max-width: 767px) {

}


/* xs ruleset */
@media (max-width: 575px) {

	.gm-style-iw { /* Popup size */
		min-width: 355px !important;
	}

}

/* .node--type-map-point.node--view-mode-map-popup .layout__region--first {
	min-height: 240px;
} */

/* .node--type-map-point.node--view-mode-map-popup .layout__region--second > div {
	align-self: start;
} */

/* .node--type-map-point.node--view-mode-map-popup .field--type-entity-reference {
	margin-bottom: 0;
} */
/* .node--type-map-point.node--view-mode-map-popup .node__content {
	margin-top: 0;
} */
