/* Modal open/close animation */
.static-form-modal .modal-overlay {
	opacity: 0;
	transition: opacity 0.2s ease;
}
.static-form-modal[aria-hidden="false"] .modal-overlay {
	opacity: 0.6;
}

.static-form-modal .modal-dialog {
	transform: translateY(8px) scale(0.98);
	opacity: 0;
	transition:
		transform 0.22s cubic-bezier(0.2, 0.8, 0.2, 1),
		opacity 0.22s ease;
}
.static-form-modal[aria-hidden="false"] .modal-dialog {
	transform: translateY(0) scale(1);
	opacity: 1;
}

/* Success message styling */
.modal-success {
	padding: 24px 20px;
	text-align: center;
	color: #1f2937; /* stone-800 */
	font-size: 14px;
	line-height: 1.6;
}
.modal-success .success-title {
	font-weight: 600;
	margin-bottom: 6px;
}
.modal-success .success-text {
	opacity: 0.9;
}
/* Styles for static form modal (moved from inline styles) */
.static-form-modal {
	/* keep element in DOM so animations can play */
	display: block;
	position: fixed;
	inset: 0;
	z-index: 110000;
	font-family: Arial, Helvetica, sans-serif;
	/* hide by default without removing from flow to allow transitions */
	visibility: hidden;
	pointer-events: none;
}

.static-form-modal[aria-hidden="false"] {
	visibility: visible;
	pointer-events: auto;
}

.static-form-modal .modal-overlay {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.6);
}

.static-form-modal .modal-dialog {
	position: relative;
	max-width: 680px;
	margin: 6vh auto;
	background: #fff;
	border-radius: 32px;
	overflow: hidden;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
	padding-top: 44px;
	padding: 0 16px;
}

.static-form-modal .modal-close {
	position: absolute;
	right: 24px;
	top: 24px;
	background: none;
	border: 0;
	font-size: 32px;
	line-height: 1;
	cursor: pointer;
	color: #333;
}

.static-form-modal .logo {
	max-width: 124px;
}
.static-form-modal .modal-image {
	width: 100%;
	height: auto;
	display: block;
	object-fit: cover;
}

.static-form-modal .modal-content {
	padding: 22px 24px 28px;
	width: 100%;
}

.static-form-modal .modal-title {
	margin: 0 auto 10px;
	font-size: 22px;
	line-height: 1.05;
	color: #103a5b;
	text-align: center;
}

.static-form-modal .modal-desc {
	margin: 0 auto 18px;
	text-align: center;
	max-width: 420px;
	color: #444;
	font-size: 15px;
}

.static-form-modal .modal-fields {
	display: flex;
	flex-direction: column;
	gap: 18px;
}

.static-form-modal .modal-field {
	font-size: 14px;
	color: #333;
	display: block;
}

/* Underline-style inputs (like in screenshots) */
.static-form-modal .modal-input {
	margin-top: 8px;
	padding: 8px 10px 6px 10px;
	border: 0;
	border-bottom: 1px solid #dcdcdc;
	border-radius: 0;
	font-size: 15px;
	width: 100%;
	background: transparent;
	box-sizing: border-box;
}

.static-form-modal .modal-input::placeholder {
	color: #9b9b9b;
}

/* Phone row with country selector */
.static-form-modal .phone-row {
	display: flex;
	align-items: center;
	gap: 10px;
	position: relative;
	margin-bottom: 32px;
}

.static-form-modal .country-select {
	position: absolute;
	top: 50%;
	left: 12px;
	transform: translateY(-50%);
	display: flex;
	align-items: center;
	gap: 6px;
	padding: 2px 8px;
	border: 1px solid transparent;
	background: #fff;
	cursor: pointer;
	border-radius: 6px;
	min-width: 64px;
	justify-content: center;
}

.static-form-modal .country-select:focus {
	outline: 2px solid rgba(0, 0, 0, 0.08);
}

.phone-row .modal-input.phone-input {
	padding-left: 120px;
}

.static-form-modal .country-flag {
	text-transform: uppercase;
	font-size: 15px;
}
.static-form-modal .country-code {
	font-weight: 600;
	font-size: 15px;
}
.static-form-modal .caret {
	font-size: 14px;
	color: #666;
}

.static-form-modal .country-list {
	position: absolute;
	left: 0;
	top: 100%;
	margin-top: 8px;
	width: 260px;
	max-height: 154px;
	overflow: auto;
	background: #fff;
	border: 1px solid #e6e6e6;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
	border-radius: 6px;
	z-index: 11001;
	padding: 6px 0;
}

.static-form-modal .country-list li {
	list-style: none;
	padding: 8px 12px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	cursor: pointer;
}

.static-form-modal .country-list li .flag {
	margin-right: 8px;
}

.static-form-modal .country-list li:hover {
	background: #f3f6f7;
}

.static-form-modal .country-list li .num {
	color: #2a6b8f;
	font-weight: 600;
}
.static-form-modal .country-list li span:nth-child(2) {
	text-align: center;
}

/* small flag images */
.static-form-modal .flag-img,
.static-form-modal .country-flag img {
	display: inline-block;
	width: 20px;
	height: 15px;
	object-fit: cover;
	vertical-align: middle;
	border-radius: 2px;
}

.static-form-modal .modal-actions {
	text-align: center;
	margin-top: 6px;
}

.static-form-modal .modal-submit {
	background: #e23b2b;
	color: #fff;
	border: 0;
	padding: 14px 32px;
	border-radius: 999px;
	cursor: pointer;
	font-weight: 700;
	width: 100%;
	max-width: 420px;
	display: inline-block;
}

/* Floating label styles */
.form-field {
	position: relative;
}
.floating-label {
	position: absolute;
	left: 10px;
	top: 12px;
	color: #8a8a8a;
	font-size: 14px;
	pointer-events: none;
	transition:
		transform 150ms ease,
		color 150ms ease,
		font-size 150ms ease;
	transform-origin: left top;
}

.floating-input {
	padding-left: 10px;
}

/* move label up when input focused or input has value (not placeholder shown) */
.floating-input:focus + .floating-label,
.floating-input:not(:placeholder-shown) + .floating-label {
	transform: translateY(-140%) scale(0.92);
	color: #103a5b;
	font-size: 12px;
}

/* remove default outline */
input:focus,
button:focus {
	outline: none;
}

.phone-field .floating-label {
	left: 84px;
	top: 12px;
}
.phone-row .modal-input {
	flex: 1;
}

.modal-note {
	margin-top: 10px;
	font-size: 12px;
	color: #666;
	max-width: 420px;
	margin-left: auto;
	margin-right: auto;
}

/* Responsive: ensure modal fits on small viewports */
@media (min-width: 520px) {
	.static-form-modal .logo {
		max-width: 256px;
	}
}
@media (max-width: 520px) {
	.static-form-modal .modal-dialog {
		margin: 4vh 12px;
		width: auto;
	}
}
