/* =========================================================
   KidZania Floating Contact Widget - Styles
   Tất cả màu sắc nằm trong :root, chỉnh ở đây là đổi toàn bộ giao diện
   ========================================================= */
:root {
	--kz-primary: #9c0d49;   /* Header modal + nút Submit */
	--kz-toggle: #c2185b;    /* Nút tròn chính (mở/đóng) */
	--kz-phone: #43a047;     /* Nút gọi điện */
	--kz-ticket: #ffa000;    /* Nút vé */
	--kz-email: #1e88e5;     /* Nút email */
	--kz-shadow: rgba(0, 0, 0, 0.25);
}

/* ---------- Widget nổi ---------- */
.kz-widget {
	position: fixed;
	right: 24px;
	bottom: 24px;
	z-index: 9999;
	display: flex;
	flex-direction: column;
	align-items: center;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.kz-widget-buttons {
	display: flex;
	flex-direction: column;
	gap: 12px;
	margin-bottom: 12px;
	align-items: center;
}

.kz-btn {
	/* Reset toàn bộ style mặc định mà theme có thể áp lên <a>/<button>
	   (padding không đều, box-sizing khác nhau...) khiến hình tròn bị méo */
	all: unset;
	box-sizing: border-box;
	width: 52px;
	height: 52px;
	min-width: 52px;
	min-height: 52px;
	max-width: 52px;
	max-height: 52px;
	flex-shrink: 0;
	padding: 0;
	margin: 0;
	line-height: 1;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #fff;
	border: none;
	cursor: pointer;
	text-decoration: none;
	box-shadow: 0 4px 10px var(--kz-shadow);
	transition: transform 0.25s ease, opacity 0.25s ease;
}

.kz-btn svg {
	width: 22px;
	height: 22px;
	display: block;
}

.kz-btn-phone { background: var(--kz-phone); }
.kz-btn-ticket { background: var(--kz-ticket); }
.kz-btn-email { background: var(--kz-email); }

.kz-btn-toggle {
	width: 60px;
	height: 60px;
	min-width: 60px;
	min-height: 60px;
	max-width: 60px;
	max-height: 60px;
	background: var(--kz-toggle);
}
.kz-btn-toggle svg {
	width: 26px;
	height: 26px;
	transition: transform 0.25s ease;
}

/* Trạng thái đóng: ẩn 3 nút con */
.kz-widget-buttons a,
.kz-widget-buttons button {
	opacity: 0;
	transform: translateY(10px) scale(0.8);
	pointer-events: none;
	transition: transform 0.25s ease, opacity 0.25s ease;
}
.kz-widget-buttons a:nth-child(1) { transition-delay: 0.05s; }
.kz-widget-buttons a:nth-child(2) { transition-delay: 0.1s; }
.kz-widget-buttons button:nth-child(3) { transition-delay: 0.15s; }

/* Trạng thái mở */
.kz-widget.kz-open .kz-widget-buttons a,
.kz-widget.kz-open .kz-widget-buttons button {
	opacity: 1;
	transform: translateY(0) scale(1);
	pointer-events: auto;
}
.kz-widget.kz-open .kz-btn-toggle svg {
	transform: rotate(45deg);
}

.kz-btn:hover {
	transform: scale(1.08);
}
.kz-btn:focus-visible {
	outline: 2px solid #fff;
	outline-offset: 2px;
}
.kz-widget.kz-open .kz-btn-toggle:hover svg {
	transform: rotate(45deg) scale(1.08);
}

/* ---------- Modal liên hệ ---------- */
.kz-modal-overlay {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.5);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 10000;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.2s ease;
	padding: 16px;
	box-sizing: border-box;
}
.kz-modal-overlay.kz-show {
	opacity: 1;
	visibility: visible;
}

.kz-modal {
	background: #fff;
	width: 100%;
	max-width: 380px;
	border-radius: 12px;
	overflow: hidden;
	box-shadow: 0 10px 40px var(--kz-shadow);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.kz-modal-header {
	background: var(--kz-primary);
	color: #fff;
	padding: 20px 20px 24px;
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
}
.kz-modal-header h3 {
	margin: 0 0 4px;
	font-size: 18px;
	font-weight: 700;
}
.kz-modal-header p {
	margin: 0;
	font-size: 13px;
	opacity: 0.85;
}
.kz-modal-close {
	background: rgba(255, 255, 255, 0.15);
	border: none;
	color: #fff;
	width: 28px;
	height: 28px;
	min-width: 28px;
	border-radius: 6px;
	font-size: 18px;
	line-height: 1;
	cursor: pointer;
}
.kz-modal-close:hover {
	background: rgba(255, 255, 255, 0.3);
}

.kz-modal-body {
	padding: 20px;
	max-height: 70vh;
	overflow-y: auto;
}

.kz-modal-body form label {
	display: block;
	font-size: 13px;
	font-weight: 600;
	margin: 12px 0 6px;
	color: #333;
}
.kz-modal-body form label:first-child {
	margin-top: 0;
}
.kz-modal-body form input,
.kz-modal-body form textarea {
	width: 100%;
	box-sizing: border-box;
	border: 1px solid #ddd;
	border-radius: 6px;
	padding: 10px 12px;
	font-size: 14px;
	font-family: inherit;
	color: #333;
}
.kz-modal-body form input::placeholder,
.kz-modal-body form textarea::placeholder {
	color: #aaa;
}
.kz-modal-body form input:focus,
.kz-modal-body form textarea:focus {
	outline: none;
	border-color: var(--kz-primary);
}
.kz-modal-body form textarea {
	resize: vertical;
}

.kz-form-error {
	color: #c0392b;
	font-size: 13px;
	margin: 8px 0 0;
}

.kz-submit-btn {
	margin-top: 18px;
	width: 100%;
	background: var(--kz-primary);
	color: #fff;
	border: none;
	border-radius: 6px;
	padding: 12px;
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
	transition: opacity 0.2s ease;
}
.kz-submit-btn:hover {
	opacity: 0.9;
}
.kz-submit-btn:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

.kz-success {
	text-align: center;
	padding: 48px 10px;
}
.kz-success p:first-child {
	font-weight: 700;
	font-size: 16px;
	color: #333;
	margin: 0 0 8px;
}
.kz-success p:last-child {
	color: #777;
	font-size: 14px;
	margin: 0;
}

/* ---------- Responsive ---------- */
@media (max-width: 480px) {
	.kz-widget {
		right: 16px;
		bottom: 16px;
	}
	.kz-btn {
		width: 46px;
		height: 46px;
	}
	.kz-btn-toggle {
		width: 54px;
		height: 54px;
	}
}
