/**
 * Contact Popup Form Styles
 * Modern, beautiful popup form design
 * 
 * @package TabcomGroup
 */

/* ============================================
   POPUP OVERLAY
   ============================================ */
.contact-popup-overlay {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.6);
	backdrop-filter: blur(4px);
	-webkit-backdrop-filter: blur(4px);
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	opacity: 0;
	visibility: hidden;
	transition: all 0.3s ease;
}

.contact-popup-overlay.active {
	opacity: 1;
	visibility: visible;
}

/* ============================================
   POPUP CONTAINER
   ============================================ */
.contact-popup {
	position: relative;
	width: 100%;
	max-width: 520px;
	max-height: 90vh;
	overflow-y: auto;
	background: #ffffff;
	border-radius: 20px;
	box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
	transform: scale(0.9) translateY(20px);
	transition: all 0.3s ease;
}

.contact-popup-overlay.active .contact-popup {
	transform: scale(1) translateY(0);
}

/* Close Button */
.popup-close {
	position: absolute;
	top: 16px;
	right: 16px;
	width: 40px;
	height: 40px;
	border: none;
	background: #f1f5f9;
	border-radius: 50%;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #64748b;
	transition: all 0.2s ease;
	z-index: 10;
}

.popup-close:hover {
	background: #e2e8f0;
	color: #1e293b;
	transform: rotate(90deg);
}

/* ============================================
   POPUP HEADER
   ============================================ */
.popup-header {
	text-align: center;
	padding: 40px 32px 24px;
	background: linear-gradient(180deg, #0F2EDE 60%, #01f3f8 100%);
	border-radius: 20px 20px 0 0;
	color: #fff;
	position: relative;
	overflow: hidden;
}

/* Decorative Elements */
.popup-decoration {
	position: absolute;
	inset: 0;
	pointer-events: none;
	z-index: 0;
}

.deco-circle {
	position: absolute;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.1);
	animation: float 6s ease-in-out infinite;
}

.deco-circle-1 {
	width: 120px;
	height: 120px;
	top: -60px;
	right: -40px;
	animation-delay: 0s;
}

.deco-circle-2 {
	width: 80px;
	height: 80px;
	bottom: -40px;
	left: -20px;
	animation-delay: 2s;
}

.deco-dots {
	position: absolute;
	top: 20px;
	left: 20px;
	width: 40px;
	height: 40px;
	background-image: radial-gradient(circle, rgba(255,255,255,0.2) 2px, transparent 2px);
	background-size: 8px 8px;
	animation: pulse 4s ease-in-out infinite;
}

@keyframes float {
	0%, 100% { transform: translateY(0px) rotate(0deg); }
	50% { transform: translateY(-20px) rotate(180deg); }
}

@keyframes pulse {
	0%, 100% { opacity: 0.3; }
	50% { opacity: 0.8; }
}

/* Ensure content stays above decorations */
.popup-icon,
.popup-title,
.popup-subtitle {
	position: relative;
	z-index: 1;
}

.popup-icon {
	width: 64px;
	height: 64px;
	background: rgba(255, 255, 255, 0.15);
	border-radius: 16px;
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 0 auto 16px;
	backdrop-filter: blur(10px);
	font-size: 24px;
}

.popup-icon i {
	color: #fff;
}

.popup-title {
	font-size: 1.5rem;
	font-weight: 700;
	margin: 0 0 8px;
	color: #fff;
}

.popup-subtitle {
	font-size: 0.9375rem;
	color: rgba(255, 255, 255, 0.8);
	margin: 0;
	line-height: 1.5;
}

/* ============================================
   CONTACT FORM
   ============================================ */
.contact-form {
	padding: 32px;
}

.form-group {
	margin-bottom: 20px;
}

.form-group label {
	display: block;
	font-size: 0.875rem;
	font-weight: 600;
	color: #1e293b;
	margin-bottom: 8px;
}

.form-group label .required {
	color: #ef4444;
}

.input-wrapper {
	position: relative;
}

.input-icon {
	position: absolute;
	left: 14px;
	top: 50%;
	transform: translateY(-50%);
	color: #94a3b8;
	pointer-events: none;
	z-index: 1;
}

.textarea-wrapper .input-icon {
	top: 14px;
	transform: none;
}

.contact-form input,
.contact-form select,
.contact-form textarea {
	width: 100%;
	padding: 12px 14px 12px 46px;
	font-size: 0.9375rem;
	color: #1e293b;
	background: #f8fafc;
	border: 2px solid #e2e8f0;
	border-radius: 10px;
	outline: none;
	transition: all 0.2s ease;
	font-family: inherit;
}

.contact-form textarea {
	padding-left: 14px;
	resize: vertical;
	min-height: 80px;
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
	background: #fff;
	border-color: #0F2EDE;
	box-shadow: 0 0 0 4px rgba(15, 46, 222, 0.1);
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
	color: #94a3b8;
}

/* Select Wrapper */
.select-wrapper select {
	appearance: none;
	cursor: pointer;
	padding-right: 40px;
}

.select-wrapper::after {
	content: '';
	position: absolute;
	right: 14px;
	top: 50%;
	transform: translateY(-50%);
	width: 0;
	height: 0;
	border-left: 5px solid transparent;
	border-right: 5px solid transparent;
	border-top: 6px solid #64748b;
	pointer-events: none;
}

/* Form Row (2 columns) */
.form-row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 16px;
}

/* ============================================
   SUBMIT BUTTON
   ============================================ */
.btn-submit {
	width: 100%;
	height: 52px;
	padding: 0 24px;
	font-size: 1rem;
	font-weight: 700;
	color: #fff;
	background: linear-gradient(135deg, #0F2EDE 0%, #060C3D 100%);
	border: none;
	border-radius: 12px;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	transition: all 0.3s ease;
	position: relative;
	overflow: hidden;
}

.btn-submit::before {
	content: '';
	position: absolute;
	inset: 0;
	background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, transparent 100%);
	opacity: 0;
	transition: opacity 0.3s ease;
}

.btn-submit:hover::before {
	opacity: 1;
}

.btn-submit:hover {
	transform: translateY(-2px);
	box-shadow: 0 10px 20px rgba(15, 46, 222, 0.3);
}

.btn-submit:active {
	transform: translateY(0);
}

.btn-loading {
	display: none;
	align-items: center;
	gap: 8px;
}

.btn-submit.loading .btn-text {
	display: none;
}

.btn-submit.loading .btn-loading {
	display: flex;
}

.btn-submit.loading {
	pointer-events: none;
	opacity: 0.8;
}

/* Spinner Animation */
.spinner {
	animation: spin 1s linear infinite;
}

@keyframes spin {
	from { transform: rotate(0deg); }
	to { transform: rotate(360deg); }
}

/* Form Note */
.form-note {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	margin-top: 16px;
	font-size: 0.8125rem;
	color: #64748b;
}

.form-note i {
	color: #22c55e;
}

/* ============================================
   SUCCESS MESSAGE
   ============================================ */
.form-success {
	display: none;
	text-align: center;
	padding: 48px 32px;
}

.form-success.show {
	display: block;
}

.contact-form.hidden {
	display: none;
}

.popup-header.hidden {
	display: none;
}

.success-icon {
	width: 80px;
	height: 80px;
	background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 0 auto 24px;
	animation: scaleIn 0.5s ease;
	font-size: 32px;
}

@keyframes scaleIn {
	0% { transform: scale(0); }
	50% { transform: scale(1.1); }
	100% { transform: scale(1); }
}

.success-icon i {
	color: #fff;
}

.form-success h4 {
	font-size: 1.5rem;
	font-weight: 700;
	color: #1e293b;
	margin: 0 0 12px;
}

.form-success p {
	font-size: 0.9375rem;
	color: #64748b;
	line-height: 1.6;
	margin: 0 0 24px;
}

.btn-close-success {
	padding: 12px 32px;
	font-size: 0.9375rem;
	font-weight: 600;
	color: #0F2EDE;
	background: #f0f4ff;
	border: none;
	border-radius: 10px;
	cursor: pointer;
	transition: all 0.2s ease;
}

.btn-close-success:hover {
	background: #e0e7ff;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 576px) {
	.contact-popup {
		max-width: 100%;
		border-radius: 16px;
	}

	.popup-header {
		padding: 32px 24px 20px;
		border-radius: 16px 16px 0 0;
	}

	.popup-title {
		font-size: 1.25rem;
	}

	.contact-form {
		padding: 24px;
	}

	.form-row {
		grid-template-columns: 1fr;
		gap: 0;
	}

	.btn-submit {
		height: 48px;
	}
}

/* ============================================
   TRIGGER BUTTONS (Add to existing buttons)
   ============================================ */
[data-contact-popup],
.btn-contact-popup {
	cursor: pointer;
}
