/**
 * Styles for the GPS 2 Photo Add-on Modal.
 *
 * This file contains the CSS rules for the modal window used to display
 * the map for adding or amending GPS coordinates.
 *
 * @package    GPS 2 Photo Add-on
 * @subpackage CSS
 * @since      1.0.0
 * @author     Pawel Block <pblock@op.pl>
 */

.gps2photos-modal {
	display: flex;
	visibility: hidden;
	/* Initially hidden, will be changed to 'visible' by JS */
	position: fixed;
	z-index: 160001;
	/* Higher than WP media modal z-index (160000) */
	left: 0;
	top: 0;
	width: 100%;
	height: 100%;
	overflow: auto;
	background-color: rgba(0, 0, 0, 0.5);
	align-items: center;
	justify-content: center;
}

.gps2photos-modal-content {
	background-color: #fefefe;
	padding: 18px;
	border: 1px solid #888;
	width: 100%;
	/* Use a percentage for better responsiveness */
	height: 100%;
	/* Use a percentage for better responsiveness */
	position: relative;
	/* For close button positioning */
	box-shadow: 0 5px 15px rgba(0, 0, 0, .5);
	display: flex;
	flex-direction: column;
}

.gps2photos-modal-close {
	color: #aaa;
	position: absolute;
	top: 18px;
	right: 18px;
	font-size: 34px;
	font-weight: bold;
}

.gps2photos-modal-close:hover,
.gps2photos-modal-close:focus {
	color: black;
	text-decoration: none;
	cursor: pointer;
}

.gps2photos-modal-header {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
}

.gps2photos-modal-header h2 {
	margin-top: 0;
}

/* Azure Maps Overview Map button hover to correct Athena Theme */
.atlas-map .azmaps-overviewMapBtn:hover {
	background-position-x: center;
	background-position-y: center;
	background-repeat: no-repeat;
	background-size: 12px
}

.atlas-map .azure-maps-control-container .atlas-control-search-input-container {
	width: 250px;
	/* Increase width of the search bar */
}

.gps2photos-map-container {
	width: 100%;
	/* Allow the map to grow and fill available space */
	flex-grow: 1;
	position: relative;
	overflow: hidden;
	/* Prevent map from spilling out */
	/* Required for Azure Maps rendering */
}

#gps2photos-search-container {
	position: absolute;
	top: 7px;
	left: 50%;
	transform: translateX(-50%);
	z-index: 10;
	background-color: white;
	padding: 7px;
	border-radius: 8px;
	display: flex;
	gap: 5px;
	flex-wrap: wrap;
}

#gps2photos-search-container input[type="text"] {
	flex-grow: 10;
	line-height: 1.5;
	text-align: center;
	min-height: 20px;
}

#gps2photos-search-container .button {
	flex-grow: 1;
	line-height: 1.5;
	text-align: center;
	min-height: 20px;
}

/* Styles for the tooltip inside the modal's h2 */
.gps2photos-modal-content h2 {
	display: flex;
	align-items: center;
	margin-top: 0;
}

.gps2photos-modal-content .gps2photos-tooltip-container {
	position: relative;
	display: inline-block;
	margin-left: 8px;
}

.gps2photos-modal-content .gps2photos-tooltip-trigger {
	width: 24px;
	height: 24px;
	vertical-align: middle;
	cursor: help;
	padding-bottom: 2px;
}

.gps2photos-modal-content .gps2photos-tooltip-container .gps2photos-tooltip-text {
	visibility: hidden;
	width: 250px;
	background-color: #333;
	color: #fff;
	text-align: left;
	padding: 10px;
	border-radius: 6px;
	position: absolute;
	z-index: 1;
	top: 0;
	/* Align top of tooltip with top of icon */
	left: 100%;
	/* Position to the right of the icon */
	margin-left: 10px;
	/* Add some space */
	opacity: 0;
	transition: opacity 0.3s;
	box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
	font-weight: lighter;
	/* Reset font weight inherited from h2 */
	font-size: 13px;
	/* Set a standard font size */
}

.gps2photos-modal-content .gps2photos-tooltip-container:hover .gps2photos-tooltip-text {
	visibility: visible;
	opacity: 1;
}

.gps2photos-modal-content #gps2photos-modal-inputs p:first-of-type {
	margin-top: 5px;
	/* or whatever margin you want */
}

.gps2photos-modal-message.notice {
	padding: 4px;
	margin: 0;
	border-radius: 3px;
	border-left-width: 4px;
	border-left-style: solid;
}

.gps2photos-modal-message.notice-success {
	background-color: #f0f6fc;
	border-color: #2c882c;
	color: #0a3622;
}

.gps2photos-modal-message.error {
	background-color: #fbeaea;
	border-color: #d63638;
	color: #b32d2e;
}

.gps2photos-save-container {
	display: flex;
	align-items: center;
	gap: 15px;
	/* Space between button and message */
	margin: 13px 0 0 0;
}

.gps2photos-save-container .gps2photos-save-coords-btn {
	margin: 0;
	padding: 0 13px;
}

#gps2photos-modal-inputs .gps2photos-restore-coords-btn {
	margin-top: 13px;
}

.gps2photos-modal-message {
	flex-grow: 1;
	/* The message div will take up the remaining space */
}