/* Back to Top Button Animation */
#back-to-top {
    transition: opacity 0.4s, transform 0.4s;
    opacity: 0;
    pointer-events: none;
    transform: translateY(20px);
}
#back-to-top.show {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}
/* FAQ Accordion */
.faq-content {
    transition: max-height 0.3s ease-in-out, opacity 0.3s ease-in-out;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
}
.faq-content.active {
    opacity: 1;
}
/* Input Style - Unified Class */
.med-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    border: 1px solid #e5e7eb;
    transition: all 0.2s ease;
    outline: none;
    color: #1f2937;
    background-color: #ffffff;
}
.med-input::placeholder {
    color: #9ca3af;
}
.med-input:focus {
    outline: none;
    border-color: #5C795E;
    box-shadow: 0 0 0 2px rgba(92, 121, 94, 0.2);
}
.med-input:disabled {
    background-color: #f3f4f6;
    color: #6b7280;
    cursor: not-allowed;
    opacity: 0.7;
    border-color: #d1d5db;
}
.med-input-icon {
    padding-left: 2.5rem;
}
.med-input-password {
    padding-right: 3rem;
}

/* Input icon should stay fixed and above shaking input */
.med-input-icon-wrapper {
    z-index: 10;
    pointer-events: none;
}

/* Policy Tabs */
.tab-policy-content {
    display: none;
    animation: fadeIn 0.3s ease-in-out;
}

.tab-policy-content.active {
    display: block;
}

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

.tab-policy-btn {
    position: relative;
    transition: all 0.3s ease;
    text-align: left;
}

.tab-policy-btn:hover {
    color: #5C795E;
}

.tab-policy-btn.active {
    color: #5C795E;
}

/* Vertical tabs styling for desktop */
@media (min-width: 1024px) {
    .tab-policy-btn {
        width: 100%;
        border-left-width: 2px;
    }
    
    .tab-policy-btn.active {
        background-color: #ffffff;
        font-weight: 600;
    }
}

/* Responsive adjustments for mobile tabs */
@media (max-width: 1023px) {
    .tab-policy-btn {
        font-size: 0.875rem;
        border-bottom-width: 2px;
        min-width: fit-content;
    }
}

/* Privacy Policy Popup Styles (Bottom Bar Version) */
#privacy-policy-popup {
	--pp-primary: #1f1f1f;
	--pp-primary-hover: #333333;
	--pp-text: #333333;
	--pp-bg: #ffffff;
	--pp-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
	--pp-font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
#privacy-policy-popup * {
	box-sizing: border-box;
	font-family: var(--pp-font);
}
/* Main Container - Fixed at Bottom */
.privacy-popup-overlay {
	position: fixed;
	bottom: 0;
	left: 0;
	width: 100%;
	background-color: var(--pp-bg);
	box-shadow: var(--pp-shadow);
	z-index: 9999;
	
	/* Animation properties */
	transform: translateY(100%); /* ซ่อนไว้ข้างล่าง */
	transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
	
	/* Layout formatting */
	padding: 20px;
	border-top: 1px solid rgba(0,0,0,0.05);
}
/* Show state */
.privacy-popup-overlay.show {
	transform: translateY(0); /* เลื่อนขึ้นมาแสดง */
}
/* Content Wrapper to constrain width on large screens */
.privacy-popup-content {
	max-width: 1200px;
	margin: 0 auto;
	display: flex;
	align-items: center; /* จัดกึ่งกลางแนวตั้ง */
	justify-content: space-between; /* แยกข้อความกับปุ่ม */
	gap: 30px;
}
/* Text Area */
.privacy-text-wrapper {
	flex: 1; /* กินพื้นที่ที่เหลือทั้งหมด */
}
.privacy-popup-header h3 {
	margin: 0 0 8px 0;
	font-size: 18px;
	font-weight: 700;
	color: var(--pp-text);
	display: inline-block;
	margin-right: 10px;
}
.privacy-popup-body p {
	margin: 0;
	font-size: 14px;
	line-height: 1.5;
	color: #555;
	display: inline;
}
/* Styling the list to be compact/inline for a bar */
.privacy-popup-body ul {
	margin: 5px 0 0 0;
	padding: 0;
	list-style: none;
	display: flex;
	flex-wrap: wrap;
	gap: 15px;
}
.privacy-popup-body li {
	font-size: 12px;
	color: #666;
	display: flex;
	align-items: center;
	background: #f5f5f5;
	padding: 2px 8px;
	border-radius: 4px;
}
/* Decoration dot for list items */
.privacy-popup-body li::before {
	content: "•";
	color: var(--pp-primary);
	margin-right: 5px;
	font-weight: bold;
}
/* Buttons Area */
.privacy-popup-footer {
	display: flex;
	gap: 12px;
	flex-shrink: 0; /* ป้องกันปุ่มหดตัว */
}
/* Button Styles */
#privacy-policy-popup .btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 10px 24px;
	font-size: 14px;
	font-weight: 600;
	border-radius: 50px;
	cursor: pointer;
	transition: all 0.2s ease;
	text-decoration: none;
	line-height: 1;
	white-space: nowrap;
	border: 1px solid transparent;
}
#privacy-policy-popup .btn-outline {
	background: transparent;
	border-color: #ddd;
	color: #666;
}
#privacy-policy-popup .btn-outline:hover {
	border-color: var(--pp-text);
	color: var(--pp-text);
	background: #f9f9f9;
}
#privacy-policy-popup .btn:not(.btn-outline) {
	background: var(--pp-primary);
	color: #fff;
}
#privacy-policy-popup .btn:not(.btn-outline):hover {
	background: var(--pp-primary-hover);
	transform: translateY(-1px);
	box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
/* Close Button (X) - Optional for bar, but keeping it small */
#privacy-close-btn {
	position: absolute;
	top: 0;
	bottom: 0;
	right: 10px;
	background: transparent;
	border: none;
	cursor: pointer;
	padding: 5px;
	color: #999;
	/* display: none; */
}
@media (max-width: 1280px) {
	#privacy-close-btn {
		display: block; 
		top: 5px;
		bottom: initial;
		right: 10px;
	}
}
/* Mobile Responsive */
@media (max-width: 768px) {
	.privacy-popup-content {
		flex-direction: column;
		align-items: flex-start;
		gap: 20px;
	}
	.privacy-popup-footer {
		width: 100%;
		justify-content: flex-end;
	}
	.privacy-popup-header h3 {
		display: block;
		margin-bottom: 5px;
	}
}
@media (max-width: 480px) {
	.privacy-popup-footer {
		flex-direction: column-reverse;
	}
	#privacy-policy-popup .btn {
		width: 100%;
	}
}