/**
 * Contact Form Block Styles
 * Highly specific selectors to prevent CSS conflicts
 */

/* Block Wrapper - Remove all visual styling to prevent double-layer effect */
.wp-block-tt5-child-contact-form {
	text-align: center !important;
	display: block !important;
	background: none !important;
	background-color: transparent !important;
	padding: 0 !important;
	margin: 0 !important;
	border: none !important;
	box-shadow: none !important;
}

.wp-block-tt5-child-contact-form.alignleft {
	text-align: left !important;
}

.wp-block-tt5-child-contact-form.aligncenter {
	text-align: center !important;
}

.wp-block-tt5-child-contact-form.alignright {
	text-align: right !important;
}

/* Contact Button - Simple pill-shaped design */
button.contact-form-button,
.wp-block-tt5-child-contact-form button.contact-form-button {
	/* Display & Layout */
	display: inline-block;
	width: auto;
	box-sizing: border-box;

	/* Spacing */
	padding: 12px 30px;
	margin: 0;

	/* Typography */
	font-size: 16px;
	font-weight: 500;
	font-family: inherit;
	line-height: 1.5;
	text-align: center;
	white-space: nowrap;

	/* Colors - Simple white button with black text */
	background-color: white;
	color: black;
	border: 2px solid black;
	border-radius: 9999px; /* Pill shape */

	/* Interaction */
	cursor: pointer;
	transition: all 0.2s ease;

	/* Reset default styles */
	appearance: none;
	-webkit-appearance: none;
	text-decoration: none;
}

/* Hover state - Invert colors */
button.contact-form-button:hover,
.wp-block-tt5-child-contact-form button.contact-form-button:hover {
	background-color: black;
	color: white;
}

/* Focus state - Visible for accessibility */
button.contact-form-button:focus,
button.contact-form-button:focus-visible,
.wp-block-tt5-child-contact-form button.contact-form-button:focus,
.wp-block-tt5-child-contact-form button.contact-form-button:focus-visible {
	outline: 3px solid black;
	outline-offset: 2px;
}

/* Overlay */
.contact-form-overlay {
	display: none !important;
	position: fixed !important;
	top: 0 !important;
	left: 0 !important;
	width: 100% !important;
	height: 100% !important;
	background-color: rgba(0, 0, 0, 0.6) !important;
	z-index: 9999 !important;
	justify-content: center !important;
	align-items: center !important;
	backdrop-filter: blur(2px) !important;
}

.contact-form-overlay.active {
	display: flex !important;
}

/* Modal */
.contact-form-modal {
	background: #1a1a1a !important;
	border-radius: 8px !important;
	padding: 30px !important;
	width: 90% !important;
	max-width: 500px !important;
	max-height: 90vh !important;
	overflow-y: auto !important;
	position: relative !important;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5) !important;
	animation: slideIn 0.3s ease !important;
}

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

/* Close Button */
.contact-form-close {
	position: absolute !important;
	top: 15px !important;
	right: 15px !important;
	background: none !important;
	border: none !important;
	font-size: 30px !important;
	line-height: 1 !important;
	color: #bbb !important;
	cursor: pointer !important;
	padding: 0 !important;
	width: 30px !important;
	height: 30px !important;
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	transition: color 0.2s ease !important;
}

.contact-form-close:hover {
	color: #fff !important;
}

/* Form Title */
.contact-form-modal h2 {
	margin: 0 0 20px 0 !important;
	font-size: 24px !important;
	color: #fff !important;
}

/* Form Fields */
.contact-form .form-field {
	margin-bottom: 20px !important;
}

.contact-form label {
	display: block !important;
	margin-bottom: 5px !important;
	font-weight: 500 !important;
	color: #fff !important;
	font-size: 14px !important;
}

.contact-form .required {
	color: #ff6b6b !important;
}

.contact-form input[type="email"],
.contact-form input[type="tel"],
.contact-form textarea {
	width: 100% !important;
	padding: 10px 12px !important;
	font-size: 14px !important;
	background-color: #2a2a2a !important;
	color: #fff !important;
	border: 1px solid #444 !important;
	border-radius: 4px !important;
	box-sizing: border-box !important;
	font-family: inherit !important;
	transition: border-color 0.2s ease !important;
}

.contact-form input[type="email"]:focus,
.contact-form input[type="tel"]:focus,
.contact-form textarea:focus {
	outline: none !important;
	border-color: #888 !important;
	box-shadow: 0 0 0 1px #888 !important;
}

.contact-form input[type="email"]::placeholder,
.contact-form input[type="tel"]::placeholder,
.contact-form textarea::placeholder {
	color: #888 !important;
}

.contact-form textarea {
	resize: vertical !important;
	min-height: 100px !important;
}

.char-counter {
	display: block !important;
	margin-top: 5px !important;
	font-size: 12px !important;
	color: #aaa !important;
}

/* Honeypot Fields */
.honeypot-field {
	position: absolute !important;
	left: -9999px !important;
	width: 1px !important;
	height: 1px !important;
	opacity: 0 !important;
}

/* Submit Button */
.contact-form button.submit-button,
form.contact-form button.submit-button {
	display: block;
	width: 100%;
	box-sizing: border-box;
	margin: 10px 0 0 0;
	padding: 12px 30px;

	/* Typography */
	font-size: 16px;
	font-weight: 500;
	font-family: inherit;
	line-height: 1.5;
	text-align: center;

	/* Pill-shaped design */
	background: white;
	color: black;
	border: 2px solid black;
	border-radius: 9999px;

	/* Interaction */
	cursor: pointer;
	transition: all 0.2s ease;

	/* Reset */
	appearance: none;
	-webkit-appearance: none;
}

.contact-form button.submit-button:hover:not(:disabled),
form.contact-form button.submit-button:hover:not(:disabled) {
	background: black;
	color: white;
}

.contact-form button.submit-button:disabled,
form.contact-form button.submit-button:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

/* Messages */
.form-messages {
	margin-bottom: 15px !important;
}

.form-messages .message {
	padding: 12px 15px !important;
	border-radius: 4px !important;
	font-size: 14px !important;
	margin-bottom: 10px !important;
}

.form-messages .message.success {
	background-color: #1e4620 !important;
	color: #7dff7d !important;
	border: 1px solid #2d6b2f !important;
}

.form-messages .message.error {
	background-color: #4a1e1e !important;
	color: #ff7d7d !important;
	border: 1px solid #6b2d2d !important;
}

/* Responsive */
@media (max-width: 600px) {
	.contact-form-modal {
		padding: 20px !important;
		width: 95% !important;
	}

	.contact-form-modal h2 {
		font-size: 20px !important;
	}

	button.contact-form-button,
	.wp-block-tt5-child-contact-form button.contact-form-button {
		padding: 10px 24px;
		font-size: 14px;
	}
}
