/**
 * Frontend Styles for Request Quote
 *
 * @package WC_Request_Quote
 */

/* Modal Styles */
.wc-rq-quote-modal {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: 999999;
	display: none;
}

.wc-rq-modal-overlay {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-color: rgba(0, 0, 0, 0.7);
	backdrop-filter: blur(2px);
}

.wc-rq-modal-content {
	position: relative;
	width: 90%;
	max-width: 600px;
	max-height: 90vh;
	margin: 5vh auto;
	background: #1a1a1a;
	border-radius: 8px;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
	overflow: hidden;
	display: flex;
	flex-direction: column;
	z-index: 1000000;
}

.wc-rq-modal-close {
	position: absolute !important;
    top: 15px;
    right: 12px;
    width: 20px !important;
    background-color: transparent !important;
    border: none !important;
    font-size: 28px !important;
    line-height: 1 !important;
    color: #e29048 !important;
    cursor: pointer !important;
    z-index: 1000001;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: color 0.3s ease !important;
    padding: 0 !important;
}

.wc-rq-modal-close:hover {
	color: #1a1a1a;
}

.wc-rq-modal-body {
	padding: 40px;
	overflow-y: auto;
	max-height: calc(90vh - 80px);
}

/* Prevent body scroll when modal is open */
body.wc-rq-modal-open {
	overflow: hidden;
}

/* CF7 Form Styles within Modal */
.wc-rq-modal-body .wpcf7-form {
	margin: 0;
}

.wc-rq-modal-body .wpcf7-form p {
	margin-bottom: 20px;
	display: flex;
    flex-direction: column;
    gap: 10px;
}

.wc-rq-modal-body .wpcf7-form label {
	display: block;
	margin-bottom: 8px;
	font-weight: 600;
	color: #f3f3f3;
}

.wc-rq-modal-body .wpcf7-form input[type="text"],
.wc-rq-modal-body .wpcf7-form input[type="email"],
.wc-rq-modal-body .wpcf7-form input[type="tel"],
.wc-rq-modal-body .wpcf7-form textarea {
	width: 100%;
	padding: 12px;
	border: 1px solid #f1bd914f;
	border-radius: 4px;
	font-size: 14px;
	transition: border-color 0.3s ease;
	box-sizing: border-box;
}
.wc-rq-modal-body .wpcf7-form input[type="number"]{
	border: 1px solid #f1bd914f;
}

.wc-rq-modal-body .wpcf7-form input[type="text"]:focus,
.wc-rq-modal-body .wpcf7-form input[type="email"]:focus,
.wc-rq-modal-body .wpcf7-form input[type="tel"]:focus,
.wc-rq-modal-body .wpcf7-form textarea:focus {
	outline: none;
	border-color: #2271b1;
}

.wc-rq-modal-body .wpcf7-form textarea {
	resize: vertical;
	min-height: 120px;
}

.wc-rq-modal-body .wpcf7-form input[type="submit"] {
	width: 100%;
	padding: 14px 20px;
	background-color: #ba6215;
	color: #fff;
	border-radius: 5px;
	font-size: 16px;
	font-weight: 600;
	cursor: pointer;
	transition: background-color 0.3s ease, border-color 0.3s ease;
	margin-top: 20px;
}

.wc-rq-modal-body .wpcf7-form input[type="submit"]:hover {
	background-color: #2a2a2a;
	border-color: #2a2a2a;
}

.wc-rq-modal-body .wpcf7-form input[type="submit"]:disabled {
	background-color: #8c8f94;
	border-color: #8c8f94;
	cursor: not-allowed;
}

/* CF7 Response Messages */
.wc-rq-modal-body .wpcf7-response-output {
	margin-top: 20px;
	padding: 12px;
	border-radius: 4px;
}

.wc-rq-modal-body .wpcf7-mail-sent-ok {
	background-color: #d4edda;
	border: 1px solid #c3e6cb;
	color: #155724;
}

.wc-rq-modal-body .wpcf7-mail-sent-ng,
.wc-rq-modal-body .wpcf7-validation-errors,
.wc-rq-modal-body .wpcf7-spam {
	background-color: #f8d7da;
	border: 1px solid #f5c6cb;
	color: #721c24;
}

/* Responsive Styles */
@media (max-width: 768px) {
	.wc-rq-modal-content {
		width: 95%;
		margin: 2vh auto;
		max-height: 96vh;
	}
	
	.wc-rq-modal-body {
		padding: 30px 20px;
		max-height: calc(96vh - 60px);
	}
	
	.wc-rq-modal-close {
		top: 10px;
		right: 10px;
		width: 28px;
		height: 28px;
		font-size: 24px;
	}
}

/* Button Styles */
.wc-rq-open-quote-modal {
	text-decoration: none;
	display: inline-block;
}

.wc-rq-quote-button-wrapper {
	margin-top: 20px;
}

/* Animation */
@keyframes wc-rq-modal-fade-in {
	from {
		opacity: 0;
	}
	to {
		opacity: 1;
	}
}

.wc-rq-quote-modal {
	animation: wc-rq-modal-fade-in 0.3s ease;
}

.wc-rq-modal-content {
	animation: wc-rq-modal-slide-in 0.3s ease;
}

@keyframes wc-rq-modal-slide-in {
	from {
		transform: translateY(-20px);
		opacity: 0;
	}
	to {
		transform: translateY(0);
		opacity: 1;
	}
}
