/* ============================================================
   Popup Contact Form — Front-end Styles v1.0.0
   All selectors prefixed with .pcf- to prevent conflicts.
   ============================================================ */

/* ── Floating trigger button ── */
.pcf-trigger {
	position: fixed;
	bottom: 28px;
	width: 60px;
	height: 60px;
	border-radius: 50%;
	border: none;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.28);
	z-index: 9990;
	/* Hidden by default — JS adds .pcf-visible after scroll */
	opacity: 0;
	pointer-events: none;
	transform: scale(0.75);
	transition:
		opacity 0.3s ease,
		transform 0.3s ease,
		box-shadow 0.2s ease;
	will-change: opacity, transform;
	padding: 0;
	line-height: 1;
}

.pcf-trigger.pcf-pos-right { right: 28px; }
.pcf-trigger.pcf-pos-left  { left: 28px; }

.pcf-trigger.pcf-visible {
	opacity: 1;
	pointer-events: auto;
	transform: scale(1);
}

.pcf-trigger:hover {
	transform: scale(1.1);
	box-shadow: 0 6px 22px rgba(0, 0, 0, 0.36);
}

.pcf-trigger:focus-visible {
	outline: 3px solid rgba(255, 255, 255, 0.8);
	outline-offset: 3px;
}

.pcf-trigger svg {
	pointer-events: none;
	display: block;
}

/* ── Overlay ── */
.pcf-overlay {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.48);
	z-index: 9991;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.3s ease;
}

.pcf-overlay.pcf-open {
	opacity: 1;
	pointer-events: auto;
}

/* ── Slide-in panel ── */
.pcf-panel {
	position: fixed;
	top: 0;
	bottom: 0;
	width: 380px;
	max-width: 100vw;
	background: #fff;
	z-index: 9992;
	display: flex;
	flex-direction: column;
	overflow: hidden;
	transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
	will-change: transform;
}

.pcf-panel.pcf-pos-right {
	right: 0;
	transform: translateX(100%);
	box-shadow: -4px 0 24px rgba(0, 0, 0, 0.18);
}

.pcf-panel.pcf-pos-left {
	left: 0;
	transform: translateX(-100%);
	box-shadow: 4px 0 24px rgba(0, 0, 0, 0.18);
}

.pcf-panel.pcf-open {
	transform: translateX(0);
}

/* ── Panel header ── */
.pcf-panel-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 0 18px;
	height: 58px;
	flex-shrink: 0;
}

.pcf-panel-title {
	color: #fff;
	font-size: 17px;
	font-weight: 600;
	letter-spacing: 0.2px;
	line-height: 1;
}

.pcf-close {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	background: transparent;
	border: none;
	border-radius: 50%;
	cursor: pointer;
	padding: 0;
	transition: background 0.2s;
	flex-shrink: 0;
}

.pcf-close:hover {
	background: rgba(255, 255, 255, 0.22);
}

.pcf-close:focus-visible {
	outline: 2px solid rgba(255, 255, 255, 0.8);
	outline-offset: 2px;
}

.pcf-close svg {
	display: block;
	pointer-events: none;
}

/* ── Panel body ── */
.pcf-panel-body {
	flex: 1;
	overflow-y: auto;
	overflow-x: hidden;
	padding: 24px 20px;
	-webkit-overflow-scrolling: touch;
}

/* "No form" admin notice */
.pcf-no-form {
	padding: 16px;
	background: #fff3cd;
	border-left: 4px solid #ffc107;
	border-radius: 4px;
	font-size: 13px;
	color: #555;
	margin: 0;
}

/* ── CF7 overrides inside panel ── */
.pcf-panel-body .wpcf7 {
	margin: 0;
}

.pcf-panel-body .wpcf7-form {
	display: flex;
	flex-direction: column;
	gap: 0;
}

.pcf-panel-body .wpcf7-form p {
	margin: 0 0 14px;
}

.pcf-panel-body .wpcf7-form p:last-child {
	margin-bottom: 0;
}

.pcf-panel-body input[type="text"],
.pcf-panel-body input[type="email"],
.pcf-panel-body input[type="tel"],
.pcf-panel-body input[type="url"],
.pcf-panel-body input[type="number"],
.pcf-panel-body textarea,
.pcf-panel-body select {
	width: 100%;
	box-sizing: border-box;
	padding: 10px 14px;
	border: 1px solid #d1d5db;
	border-radius: 7px;
	font-size: 14px;
	color: #1d2327;
	background: #fafafa;
	transition: border-color 0.2s, box-shadow 0.2s;
	-webkit-appearance: none;
	appearance: none;
}

.pcf-panel-body input:focus,
.pcf-panel-body textarea:focus,
.pcf-panel-body select:focus {
	outline: none;
	border-color: #2196F3;
	box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.15);
	background: #fff;
}

.pcf-panel-body textarea {
	resize: vertical;
	min-height: 100px;
}

.pcf-panel-body .wpcf7-submit {
	display: block;
	width: 100%;
	padding: 12px 20px;
	background: #2196F3;
	color: #fff;
	border: none;
	border-radius: 30px;
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.2s, transform 0.1s;
	letter-spacing: 0.3px;
}

.pcf-panel-body .wpcf7-submit:hover {
	background: #1976D2;
}

.pcf-panel-body .wpcf7-submit:active {
	transform: scale(0.98);
}

/* CF7 validation messages */
.pcf-panel-body .wpcf7-not-valid-tip {
	font-size: 12px;
	color: #e53935;
	display: block;
	margin-top: 4px;
}

.pcf-panel-body .wpcf7-response-output {
	margin: 14px 0 0;
	padding: 10px 14px;
	border-radius: 6px;
	font-size: 13px;
}

/* ── Responsive ── */
@media ( max-width: 480px ) {
	.pcf-panel {
		width: 100vw;
	}
	.pcf-trigger.pcf-pos-right { right: 16px; bottom: 20px; }
	.pcf-trigger.pcf-pos-left  { left: 16px;  bottom: 20px; }
}
