/**
 * BIK Code – Styles
 * Version: 1.1.0
 * Popup Video · Post Carousel · TOC · Contact Panel · Contact Shortcodes
 */

/* ==========================================================================
   1. Popup Video
   ========================================================================== */

.popup-video-open {
	overflow: hidden;
}

.popup-video-overlay {
	display: none;
	position: fixed;
	z-index: 2147483647;
	inset: 0;
	width: 100vw;
	height: 100vh;
	background: rgba(15, 23, 42, 0.9);
	justify-content: center;
	align-items: center;
	padding: 20px;
	box-sizing: border-box;
}

.popup-video-overlay.is-active {
	display: flex;
}

.popup-video-content {
	position: relative;
	z-index: 2147483648;
	width: min(90vw, 800px);
	background: #000;
	box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
	overflow: visible;
}

.popup-video-close {
	position: absolute;
	top: -44px;
	right: 0;
	width: 36px;
	height: 36px;
	border: 0;
	background: transparent;
	color: #fff;
	font-size: 34px;
	line-height: 1;
	cursor: pointer;
	z-index: 10;
	padding: 0;
	transition: color 0.25s ease, transform 0.25s ease;
}

.popup-video-close:hover {
	color: #0ab99d;
	transform: scale(1.08);
}

.popup-video-wrapper {
	display: inline-block;
	max-width: 100%;
}

.popup-video-trigger {
	display: block;
	width: 100%;
	padding: 0;
	border: 0;
	background: transparent;
	cursor: pointer;
	text-align: inherit;
	border-radius: 10px;
}

.popup-video-wrapper img {
	display: block;
	max-width: 100%;
	height: auto;
	transition: transform 0.3s ease;
	border-radius: 6px;
}

.popup-video-iframe-container {
	position: relative;
	width: 100%;
	height: 0;
	padding-bottom: 56.25%;
	overflow: hidden;
	background: #000;
}

.popup-video-iframe-container iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
}

/* ==========================================================================
   2. Post Carousel
   ========================================================================== */

.epc-carousel-wrapper {
	position: relative;
	box-sizing: border-box;
	overflow: hidden;
}

.epc-carousel {
	display: flex;
	gap: 24px;
	overflow-x: auto;
	scroll-behavior: smooth;
	padding: 15px 5px;
	scrollbar-width: none;
	-ms-overflow-style: none;
	box-sizing: border-box;
	width: 100%;
}

.epc-carousel::-webkit-scrollbar {
	display: none;
}

.epc-carousel .carousel-item {
	flex: 0 0 auto;
	width: 300px;
	max-width: 300px;
	background: #fff;
	overflow: hidden;
	transition: transform 0.3s ease, box-shadow 0.3s ease;
	display: flex;
	flex-direction: column;
	box-sizing: border-box;
	border: 1px solid #ededed;
	border-radius: 10px;
}

.epc-carousel .carousel-item:hover {
	transform: translateY(-6px);
	box-shadow: 0 12px 25px rgba(0, 0, 0, 0.08);
}

.epc-carousel .carousel-item a {
	display: flex;
	flex-direction: column;
	height: 100%;
	color: inherit;
	text-decoration: none;
}

.epc-carousel .carousel-item img {
	width: 100%;
	object-fit: cover;
	display: block;
	border-radius: 10px 10px 0 0;
}

.epc-carousel .carousel-item h3 {
	font-size: 17px;
	margin: 15px 16px 8px;
	line-height: 1.4;
	color: #333;
	font-weight: 500;
}

.epc-carousel .carousel-item time {
	display: block;
	font-size: 0.9em;
	color: #64748b;
	margin: auto 16px 15px;
}

.epc-prev,
.epc-next {
	position: absolute;
	top: 45%;
	transform: translateY(-50%);
	background: rgba(255, 255, 255, 0.92);
	border: 1px solid rgba(226, 232, 240, 0.9);
	border-radius: 50%;
	width: 44px;
	height: 44px;
	cursor: pointer;
	box-shadow: 0 6px 18px rgba(0, 0, 0, 0.16);
	z-index: 5;
	opacity: 0.96;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: all 0.3s ease;
	padding: 0;
	color: #1c3a8d;
}

.epc-prev { left: 14px; }
.epc-next { right: 14px; }

.epc-prev[disabled],
.epc-next[disabled] {
	opacity: 0.3;
	pointer-events: none;
}

.epc-prev:hover,
.epc-next:hover {
	background: #fff;
	border-color: #0ab99d;
	color: #0ab99d;
}

.epc-prev svg,
.epc-next svg {
	width: 22px;
	height: 22px;
	display: block;
}

.epc-error {
	color: #e11d48;
	padding: 12px 16px;
	background: #fef2f2;
	border-radius: 8px;
}

/* ==========================================================================
   3. Table of Contents (TOC)
   ========================================================================== */

.bik-toc {
	padding: 10px;
	margin-bottom: 20px;
	background: #f4f8ff;
	position: relative;
	border: 1px solid #ededed;
	border-radius: 10px;
}

.bik-toc-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
}

#bik-toc-title,
.bik-toc-title {
	cursor: pointer;
	flex: 1;
	font-weight: 700;
	color: #1c3a8d;
	user-select: none;
}

.bik-toc-toggle-btn {
	background: #fff;
	color: #333;
	border: 1px solid #cbd5e1;
	padding: 14px;
	cursor: pointer;
	font-size: 14px;
	transition: all 0.3s;
	border-radius: 50%;
	line-height: 1;
}

.bik-toc-toggle-btn:hover {
	background: #ededed;
}

.bik-toc-list {
	list-style: none;
	padding-left: 0;
	margin: 15px 0 0 !important;
}

.bik-toc li {
	margin-left: 0;
	list-style: none;
}

.bik-toc-item {
	margin-bottom: 8px;
}

.bik-toc li.bik-toc-level-3,
.bik-toc-level-3 {
	margin-left: 20px;
}

.bik-toc-link {
	color: #0ab99d;
	text-decoration: none;
	transition: color 0.3s;
}

.bik-toc-link:hover {
	color: #1c3a8d;
}

.bik-toc-link-h2 {
	font-weight: 700;
}

/* ==========================================================================
   4. Appointment / Contact Panel
   ========================================================================== */

#appointment-panel {
	position: fixed;
	z-index: 9999;
	right: 24px;
	bottom: 80px;
	padding: 22px 14px;
	border: 1px solid #ededed;
	background: #fff;
	border-radius: 10px;
	box-shadow: 0 8px 28px rgba(15, 23, 42, 0.1);
}

#appointment-panel ul {
	display: flex;
	flex-direction: column;
	gap: 16px;
	list-style: none;
	margin: 0;
	padding: 0;
}

#appointment-panel li {
	margin: 0;
	text-align: center;
}

#appointment-panel a {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
	color: #333;
	font-size: 13px;
	text-decoration: none;
	transition: color 0.25s, transform 0.25s;
}

#appointment-panel a:hover {
	color: #0ab99d;
	transform: translateY(-3px);
}

#appointment-panel img {
	width: 34px;
	height: 34px;
	object-fit: contain;
}

#appointment-panel .phone-icon {
	display: block;
	border-radius: 50%;
	transform-origin: center;
	animation: bik-phone-shake 2s infinite ease-in-out;
}

#appointment-panel .phone-wrapper .phone-icon {
	box-shadow: 0 0 0 0 rgba(0, 150, 136, 0.45);
	animation: bik-phone-shake 2s infinite ease-in-out, bik-phone-pulse 1.5s infinite;
}

@keyframes bik-phone-shake {
	0%, 50%, 100% { transform: rotate(0) scale(1); }
	10%, 30% { transform: rotate(-18deg) scale(1.08); }
	20%, 40% { transform: rotate(18deg) scale(1.08); }
}

@keyframes bik-phone-pulse {
	0% { box-shadow: 0 0 0 0 rgba(0, 150, 136, 0.38); }
	70% { box-shadow: 0 0 0 14px rgba(0, 150, 136, 0); }
	100% { box-shadow: 0 0 0 0 rgba(0, 150, 136, 0); }
}

/* ==========================================================================
   5. Contact shortcode blocks
   ========================================================================== */

.bik-lien-he p {
    margin-bottom: 8px;
}

/* ==========================================================================
   6. Responsive
   ========================================================================== */

@media (max-width: 900px) {
	.epc-carousel-wrapper {
		padding: 16px 12px;
	}

	.epc-carousel {
		gap: 18px;
		padding: 12px 0;
	}

	.epc-carousel .carousel-item {
		width: 320px;
		max-width: 82vw;
	}
}

@media only screen and (max-width: 768px) {
	#appointment-panel {
		top: auto;
		right: auto;
		bottom: 0;
		left: 0;
		width: 100%;
		min-width: 0;
		padding: 10px 8px calc(10px + env(safe-area-inset-bottom));
		border-right: none;
		border-bottom: none;
		border-left: none;
		border-radius: 0;
		transform: none;
		box-shadow: 0 -8px 28px rgba(15, 23, 42, 0.12);
	}

	#appointment-panel ul {
		flex-direction: row;
		justify-content: space-around;
		align-items: flex-end;
		gap: 6px;
	}

	#appointment-panel li {
		flex: 1;
	}

	#appointment-panel a {
		font-size: 11px;
		gap: 4px;
	}

	#appointment-panel a:hover {
		transform: none;
	}

	#appointment-panel img {
		width: 25px;
		height: 25px;
	}
}

@media (max-width: 600px) {
	.popup-video-overlay {
		padding: 14px;
	}

	.popup-video-content {
		width: 100%;
	}

	.popup-video-close {
		top: -42px;
		right: 0;
	}

	.epc-carousel-wrapper {
		padding: 12px 0;
	}

	.epc-carousel {
		gap: 16px;
		scroll-padding-left: 14px;
	}

	.epc-carousel .carousel-item {
		width: 86vw;
		max-width: 86vw;
	}

	.epc-carousel .carousel-item h3 {
		font-size: 16px;
		margin: 13px 14px 7px;
	}

	.epc-carousel .carousel-item time {
		margin: auto 14px 14px;
	}

	.epc-prev,
	.epc-next {
		width: 38px;
		height: 38px;
		top: 38%;
	}

	.epc-prev { left: 8px; }
	.epc-next { right: 8px; }

	.epc-prev svg,
	.epc-next svg {
		width: 18px;
		height: 18px;
	}
}
