/**
 * LeadRat Forms CSS
 *
 * Styles for floating button, popup modal, and form tags.
 *
 * Modified by LeadRat 2026-03-27: New file — frontend styles.
 */

/* ── Floating button ──────────────────────────────────── */
.leadrat-floating-btn {
	position: fixed;
	z-index: 9999;
	padding: 14px 22px;
	background: #e74c3c;
	color: #fff;
	border: none;
	border-radius: 4px;
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
	transition: background 0.2s, transform 0.1s;
}

.leadrat-floating-btn:hover {
	background: #c0392b;
	transform: translateY(-2px);
}

.leadrat-floating-bottom-right {
	bottom: 24px;
	right: 24px;
}

.leadrat-floating-bottom-left {
	bottom: 24px;
	left: 24px;
}

/* ── Popup trigger button ─────────────────────────────── */
.leadrat-popup-btn {
	display: inline-block;
	padding: 12px 20px;
	background: #e74c3c;
	color: #fff;
	border: none;
	border-radius: 4px;
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.2s;
}

.leadrat-popup-btn:hover {
	background: #c0392b;
}

/* ── Modal overlay ────────────────────────────────────── */
.leadrat-modal-overlay {
	position: fixed;
	inset: 0;
	z-index: 10000;
	background: rgba(0, 0, 0, 0.6);
	display: flex;
	align-items: center;
	justify-content: center;
}

.leadrat-modal-box {
	position: relative;
	background: #fff;
	border-radius: 8px;
	padding: 32px 36px;
	max-width: 520px;
	width: 90%;
	max-height: 90vh;
	overflow-y: auto;
	box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.leadrat-modal-close {
	position: absolute;
	top: 12px;
	right: 16px;
	background: none;
	border: none;
	font-size: 24px;
	line-height: 1;
	cursor: pointer;
	color: #555;
	padding: 0 4px;
}

.leadrat-modal-close:hover {
	color: #000;
}

.leadrat-modal-body .wpcf7-form {
	margin: 0;
}

/* ── Form field reset & consistent styling ────────────── */

/* Labels */
.wpcf7 label {
	display: block;
	margin-bottom: 16px;
	font-size: 14px;
	font-weight: 500;
	color: #333;
	line-height: 1.4;
}

/*
 * Single rule covers ALL field types including tel and bare select.
 * Scoped to .wpcf7 (the outer wrapper div CF7 always renders).
 * !important overrides theme stylesheet and browser UA on tel/select.
 */
.wpcf7 input[type="text"],
.wpcf7 input[type="email"],
.wpcf7 input[type="tel"],
.wpcf7 input[type="url"],
.wpcf7 input[type="number"],
.wpcf7 select {
	display: block !important;
	width: 100% !important;
	height: 44px !important;
	padding: 0 12px !important;
	margin: 4px 0 0 !important;
	font-size: 14px !important;
	font-family: inherit !important;
	color: #333 !important;
	background: #fff !important;
	border: 1px solid #d0d0d0 !important;
	border-radius: 4px !important;
	box-sizing: border-box !important;
	outline: none !important;
	box-shadow: none !important;
	line-height: normal !important;
	transition: border-color 0.15s, box-shadow 0.15s;
	-webkit-appearance: none !important;
	-moz-appearance: none !important;
	appearance: none !important;
}

/* Custom dropdown arrow for select */
.wpcf7 select {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%23666' d='M5 6L0 0h10z'/%3E%3C/svg%3E") !important;
	background-repeat: no-repeat !important;
	background-position: right 12px center !important;
	padding-right: 32px !important;
	cursor: pointer;
}

/* Textarea — taller, same border */
.wpcf7 textarea {
	display: block !important;
	width: 100% !important;
	height: 100px !important;
	padding: 10px 12px !important;
	margin: 4px 0 0 !important;
	font-size: 14px !important;
	font-family: inherit !important;
	color: #333 !important;
	background: #fff !important;
	border: 1px solid #d0d0d0 !important;
	border-radius: 4px !important;
	box-sizing: border-box !important;
	outline: none !important;
	box-shadow: none !important;
	resize: vertical;
	-webkit-appearance: none !important;
	appearance: none !important;
}

/* Focus — red ring, same for all */
.wpcf7 input[type="text"]:focus,
.wpcf7 input[type="email"]:focus,
.wpcf7 input[type="tel"]:focus,
.wpcf7 input[type="url"]:focus,
.wpcf7 input[type="number"]:focus,
.wpcf7 select:focus,
.wpcf7 textarea:focus {
	border-color: #e74c3c !important;
	box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.12) !important;
	outline: none !important;
}

/* Submit button — high-specificity to beat theme overrides */
.wpcf7 input[type="submit"],
.wpcf7 input.wpcf7-submit,
.leadrat-modal-box .wpcf7 input[type="submit"],
.leadrat-modal-body .wpcf7 input[type="submit"],
#leadrat-modal input[type="submit"] {
	display: inline-block !important;
	height: 44px !important;
	padding: 0 28px !important;
	background: #e74c3c !important;
	background-color: #e74c3c !important;
	color: #fff !important;
	border: none !important;
	border-radius: 4px !important;
	font-size: 13px !important;
	font-family: inherit !important;
	font-weight: 700 !important;
	letter-spacing: 0.08em !important;
	text-transform: uppercase !important;
	cursor: pointer !important;
	outline: none !important;
	box-shadow: none !important;
	transition: background 0.2s;
	-webkit-appearance: none !important;
	-moz-appearance: none !important;
	appearance: none !important;
}

.wpcf7 input[type="submit"]:hover,
.leadrat-modal-box .wpcf7 input[type="submit"]:hover,
#leadrat-modal input[type="submit"]:hover {
	background: #c0392b !important;
	background-color: #c0392b !important;
}

.wpcf7 input[type="submit"]:disabled,
#leadrat-modal input[type="submit"]:disabled {
	background: #aaa !important;
	background-color: #aaa !important;
	cursor: not-allowed !important;
}

/* Validation error */
.wpcf7 .wpcf7-not-valid-tip {
	display: block;
	margin-top: 4px;
	font-size: 12px;
	color: #e74c3c;
}

.wpcf7 .wpcf7-not-valid {
	border-color: #e74c3c !important;
}

/* Response message */
.wpcf7 .wpcf7-response-output {
	margin-top: 12px;
	padding: 10px 14px;
	font-size: 13px;
	border-radius: 4px;
	border: 1px solid #d0d0d0;
}
