/**
 * WP Request Quote - Frontend Stylesheet
 * Version: 2.0.0
 */

/* ============================================================
   Popup Overlay
   ============================================================ */

#wqrq-popup-overlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.65);
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1rem;
	box-sizing: border-box;
}

.wqrq-popup-content {
	background: #fff;
	padding: 2rem;
	border-radius: 8px;
	width: 100%;
	max-width: 520px;
	max-height: 90vh;
	overflow-y: auto;
	position: relative;
	box-shadow: 0 8px 32px rgba(0, 0, 0, 0.22);
}

/* ============================================================
   Popup heading & close button
   ============================================================ */

#wqrq-popup-heading {
	margin-top: 0;
	margin-bottom: 1.25rem;
	font-size: 1.4rem;
	color: #222;
}

.wqrq-popup-close {
	position: absolute;
	top: 1rem;
	right: 1rem;
	background: none;
	border: none;
	font-size: 1.6rem;
	line-height: 1;
	cursor: pointer;
	color: #666;
	padding: 0.2rem 0.5rem;
	border-radius: 4px;
	transition: color 0.2s, background 0.2s;
}

.wqrq-popup-close:hover,
.wqrq-popup-close:focus {
	color: #c0392b;
	background: #ffeaea;
	outline: none;
}

/* ============================================================
   Form fields (shared: popup + quote-cart page)
   ============================================================ */

.wqrq-form-fields {
	margin-bottom: 1rem;
}

.wqrq-form-group {
	margin-bottom: 1rem;
}

.wqrq-form-group label {
	display: block;
	margin-bottom: 0.35rem;
	font-weight: 600;
	font-size: 0.9rem;
	color: #444;
}

.wqrq-form-group label .required {
	color: #c0392b;
	margin-left: 2px;
}

.wqrq-form-group input[type="text"],
.wqrq-form-group input[type="email"],
.wqrq-form-group input[type="number"],
.wqrq-form-group input[type="tel"],
.wqrq-form-group textarea,
.wqrq-form-group select {
	width: 100%;
	padding: 0.6rem 0.75rem;
	border: 1px solid #ccc;
	border-radius: 5px;
	font-size: 0.95rem;
	box-sizing: border-box;
	transition: border-color 0.2s;
	color: #333;
	background: #fff;
}

.wqrq-form-group input[type="text"]:focus,
.wqrq-form-group input[type="email"]:focus,
.wqrq-form-group input[type="number"]:focus,
.wqrq-form-group input[type="tel"]:focus,
.wqrq-form-group textarea:focus,
.wqrq-form-group select:focus {
	border-color: #3a7bd5;
	outline: none;
	box-shadow: 0 0 0 2px rgba(58, 123, 213, 0.15);
}

.wqrq-form-group textarea {
	resize: vertical;
	min-height: 90px;
}

/* Submit button */
.wqrq-submit {
	margin-top: 0.5rem;
}

/* ============================================================
   Form response messages
   ============================================================ */

.wqrq-form-response {
	padding: 0.75rem 1rem;
	border-radius: 5px;
	font-size: 0.95rem;
	font-weight: 600;
}

.wqrq-form-response.wqrq-success {
	background: #d4edda;
	color: #155724;
	border: 1px solid #b8dfc4;
}

.wqrq-form-response.wqrq-error {
	background: #f8d7da;
	color: #721c24;
	border: 1px solid #f1b0b7;
}

/* ============================================================
   Inline floating notice (replaces alert())
   ============================================================ */

#wqrq-inline-notice {
	position: fixed;
	top: 1.5rem;
	right: 1.5rem;
	z-index: 9999999;
	padding: 0.9rem 1.4rem;
	border-radius: 6px;
	font-size: 0.95rem;
	font-weight: 600;
	max-width: 340px;
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
	display: none; /* JS controls visibility */
}

#wqrq-inline-notice.wqrq-success {
	background: #d4edda;
	color: #155724;
	border-left: 4px solid #28a745;
}

#wqrq-inline-notice.wqrq-error {
	background: #f8d7da;
	color: #721c24;
	border-left: 4px solid #dc3545;
}

/* ============================================================
   Request a quote checkbox on product page
   ============================================================ */

.wqrq-checkbox-wrapper {
	margin: 0.75rem 0;
}

.wqrq-checkbox-wrapper label {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	font-size: 0.95rem;
	cursor: pointer;
	user-select: none;
}

.wqrq-checkbox-wrapper input[type="checkbox"] {
	width: 1.1rem;
	height: 1.1rem;
	cursor: pointer;
	flex-shrink: 0;
}

/* ============================================================
   Login message (shown when guest quotes disabled)
   ============================================================ */

.wqrq-login-message {
	text-align: center;
	padding: 1.5rem 0;
}

.wqrq-login-message p {
	margin-bottom: 1rem;
	font-size: 1rem;
	color: #555;
}

/* ============================================================
   Quote Cart page table
   ============================================================ */

.wqrq-quote-cart-wrapper .shop_table td,
.wqrq-quote-cart-wrapper .shop_table th {
	vertical-align: middle;
}

.wqrq-quote-cart-wrapper .remove.wqrq-remove-item {
	color: #c0392b;
	font-size: 1.3rem;
	text-decoration: none;
	line-height: 1;
	transition: color 0.2s;
}

.wqrq-quote-cart-wrapper .remove.wqrq-remove-item:hover {
	color: #922b21;
}

.wqrq-cart-form-section {
	margin-top: 2.5rem;
}

.wqrq-cart-form-section h2 {
	margin-bottom: 1.25rem;
}

/* ============================================================
   Responsive
   ============================================================ */

@media (max-width: 480px) {
	.wqrq-popup-content {
		padding: 1.25rem;
	}

	#wqrq-inline-notice {
		top: auto;
		bottom: 1rem;
		right: 1rem;
		left: 1rem;
		max-width: none;
	}
}
