/**
 * Memory Tagger - Styles
 * Styles for the image tagging interface
 */

/* Wrapper and Container */
.memory-tagger-wrapper {
	position: relative;
	display: block;
	width: 100%;
}

.memory-tagger-image-container {
	position: relative;
	display: block;
	width: 100%;
	cursor: crosshair;
    height: 500px;
}

/* Image */
.memory-tagger-image {
	display: block;
	width: 100%;
	height: 100% !important;
	max-width: 100% !important;
    object-fit: cover;
}

/* Markers Container */
.memory-tagger-markers {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	pointer-events: none;
}

/* Individual Marker */
.memory-tagger-marker {
	position: absolute;
	transform: translate( -50%, -50% );
	pointer-events: auto;
	z-index: 10;
}

/* Marker Dot */
.memory-tagger-dot {
	display: block;
	width: 16px;
	height: 16px;
	background-color: #ff6b6b;
	border: 2px solid #fff;
	border-radius: 50%;
	box-shadow: 0 2px 8px rgba( 255, 107, 107, 0.3 );
	cursor: pointer;
	transition: all 0.2s ease;
}

.memory-tagger-marker:hover .memory-tagger-dot {
	width: 20px;
	height: 20px;
	background-color: #ff5252;
	box-shadow: 0 4px 12px rgba( 255, 82, 82, 0.5 );
}

/* Marker Label/Tooltip */
.memory-tagger-label {
	position: absolute;
	bottom: 100%;
	left: 50%;
	transform: translateX( -50% );
	background-color: #333;
	color: #fff;
	padding: 6px 12px;
	border-radius: 4px;
	font-size: 12px;
	font-weight: 500;
	white-space: nowrap;
	margin-bottom: 8px;
	pointer-events: none;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.2s ease, visibility 0.2s ease;
	z-index: 20;
	box-shadow: 0 2px 8px rgba( 0, 0, 0, 0.2 );
}

/* Show label on marker hover */
.memory-tagger-marker:hover .memory-tagger-label,
.memory-tagger-label.visible {
	opacity: 1;
	visibility: visible;
}

/* Label arrow/triangle pointing down to the dot */
.memory-tagger-label::after {
	content: '';
	position: absolute;
	bottom: -4px;
	left: 50%;
	transform: translateX( -50% );
	width: 0;
	height: 0;
	border-left: 4px solid transparent;
	border-right: 4px solid transparent;
	border-top: 4px solid #333;
}

/* Responsive adjustments */
@media ( max-width: 768px ) {
	.memory-tagger-image-container {
		height: 300px;
	}
	.memory-tagger-dot {
		width: 14px;
		height: 14px;
		border-width: 1.5px;
	}

	.memory-tagger-marker:hover .memory-tagger-dot {
		width: 18px;
		height: 18px;
	}

	.memory-tagger-label {
		font-size: 11px;
		padding: 5px 10px;
		margin-bottom: 6px;
	}
}

@media ( max-width: 480px ) {
	.memory-tagger-dot {
		width: 12px;
		height: 12px;
		border-width: 1px;
	}

	.memory-tagger-marker:hover .memory-tagger-dot {
		width: 16px;
		height: 16px;
	}

	.memory-tagger-label {
		font-size: 10px;
		padding: 4px 8px;
		margin-bottom: 4px;
	}
}

/* Accessibility */
.memory-tagger-marker:focus-visible .memory-tagger-dot {
	outline: 2px solid #4a90e2;
	outline-offset: 2px;
}

/* Print styles */
@media print {
	.memory-tagger-image-container {
		cursor: auto;
	}

	.memory-tagger-label {
		opacity: 1;
		visibility: visible;
	}
}

/* Footer and See Details Button */
.memory-tagger-footer {
    position: absolute;
    bottom: 12px;
    left: 12px;
}

.memory-tagger-see-details-btn {
	padding: 6px 20px;
	background-color: #fff;
	color: #CCA942;
	border: 1px solid #CCA942;
	border-radius: 100px;
	cursor: pointer;
	font-size: 14px;
	font-weight: 600;
	transition: all 0.3s ease;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.memory-tagger-see-details-btn:hover {
	background-color: #CCA942;
	color: #fff;
	box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
	transform: translateY(-2px);
}

.memory-tagger-see-details-btn:active {
	transform: translateY(0);
}

/* Details Popup/Tooltip */
.memory-tagger-details-popup {
	display: none;
	position: fixed;
	top: 0px;
	left: 0px;
	width: 100%;
	z-index: 99999;
	background-color: rgba(0, 0, 0, 0.5);
	height: 100%;
	/* visibility: hidden; */
	/* transform: translateY(10px);
	transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease; */
}

.memory-tagger-details-popup.visible {
	display: block;
	/* opacity: 1; */
	/* visibility: visible; */
	/* transform: translateY(0); */
}

.memory-tagger-details-content {
    background-color: #fff;
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    max-width: 100%;
    width: 100%;
    max-height: 96vh;
    height: 96vh;
    position: absolute;
    z-index: 99999;
    top: 50%;
    left: 0px;
    margin: 0px auto;
    right: 0px;
	transform: translateY(-50%);
}

.memory-tagger-details-content-inner {
	display: flex;
	gap: 24px;
	margin-top: 16px;
}

.memory-tagger-details-content-inner img {
	max-width: 100%;
	max-height: 82vh;
}

.memory-tagger-details-close {
    position: absolute;
    top: 3px;
    right: 20px;
    font-size: 48px;
    cursor: pointer;
    color: #051C2C;
    line-height: 1;
    transition: color 0.2s ease;
	z-index: 3;
}

.memory-tagger-details-close:hover {
	color: #333;
}

.memory-tagger-details-title {
	margin: 0 0 12px 0;
	font-size: 16px;
	font-weight: 600;
	color: #333;
	padding-right: 24px;
	padding-bottom: 8px;
	border-bottom: 1px solid #eee;
}

.memory-tagger-details-text {
    font-size: 20px;
    line-height: 1.5;
    color: #051C2C;
    font-weight: 500;
    text-align: center;
	margin-top: 4px;
	flex: 0 0 33%;
}

.memory-tagger-details-text p {
	margin: 0 0 10px 0;
}

.memory-tagger-details-text p:last-child {
	margin-bottom: 0;
}

/* Responsive popup positioning */
@media (max-width: 768px) {
	.memory-tagger-details-popup {
		position: fixed;
		bottom: auto;
		top: 50%;
		left: 50%;
		transform: translate(-50%, -50%) translateY(10px);
		max-width: 85vw;
		margin-bottom: 0;
	}

	.memory-tagger-details-popup.visible {
		transform: translate(-50%, -50%) translateY(0);
	}

	.memory-tagger-details-content {
		max-width: 500px;
		max-height: 60vh;
	}
}

/**
 * Form Popup Styles
 */

/* Form Popup Modal Overlay */
.memory-tagger-form-popup {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-color: rgba(0, 0, 0, 0.5);
	display: none;
	align-items: center;
	justify-content: center;
	z-index: 9999;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.3s ease, visibility 0.3s ease;
}

.memory-tagger-form-popup.visible {
	display: flex;
	opacity: 1;
	visibility: visible;
}

/* Form Content Box */
.memory-tagger-form-content {
	background-color: #fff;
	border-radius: 8px;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
	max-width: 600px;
	width: 90%;
	overflow: hidden;
	animation: slideUp 0.3s ease forwards;
}

.memory-tagger-form-popup.visible .memory-tagger-form-content {
	animation: slideUp 0.3s ease forwards;
}

@keyframes slideUp {
	from {
		opacity: 0;
		transform: translateY(20px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* Form Header */
.memory-tagger-form-header {
	padding: 20px;
	border-bottom: 1px solid #e0e0e0;
}

.memory-tagger-form-header h3 {
	margin: 0;
	font-size: 18px;
	font-weight: 600;
	color: #051C2C;
	text-align: center;
	line-height: 1.5;
}

/* Form Close Button */
.memory-tagger-form-close {
	background: none;
	border: none;
    position: absolute;
    top: 1px;
    right: 4px;
    width: 30px;
    height: 30px;
    font-size: 30px;
	color: #051C2C;
	cursor: pointer;
	padding: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: color 0.2s ease;
}

.memory-tagger-form-close:hover {
	color: #051C2C;
}

/* Form Body */
.memory-tagger-form-body {
	padding: 20px;
}

/* Form Group */
.memory-tagger-form-group {
	margin-bottom: 16px;
}

.memory-tagger-form-group:last-child {
	margin-bottom: 0;
}

.memory-tagger-form-group label {
	display: block;
	margin-bottom: 6px;
	font-size: 14px;
	font-weight: 500;
	color: #051C2C;
}

.memory-tagger-form-group input {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid #d0d0d0;
	border-radius: 4px;
	font-size: 14px;
	font-family: inherit;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
	box-sizing: border-box;
}

.memory-tagger-form-group input:focus {
	outline: none;
	border-color: #CCA942;
	box-shadow: 0 0 0 3px rgba(204, 169, 66, 0.1);
}

.memory-tagger-form-group input::placeholder {
	color: #999;
}

/* Form Actions Button Group */
.memory-tagger-form-actions {
	display: flex;
	gap: 10px;
	justify-content: flex-end;
	margin-top: 20px;
}

/* Cancel Button */
.memory-tagger-btn-cancel {
	padding: 10px 20px;
	border: 1px solid #d0d0d0;
	background-color: #051C2C !important;
	color: #051C2C;
	border-radius: 4px;
	font-size: 14px;
	font-weight: 500;
	cursor: pointer;
	transition: all 0.2s ease;
}

.memory-tagger-btn-cancel:hover {
	background-color: #e8e8e8;
	border-color: #999;
}

/* Submit Button */
.memory-tagger-btn-submit {
	padding: 10px 20px;
	border: none;
	background-color: #CCA942;
	color: #fff;
	border-radius: 4px;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.2s ease;
}

.memory-tagger-btn-submit:hover {
	background-color: #CCA942;
	box-shadow: 0 2px 8px rgba(204, 169, 66, 0.3);
}

.memory-tagger-btn-submit:active {
	transform: translateY(1px);
}

/* Responsive Mobile */
@media (max-width: 600px) {
	.memory-tagger-form-content {
		width: 95%;
		max-width: 100%;
	}

	.memory-tagger-form-header,
	.memory-tagger-form-body,
	.memory-tagger-form-actions {
		padding: 8px;
	}

	.memory-tagger-form-header h3 {
		font-size: 16px;
	}

	.memory-tagger-form-actions {
		flex-direction: column-reverse;
	}

	.memory-tagger-btn-cancel,
	.memory-tagger-btn-submit {
		width: 100%;
	}
}
