/**
 * Laco Marketing Staff & Leads Attribution - Frontend CSS
 */

:root {
	--laco-staff-primary: #357647;
	--laco-staff-primary-dark: #225330;
	--laco-staff-accent: #70a233;
	--laco-staff-bg-light: #f8faf9;
	--laco-staff-border: #e2e8f0;
	--laco-staff-text: #0f172a;
	--laco-staff-text-muted: #64748b;
}

/* ========================================================
   1. SHORTCODE SALES CARD
   ======================================================== */
.laco-staff-card-box {
	background: #ffffff;
	border: 1px solid var(--laco-staff-border);
	border-radius: 12px;
	padding: 24px;
	margin: 20px 0;
	display: flex;
	gap: 24px;
	align-items: center;
	box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
	transition: transform 0.3s ease, box-shadow 0.3s ease;
	position: relative;
	overflow: hidden;
}

.laco-staff-card-box::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	width: 4px;
	height: 100%;
	background: var(--laco-staff-primary);
}

.laco-staff-card-box:hover {
	transform: translateY(-2px);
	box-shadow: 0 8px 25px rgba(53, 118, 71, 0.12);
}

.laco-staff-card-avatar {
	position: relative;
	width: 100px;
	height: 100px;
	flex-shrink: 0;
}

.laco-staff-card-avatar img,
.laco-avatar-placeholder {
	width: 100%;
	height: 100%;
	border-radius: 50%;
	object-fit: cover;
	border: 3px solid #e8f5e9;
	background: #f1f5f9;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 36px;
}

.laco-staff-online-status {
	position: absolute;
	bottom: 5px;
	right: 5px;
	width: 16px;
	height: 16px;
	background: #22c55e;
	border: 2px solid #ffffff;
	border-radius: 50%;
	box-shadow: 0 0 8px rgba(34, 197, 94, 0.6);
}

.laco-staff-card-info {
	flex-grow: 1;
}

.laco-staff-card-badge {
	display: inline-block;
	background: #e8f5e9;
	color: var(--laco-staff-primary);
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	padding: 3px 10px;
	border-radius: 20px;
	margin-bottom: 6px;
}

.laco-staff-card-name {
	font-size: 20px;
	font-weight: 700;
	color: var(--laco-staff-text);
	margin: 0 0 4px 0;
	line-height: 1.2;
}

.laco-staff-card-pos {
	font-size: 13px;
	color: var(--laco-staff-primary);
	font-weight: 600;
	margin: 0 0 8px 0;
}

.laco-staff-card-sub {
	font-size: 13px;
	color: var(--laco-staff-text-muted);
	margin: 0 0 16px 0;
	line-height: 1.5;
}

.laco-staff-card-actions {
	display: flex;
	gap: 12px;
	flex-wrap: wrap;
}

.laco-btn-action {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 9px 18px;
	border-radius: 6px;
	font-size: 13px;
	font-weight: 600;
	text-decoration: none !important;
	transition: all 0.2s ease;
}

.laco-btn-call {
	background: var(--laco-staff-primary);
	color: #ffffff !important;
}

.laco-btn-call:hover {
	background: var(--laco-staff-primary-dark);
	transform: translateY(-1px);
	box-shadow: 0 4px 10px rgba(53, 118, 71, 0.3);
}

.laco-btn-zalo {
	background: #0068ff;
	color: #ffffff !important;
}

.laco-btn-zalo:hover {
	background: #0052cc;
	transform: translateY(-1px);
	box-shadow: 0 4px 10px rgba(0, 104, 255, 0.3);
}

/* Compact layout */
.layout-compact {
	padding: 14px 18px;
	gap: 16px;
}
.layout-compact .laco-staff-card-avatar {
	width: 60px;
	height: 60px;
}
.layout-compact .laco-staff-card-name {
	font-size: 16px;
}
.layout-compact .laco-staff-card-sub {
	display: none;
}

/* ========================================================
   2. FLOATING CONTACT WIDGET (Góc màn hình)
   ======================================================== */
#laco-floating-contact-widget {
	position: fixed;
	bottom: 25px;
	z-index: 99990;
	font-family: inherit;
}

#laco-floating-contact-widget.position-bottom-right {
	right: 25px;
}

#laco-floating-contact-widget.position-bottom-left {
	left: 25px;
}

.laco-floating-main-btn {
	width: 62px;
	height: 62px;
	border-radius: 50%;
	background: var(--laco-staff-primary);
	cursor: pointer;
	position: relative;
	box-shadow: 0 6px 20px rgba(53, 118, 71, 0.4);
	display: flex;
	align-items: center;
	justify-content: center;
	transition: transform 0.25s ease;
}

.laco-floating-main-btn:hover {
	transform: scale(1.08);
}

.laco-floating-avatar {
	width: 52px;
	height: 52px;
	border-radius: 50%;
	overflow: hidden;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #ffffff;
	border: 2px solid #ffffff;
	z-index: 2;
}

.laco-floating-avatar img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.laco-floating-icon {
	font-size: 24px;
}

.laco-floating-pulse {
	position: absolute;
	top: -4px;
	left: -4px;
	right: -4px;
	bottom: -4px;
	border-radius: 50%;
	border: 2px solid var(--laco-staff-accent);
	animation: lacoPulseAnim 1.8s infinite cubic-bezier(0.45, 0, 0.2, 1);
	z-index: 1;
}

@keyframes lacoPulseAnim {
	0% {
		transform: scale(0.95);
		opacity: 0.9;
	}
	70% {
		transform: scale(1.25);
		opacity: 0;
	}
	100% {
		transform: scale(1.25);
		opacity: 0;
	}
}

/* Floating Popup Menu */
.laco-floating-popup {
	display: none;
	position: absolute;
	bottom: 75px;
	width: 290px;
	background: #ffffff;
	border-radius: 12px;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
	border: 1px solid var(--laco-staff-border);
	overflow: hidden;
	animation: lacoFadeUp 0.25s ease;
	z-index: 99991;
}

#laco-floating-contact-widget.position-bottom-right .laco-floating-popup {
	right: 0;
}

#laco-floating-contact-widget.position-bottom-left .laco-floating-popup {
	left: 0;
}

@keyframes lacoFadeUp {
	from {
		opacity: 0;
		transform: translateY(10px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.laco-floating-header {
	background: linear-gradient(135deg, var(--laco-staff-primary), var(--laco-staff-primary-dark));
	color: #ffffff;
	padding: 14px 16px;
	display: flex;
	align-items: center;
	gap: 12px;
	position: relative;
}

.laco-floating-header-avatar {
	width: 44px;
	height: 44px;
	border-radius: 50%;
	overflow: hidden;
	border: 2px solid #ffffff;
	background: #ffffff;
	flex-shrink: 0;
}

.laco-floating-header-avatar img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.laco-floating-header-info {
	flex-grow: 1;
	line-height: 1.2;
}

.laco-floating-header-info strong {
	display: block;
	font-size: 15px;
	color: #ffffff;
}

.laco-floating-badge {
	font-size: 11px;
	color: #dcfce7;
}

.laco-floating-close {
	background: none;
	border: none;
	color: #ffffff;
	font-size: 20px;
	cursor: pointer;
	padding: 0;
	line-height: 1;
	opacity: 0.8;
}

.laco-floating-close:hover {
	opacity: 1;
}

.laco-floating-body {
	padding: 16px;
}

.laco-floating-act {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 10px 12px;
	border-radius: 8px;
	text-decoration: none !important;
	margin-bottom: 8px;
	transition: transform 0.2s ease, background 0.2s ease;
}

.laco-act-phone {
	background: #f0fdf4;
	border: 1px solid #bbf7d0;
	color: var(--laco-staff-primary) !important;
}

.laco-act-phone:hover {
	background: #dcfce7;
	transform: translateX(3px);
}

.laco-act-zalo {
	background: #eff6ff;
	border: 1px solid #bfdbfe;
	color: #1e40af !important;
	margin-bottom: 0;
}

.laco-act-zalo:hover {
	background: #dbeafe;
	transform: translateX(3px);
}

.laco-act-icon {
	font-size: 22px;
}

.laco-act-text small {
	display: block;
	font-size: 11px;
	color: #64748b;
}

.laco-act-text strong {
	font-size: 14px;
}

/* ========================================================
   3. RESPONSIVE & PRINT MEDIA
   ======================================================== */
@media (max-width: 600px) {
	.laco-staff-card-box {
		flex-direction: column;
		text-align: center;
		padding: 18px;
	}
	.laco-staff-card-avatar {
		margin: 0 auto;
	}
	.laco-staff-card-actions {
		justify-content: center;
	}
	#laco-floating-contact-widget {
		bottom: 15px;
	}
	#laco-floating-contact-widget.position-bottom-right {
		right: 15px;
	}
	#laco-floating-contact-widget.position-bottom-left {
		left: 15px;
	}
	.laco-floating-popup {
		width: 270px;
	}
}

@media print {
	#laco-floating-contact-widget,
	.laco-staff-modal-backdrop {
		display: none !important;
	}
}

/* ========================================================
   4. SHORTCODE NÚT BẤM ĐĂNG KÝ TƯ VẤN: [laco_consult_button]
   ======================================================== */
.laco-btn-consult-trigger {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	font-weight: 700;
	border-radius: 8px;
	text-decoration: none;
	cursor: pointer;
	line-height: 1.4;
	transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
	box-sizing: border-box;
}

.laco-btn-consult-trigger:hover {
	transform: translateY(-2px);
	box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.laco-btn-consult-trigger:active {
	transform: translateY(0);
}

/* Biến thể Style */
.laco-btn-consult-trigger.style-primary {
	background: linear-gradient(135deg, var(--laco-staff-primary), var(--laco-staff-accent));
	color: #ffffff;
	border: 2px solid transparent;
	box-shadow: 0 6px 18px rgba(53, 118, 71, 0.35);
}

.laco-btn-consult-trigger.style-primary:hover {
	background: linear-gradient(135deg, var(--laco-staff-primary-dark), var(--laco-staff-primary));
	box-shadow: 0 8px 24px rgba(53, 118, 71, 0.45);
	color: #ffffff;
}

.laco-btn-consult-trigger.style-accent {
	background: var(--laco-staff-accent);
	color: #ffffff;
	border: 2px solid transparent;
}

.laco-btn-consult-trigger.style-accent:hover {
	background: #5d8b28;
	color: #ffffff;
}

.laco-btn-consult-trigger.style-outline {
	background: transparent;
	color: var(--laco-staff-primary);
	border: 2px solid var(--laco-staff-primary);
}

.laco-btn-consult-trigger.style-outline:hover {
	background: #f0fdf4;
	color: var(--laco-staff-primary-dark);
}

.laco-btn-consult-trigger.style-white {
	background: #ffffff;
	color: var(--laco-staff-primary);
	border: 2px solid var(--laco-staff-primary);
}

.laco-btn-consult-trigger.style-white:hover {
	background: #f0fdf4;
	color: var(--laco-staff-primary-dark);
}

/* Kích thước */
.laco-btn-consult-trigger.size-small {
	padding: 8px 16px;
	font-size: 13px;
}

.laco-btn-consult-trigger.size-normal {
	padding: 12px 24px;
	font-size: 15px;
}

.laco-btn-consult-trigger.size-large {
	padding: 16px 32px;
	font-size: 17px;
}

.laco-btn-consult-trigger.is-full-width {
	width: 100%;
	max-width: 100%;
	display: flex;
}

/* ========================================================
   5. POPUP MODAL ĐĂNG KÝ TƯ VẤN TOÀN CỤC (#laco-staff-consult-modal)
   ======================================================== */
.laco-staff-modal-backdrop {
	position: fixed;
	inset: 0;
	background: rgba(15, 23, 42, 0.65);
	backdrop-filter: blur(4px);
	z-index: 999999;
	display: none;
	align-items: center;
	justify-content: center;
	padding: 20px;
	box-sizing: border-box;
}

.laco-staff-modal-backdrop.is-open {
	display: flex;
}

.laco-staff-modal-dialog {
	background: #ffffff;
	width: 100%;
	max-width: 520px;
	max-height: calc(100vh - 40px);
	border-radius: 16px;
	overflow: hidden;
	box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
	position: relative;
	display: flex;
	flex-direction: column;
	animation: lacoModalSlideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
	box-sizing: border-box;
}

.laco-staff-modal-dialog form {
	display: flex;
	flex-direction: column;
	max-height: 100%;
	overflow: hidden;
	flex: 1 1 auto;
	margin: 0;
}

.laco-staff-modal-header {
	background: linear-gradient(135deg, var(--laco-staff-primary), var(--laco-staff-primary-dark));
	color: #ffffff;
	padding: 20px 24px;
	position: relative;
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
}

.laco-staff-modal-header-text h3 {
	margin: 0;
	font-size: 18px;
	font-weight: 800;
	color: #ffffff;
	letter-spacing: 0.3px;
}

.laco-staff-modal-header-text p {
	margin: 5px 0 0 0;
	font-size: 12.5px;
	color: #d1fae5;
	line-height: 1.4;
}

.laco-staff-modal-close {
	background: none;
	border: none;
	color: #ffffff;
	font-size: 30px;
	line-height: 1;
	cursor: pointer;
	opacity: 0.8;
	padding: 0;
	margin: -6px -4px 0 10px;
	transition: opacity 0.2s, transform 0.2s;
}

.laco-staff-modal-close:hover {
	opacity: 1;
	transform: scale(1.1);
}

/* Thanh chuyên viên tiếp nhận trực tiếp */
.laco-staff-consultant-strip {
	display: flex;
	align-items: center;
	gap: 12px;
	background: #f0fdf4;
	border-bottom: 1px solid #bbf7d0;
	padding: 10px 24px;
}

.laco-staff-strip-avatar {
	width: 38px;
	height: 38px;
	border-radius: 50%;
	overflow: hidden;
	border: 2px solid #86efac;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 18px;
	background: #ffffff;
	flex-shrink: 0;
}

.laco-staff-strip-avatar img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.laco-staff-strip-info {
	font-size: 12.5px;
	line-height: 1.35;
}

.laco-staff-strip-name strong {
	color: var(--laco-staff-primary-dark);
}

.laco-staff-strip-pos {
	color: #475569;
	font-size: 11.5px;
}

.laco-staff-strip-phone {
	color: #166534;
	font-size: 12px;
}

/* Thân form Modal */
.laco-staff-modal-body {
	padding: 20px 24px;
	overflow-y: auto;
	flex: 1 1 auto;
	max-height: calc(100vh - 220px);
}

.laco-staff-form-group {
	margin-bottom: 14px;
}

.laco-staff-form-group label {
	display: block;
	font-size: 13px;
	font-weight: 700;
	color: #334155;
	margin-bottom: 5px;
}

.laco-staff-form-group label .required {
	color: #ef4444;
}

.laco-staff-form-group input[type="text"],
.laco-staff-form-group input[type="tel"],
.laco-staff-form-group textarea {
	width: 100%;
	padding: 10px 14px;
	border: 1px solid var(--laco-staff-border);
	border-radius: 8px;
	font-size: 14px;
	box-sizing: border-box;
	transition: border-color 0.2s, box-shadow 0.2s;
	outline: none;
}

.laco-staff-form-group input:focus,
.laco-staff-form-group textarea:focus {
	border-color: var(--laco-staff-primary);
	box-shadow: 0 0 0 3px rgba(53, 118, 71, 0.15);
}

.laco-staff-checkbox-group {
	background: #f8fafc;
	border: 1px dashed #cbd5e1;
	border-radius: 8px;
	padding: 10px 12px;
	margin-top: 10px;
}

.laco-staff-checkbox-label {
	display: flex !important;
	align-items: center;
	gap: 10px;
	margin: 0 !important;
	font-size: 12.5px !important;
	font-weight: 600 !important;
	color: #1e293b !important;
	cursor: pointer;
}

.laco-staff-checkbox-label input[type="checkbox"] {
	width: 17px;
	height: 17px;
	accent-color: var(--laco-staff-primary);
	margin: 0;
	cursor: pointer;
	flex-shrink: 0;
}

/* Thông báo phản hồi */
.laco-staff-form-feedback {
	padding: 12px 14px;
	border-radius: 8px;
	font-size: 13.5px;
	margin-top: 12px;
	line-height: 1.4;
}

.laco-staff-form-feedback.is-success {
	background: #f0fdf4;
	color: #166534;
	border: 1px solid #bbf7d0;
}

.laco-staff-form-feedback.is-error {
	background: #fef2f2;
	color: #991b1b;
	border: 1px solid #fecaca;
}

/* Chân modal */
.laco-staff-modal-footer {
	padding: 14px 24px;
	background: #f8fafc;
	border-top: 1px solid var(--laco-staff-border);
	display: flex;
	justify-content: flex-end;
	gap: 12px;
}

.laco-staff-modal-footer .button-secondary {
	background: #ffffff;
	border: 1px solid #cbd5e1;
	color: #475569;
	padding: 9px 18px;
	border-radius: 6px;
	font-weight: 600;
	font-size: 13.5px;
	cursor: pointer;
	transition: background 0.2s;
}

.laco-staff-modal-footer .button-secondary:hover {
	background: #f1f5f9;
}

.laco-staff-modal-footer .button-primary {
	background: linear-gradient(135deg, var(--laco-staff-primary), var(--laco-staff-accent));
	border: none;
	color: #ffffff;
	padding: 9px 24px;
	border-radius: 6px;
	font-weight: 700;
	font-size: 13.5px;
	cursor: pointer;
	box-shadow: 0 4px 12px rgba(53, 118, 71, 0.25);
	transition: transform 0.2s, box-shadow 0.2s;
}

.laco-staff-modal-footer .button-primary:hover {
	transform: translateY(-1px);
	box-shadow: 0 6px 16px rgba(53, 118, 71, 0.35);
}

@keyframes lacoModalSlideUp {
	from { opacity: 0; transform: translateY(30px) scale(0.98); }
	to { opacity: 1; transform: translateY(0) scale(1); }
}

