/**
 * Public CSS for Webshot Popup.
 * Provides a responsive layout, premium aesthetics, and smooth animations.
 */

/* Overlay styling */
.webshot-popup-overlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-color: rgba(15, 23, 42, 0.65);
	/* Modern deep slate blue-dark with transparency */
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
	z-index: 999999;
	/* Ensure it is on top of everything */
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.35s cubic-bezier(0.4, 0, 0.2, 1),
		visibility 0.35s cubic-bezier(0.4, 0, 0.2, 1);
	box-sizing: border-box;
}

/* Overlay active state */
.webshot-popup-overlay.webshot-popup-active {
	opacity: 1;
	visibility: visible;
}

/* Modal container styling */
.webshot-popup-container {
	position: relative;
	width: 92%;
	padding: 40px 30px 30px 30px;
	border-radius: 16px;
	box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.4);
	max-height: 85vh;
	overflow-y: auto;
	box-sizing: border-box;

	/* Animation initial state: scaled down and slightly shifted down */
	transform: scale(0.92) translateY(20px);
	opacity: 0;
	transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
		opacity 0.3s ease;
}

/* Container active state transition */
.webshot-popup-overlay.webshot-popup-active .webshot-popup-container {
	transform: scale(1) translateY(0);
	opacity: 1;
}

/* Close Button (top-right corner) */
.webshot-popup-close {
	position: absolute;
	top: 15px;
	right: 15px;
	width: 32px;
	height: 32px;
	line-height: 30px;
	text-align: center;
	background: rgba(0, 0, 0, 0.05);
	border: none;
	border-radius: 50%;
	font-size: 24px;
	font-weight: 300;
	color: inherit;
	cursor: pointer;
	padding: 0;
	margin: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background-color 0.2s ease, transform 0.2s ease, opacity 0.2s ease;
	opacity: 0.7;
	z-index: 10;
}

.webshot-popup-close:hover {
	opacity: 1;
	background-color: rgba(0, 0, 0, 0.15);
	transform: scale(1.1) rotate(90deg);
}

.webshot-popup-close:focus {
	outline: 2px solid currentColor;
	outline-offset: 2px;
}

/* Popup content area */
.wsp-popup-content,
.webshot-popup-content {
	font-size: 16px;
	line-height: 1.6;
	word-wrap: break-word;
}

.wsp-popup-content p:first-of-type,
.webshot-popup-content p:first-of-type {
	margin-top: 0;
}

.wsp-popup-content p:last-of-type,
.webshot-popup-content p:last-of-type {
	margin-bottom: 0;
}

/* Responsive adjustments */
@media screen and (max-width: 768px) {
	.webshot-popup-container {
		padding: 35px 20px 25px 20px;
		border-radius: 12px;
		width: 95%;
	}

	.webshot-popup-close {
		top: 10px;
		right: 10px;
		width: 28px;
		height: 28px;
		font-size: 20px;
	}
}

/* Custom Scrollbar for popup container */
.webshot-popup-container::-webkit-scrollbar {
	width: 6px;
}

.webshot-popup-container::-webkit-scrollbar-track {
	background: transparent;
}

.webshot-popup-container::-webkit-scrollbar-thumb {
	background: rgba(0, 0, 0, 0.15);
	border-radius: 10px;
}

.webshot-popup-container::-webkit-scrollbar-thumb:hover {
	background: rgba(0, 0, 0, 0.3);
}

/* Frontend Form & Image Banner styles */
.wsp-popup-banner-container {
	width: 100%;
	text-align: center;
}

.wsp-popup-banner-container img {
	max-width: 100%;
	height: auto;
	border-radius: 8px;
	box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
	display: block;
	margin: 0 auto;
}

.wsp-contact-form-wrapper {
	width: 100%;
}

.wsp-form-title {
	font-size: 24px;
	font-weight: 700;
	margin-top: 0;
	margin-bottom: 8px;
	text-align: center;
}

.wsp-form-subtitle {
	font-size: 14px;
	margin-top: 0;
	margin-bottom: 24px;
	text-align: center;
	opacity: 0.8;
}

.wsp-form-fields-grid {
	display: flex;
	flex-wrap: wrap;
	gap: 15px;
	margin-bottom: 20px;
}

.wsp-form-group {
	display: flex;
	flex-direction: column;
	box-sizing: border-box;
}

.wsp-col-full {
	width: 100%;
}

.wsp-col-half {
	width: calc(50% - 8px);
}

.wsp-col-third {
	width: calc(33.333% - 10px);
}

.wsp-control-label {
	font-size: 13px;
	font-weight: 600;
	margin-bottom: 6px;
	display: inline-block;
}

.wsp-required-indicator {
	color: #dc2626;
	margin-left: 2px;
}

.wsp-form-control {
	width: 100%;
	box-sizing: border-box;
	padding: 10px 14px;
	font-size: 14px;
	line-height: 1.5;
	background-color: #fff;
	border: 1px solid #d1d5db;
	border-radius: 8px;
	color: #1f2937;
	transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.wsp-form-control:focus {
	border-color: currentColor;
	outline: none;
	box-shadow: 0 0 0 3px rgba(156, 163, 175, 0.25);
}

textarea.wsp-form-control {
	min-height: 100px;
	resize: vertical;
}

select.wsp-form-control {
	height: 42px;
	cursor: pointer;
}

.wsp-checkbox-list,
.wsp-radio-list {
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin-top: 5px;
}

.wsp-checkbox-inline,
.wsp-radio-inline {
	display: inline-flex;
	align-items: center;
	font-size: 14px;
	font-weight: normal;
	cursor: pointer;
	line-height: 1.4;
}

.wsp-checkbox-inline input[type="checkbox"],
.wsp-radio-inline input[type="radio"] {
	margin-right: 8px;
	margin-top: 0;
	cursor: pointer;
	width: 16px;
	height: 16px;
}

.wsp-help-block {
	margin-top: 4px;
	margin-bottom: 0;
	opacity: 0.7;
	font-size: 11px;
}

/* GDPR Group */
.wsp-gdpr-group {
	margin-bottom: 20px;
}

/* Submit Section */
.wsp-submit-group {
	margin-top: 10px;
}

.wsp-submit-btn {
	width: 100%;
	padding: 12px 24px;
	font-size: 15px;
	font-weight: 600;
	color: #fff;
	border-radius: 8px;
	cursor: pointer;
	border: 1px solid transparent;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	transition: opacity 0.2s, transform 0.1s;
}

.wsp-submit-btn:hover {
	opacity: 0.9;
}

.wsp-submit-btn:active {
	transform: scale(0.98);
}

.wsp-submit-btn:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

/* Spinner */
.wsp-submit-spinner {
	width: 18px;
	height: 18px;
	border: 2px solid rgba(255, 255, 255, 0.3);
	border-radius: 50%;
	border-top-color: #fff;
	animation: wsp-spin 0.8s linear infinite;
}

@keyframes wsp-spin {
	to {
		transform: rotate(360deg);
	}
}

/* Validation styling */
.wsp-input-error {
	border-color: #dc2626 !important;
	background-color: #fef2f2 !important;
}

.wsp-form-feedback-message {
	padding: 12px 16px;
	border-radius: 8px;
	font-size: 14px;
	font-weight: 500;
	margin-bottom: 20px;
	line-height: 1.4;
	box-sizing: border-box;
}

.wsp-feedback-success {
	background-color: #f0fdf4;
	color: #166534;
	border: 1px solid #bbf7d0;
}

.wsp-feedback-error {
	background-color: #fef2f2;
	color: #991b1b;
	border: 1px solid #fecaca;
}

/* Responsive Forms */
@media screen and (max-width: 600px) {

	.wsp-col-half,
	.wsp-col-third {
		width: 100%;
	}

	.wsp-form-fields-grid {
		gap: 12px;
	}
}