/* YBT Smart WhatsApp Chat Pro — Frontend styles */

#ybt-swc-root {
	--ybt-swc-accent: #25D366;
	--ybt-swc-accent-dark: #128C7E;
	position: fixed;
	bottom: 20px;
	z-index: 999999;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

#ybt-swc-root.ybt-swc-pos-right { right: 20px; }
#ybt-swc-root.ybt-swc-pos-left { left: 20px; }

/* Bubble */
.ybt-swc-bubble {
	position: relative;
	width: 60px;
	height: 60px;
	border-radius: 50%;
	border: none;
	cursor: pointer;
	background: var(--ybt-swc-accent);
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.ybt-swc-bubble:hover { transform: scale(1.06); box-shadow: 0 8px 26px rgba(0, 0, 0, 0.3); }
.ybt-swc-bubble:active { transform: scale(0.97); }
.ybt-swc-bubble-icon { display: flex; }

.ybt-swc-status-dot {
	position: absolute;
	top: 2px;
	right: 2px;
	width: 14px;
	height: 14px;
	border-radius: 50%;
	background: #34d058;
	border: 2px solid #fff;
}
.ybt-swc-status-dot.is-offline { background: #a0a0a0; }

/* Welcome teaser bubble */
.ybt-swc-teaser {
	position: fixed;
	bottom: 92px;
	width: 240px;
	max-width: calc(100vw - 32px);
	box-sizing: border-box;
	background: #fff;
	color: #1b1b1b;
	padding: 14px 34px 14px 16px;
	border-radius: 16px;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
	font-size: 13.5px;
	line-height: 1.5;
	cursor: pointer;
	z-index: 1;
	animation: ybt-swc-fade-in 0.3s ease;
}
.ybt-swc-pos-right .ybt-swc-teaser { right: 20px; }
.ybt-swc-pos-left .ybt-swc-teaser { left: 20px; }
.ybt-swc-teaser-close {
	position: absolute;
	top: 8px;
	right: 8px;
	width: 22px;
	height: 22px;
	border-radius: 50%;
	background: rgba(0, 0, 0, 0.05);
	border: none;
	color: #666;
	font-size: 15px;
	line-height: 1;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
}
.ybt-swc-teaser-close:hover { background: rgba(0, 0, 0, 0.12); }

/* Popup shell */
.ybt-swc-popup {
	position: fixed;
	bottom: 96px;
	width: min(380px, calc(100vw - 32px));
	max-height: min(600px, calc(100vh - 140px));
	display: flex;
	flex-direction: column;
	border-radius: 20px;
	overflow: hidden;
	background: rgba(255, 255, 255, 0.72);
	backdrop-filter: blur(18px) saturate(160%);
	-webkit-backdrop-filter: blur(18px) saturate(160%);
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
	border: 1px solid rgba(255, 255, 255, 0.4);
	opacity: 0;
	transform: translateY(16px) scale(0.98);
	pointer-events: none;
	transition: opacity 0.22s ease, transform 0.22s ease;
}
.ybt-swc-pos-right .ybt-swc-popup { right: 0; }
.ybt-swc-pos-left .ybt-swc-popup { left: 0; }

.ybt-swc-popup.is-open {
	opacity: 1;
	transform: translateY(0) scale(1);
	pointer-events: auto;
}

.ybt-swc-popup-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 14px 16px;
	background: linear-gradient(135deg, var(--ybt-swc-accent-dark), var(--ybt-swc-accent));
	color: #fff;
	flex-shrink: 0;
}
.ybt-swc-header-info { display: flex; align-items: center; gap: 10px; }
.ybt-swc-avatar {
	width: 40px;
	height: 40px;
	border-radius: 50%;
	overflow: hidden;
	background: rgba(255, 255, 255, 0.25);
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}
.ybt-swc-avatar img { width: 100%; height: 100%; object-fit: cover; }
.ybt-swc-avatar-fallback { font-size: 12px; font-weight: 700; }
.ybt-swc-header-text { display: flex; flex-direction: column; line-height: 1.25; }
.ybt-swc-header-text strong { font-size: 14.5px; }
.ybt-swc-header-status { font-size: 12px; opacity: 0.9; }

.ybt-swc-close {
	background: transparent;
	border: none;
	color: #fff;
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
	padding: 4px 6px;
	opacity: 0.9;
}
.ybt-swc-close:hover { opacity: 1; }

.ybt-swc-progress {
	height: 3px;
	background: rgba(0, 0, 0, 0.08);
	flex-shrink: 0;
}
.ybt-swc-progress-bar {
	height: 100%;
	width: 0%;
	background: var(--ybt-swc-accent);
	transition: width 0.25s ease;
}

.ybt-swc-body {
	padding: 18px 16px 16px;
	overflow-y: auto;
	flex: 1;
	scroll-behavior: smooth;
}

.ybt-swc-hp-field {
	position: absolute !important;
	left: -9999px !important;
	width: 1px;
	height: 1px;
	opacity: 0;
}

/* Step content */
.ybt-swc-step { animation: ybt-swc-fade-in 0.2s ease; }
.ybt-swc-step-eyebrow {
	font-size: 11.5px;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: #128C7E;
	font-weight: 700;
	margin: 0 0 6px;
}
.ybt-swc-step-title { font-size: 16px; font-weight: 700; margin: 0 0 4px; color: #1b1b1b; }
.ybt-swc-step-subtitle { font-size: 13.5px; color: #4b4b4b; margin: 0 0 14px; line-height: 1.45; }

.ybt-swc-option-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 8px;
	margin-bottom: 6px;
}
.ybt-swc-option-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 6px; }

.ybt-swc-option-btn {
	display: flex;
	align-items: center;
	gap: 8px;
	text-align: left;
	padding: 10px 12px;
	border-radius: 12px;
	border: 1px solid rgba(0, 0, 0, 0.08);
	background: rgba(255, 255, 255, 0.65);
	cursor: pointer;
	font-size: 13.5px;
	color: #1b1b1b;
	transition: border-color 0.15s ease, background 0.15s ease, transform 0.1s ease;
}
.ybt-swc-option-btn:hover { border-color: var(--ybt-swc-accent); background: rgba(37, 211, 102, 0.08); }
.ybt-swc-option-btn:active { transform: scale(0.98); }
.ybt-swc-option-btn.is-selected { border-color: var(--ybt-swc-accent); background: rgba(37, 211, 102, 0.14); font-weight: 600; }

.ybt-swc-field { margin-bottom: 14px; }
.ybt-swc-field label {
	display: block;
	font-size: 13px;
	font-weight: 600;
	margin-bottom: 6px;
	color: #1b1b1b;
}
.ybt-swc-field input[type="text"],
.ybt-swc-field input[type="tel"],
.ybt-swc-field select,
.ybt-swc-field textarea {
	width: 100%;
	box-sizing: border-box;
	padding: 10px 12px;
	border-radius: 10px;
	border: 1px solid rgba(0, 0, 0, 0.14);
	font-size: 14px;
	background: rgba(255, 255, 255, 0.85);
	font-family: inherit;
}
.ybt-swc-field input:focus,
.ybt-swc-field select:focus,
.ybt-swc-field textarea:focus {
	outline: none;
	border-color: var(--ybt-swc-accent);
	box-shadow: 0 0 0 3px rgba(37, 211, 102, 0.15);
}
.ybt-swc-field textarea { resize: vertical; min-height: 80px; }
.ybt-swc-error-text { color: #d63638; font-size: 12px; margin-top: 4px; display: none; }
.ybt-swc-field.has-error input,
.ybt-swc-field.has-error select,
.ybt-swc-field.has-error textarea { border-color: #d63638; }
.ybt-swc-field.has-error .ybt-swc-error-text { display: block; }

.ybt-swc-summary {
	background: rgba(255, 255, 255, 0.6);
	border-radius: 12px;
	padding: 12px;
	font-size: 13px;
	line-height: 1.6;
	margin-bottom: 14px;
}
.ybt-swc-summary strong { color: #128C7E; }

.ybt-swc-nav {
	display: flex;
	gap: 10px;
	margin-top: 6px;
}
.ybt-swc-btn {
	flex: 1;
	padding: 11px 14px;
	border-radius: 12px;
	border: none;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	transition: filter 0.15s ease, transform 0.1s ease;
}
.ybt-swc-btn:active { transform: scale(0.98); }
.ybt-swc-btn-primary { background: var(--ybt-swc-accent); color: #fff; }
.ybt-swc-btn-primary:hover { filter: brightness(1.05); }
.ybt-swc-btn-primary:disabled { opacity: 0.6; cursor: not-allowed; }
.ybt-swc-btn-secondary { background: rgba(0, 0, 0, 0.06); color: #1b1b1b; flex: 0 0 auto; }
.ybt-swc-btn-secondary:hover { background: rgba(0, 0, 0, 0.1); }

.ybt-swc-btn-wa {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	background: var(--ybt-swc-accent);
}

.ybt-swc-manual-wa-link {
	text-align: center;
	margin-top: 10px;
}
.ybt-swc-manual-wa-link a {
	color: var(--ybt-swc-accent-dark);
	font-weight: 600;
	text-decoration: underline;
}

@keyframes ybt-swc-fade-in {
	from { opacity: 0; transform: translateY(6px); }
	to { opacity: 1; transform: translateY(0); }
}

/* Mobile: full-width sheet */
@media (max-width: 480px) {
	#ybt-swc-root.ybt-swc-pos-right { right: 16px; left: auto; bottom: 16px; }
	#ybt-swc-root.ybt-swc-pos-left { left: 16px; right: auto; bottom: 16px; }
	.ybt-swc-pos-right .ybt-swc-teaser { right: 16px; }
	.ybt-swc-pos-left .ybt-swc-teaser { left: 16px; }
	.ybt-swc-popup {
		left: 0 !important;
		right: 0 !important;
		width: auto;
		bottom: 88px;
		max-height: calc(100vh - 120px);
	}
}

/* Body scroll lock class toggled while popup is open on small screens */
body.ybt-swc-locked { overflow: hidden; }

/* ---------------------------------------------------------------------
   [ybt_swc_form] — inline embedded form (not floating), placed directly
   in page/post content via shortcode.
--------------------------------------------------------------------- */
.ybt-swc-embed {
	--ybt-swc-accent: #25D366;
	--ybt-swc-accent-dark: #128C7E;
	max-width: 480px;
	margin: 24px 0;
	padding: 20px;
	border-radius: 16px;
	background: #fff;
	border: 1px solid rgba(0, 0, 0, 0.08);
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	position: relative;
}
.ybt-swc-embed-title {
	margin: 0 0 14px;
	font-size: 18px;
	font-weight: 700;
	color: #1b1b1b;
}
.ybt-swc-embed-progress {
	height: 3px;
	background: rgba(0, 0, 0, 0.08);
	border-radius: 2px;
	margin-bottom: 16px;
	overflow: hidden;
}
.ybt-swc-embed-progress-bar {
	height: 100%;
	width: 0%;
	background: var(--ybt-swc-accent);
	transition: width 0.25s ease;
}
.ybt-swc-embed-body { position: relative; }

/* ---------------------------------------------------------------------
   [ybt_swc_trigger] — a link anywhere in content that opens the
   floating popup.
--------------------------------------------------------------------- */
.ybt-swc-trigger-link {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 10px 20px;
	background: #25D366;
	color: #fff !important;
	font-weight: 600;
	border-radius: 999px;
	text-decoration: none !important;
	cursor: pointer;
	transition: filter 0.15s ease, transform 0.1s ease;
}
.ybt-swc-trigger-link:hover { filter: brightness(1.05); }
.ybt-swc-trigger-link:active { transform: scale(0.98); }
