@charset "utf-8";
/* CSS Document */

/* 1. ตัวคอนเทนเนอร์หลัก (ขยายเต็ม 100% รองรับ Canvas อนิเมชั่นเดิม) */
.menu-search-widget {
  position: relative;
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 auto;
  padding: 40px 0;
  background-color: #191919; /* สีพื้นหลังเข้มเดิมสำหรับ Canvas */
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  box-sizing: border-box;
  
}

/* 2. Canvas พื้นหลังอนิเมชั่น (เต็ม 100% ของคอนเทนเนอร์) */
.menu-search-widget .widget-bg-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100% !important;
  height: 100% !important;
  z-index: 0;
  pointer-events: none;
}

/* 3. คอนเทนเนอร์เนื้อหาภายใน (กว้าง 80% และจัดให้อยู่กึ่งกลางหน้าจอ) */
.menu-search-widget .selectmenu-container {
  position: relative;
  z-index: 1; /* วางซ้อนเหนือ Canvas อนิเมชั่น */
  width: 80% !important;
  max-width: 1200px;
  margin: 0 auto !important;
  font-family:serithairegular;
  color: #F8FAFC;
}

.menu-search-widget .selectmenu-container * {
  box-sizing: border-box;
}

/* ------------------ ส่วนสไตล์ขององค์ประกอบภายใน ------------------ */

/* หัวข้อหลัก */
.menu-search-widget .selectmenu-title {
  text-align: center;
  font-family: serithairegular;
  font-size: 32px;
  font-weight: bold;
  margin-bottom: 22px;
  color: #FFFFFF;
  text-shadow: 0 0 12px rgba(96, 165, 250, 0.6), 0 2px 4px rgba(0,0,0,0.8);
  line-height: 1.2;
}

/* ช่องค้นหา */
.menu-search-widget .search-box-wrapper {
  width: 100%;
  display: flex;
  justify-content: center;
  margin-bottom: 24px;
  padding: 0 4px;
}

.menu-search-widget .menu-search-input {
  width: 100%;
  max-width: 600px;
  padding: 13px 20px;
  font-family: Noto Sans Thai;
  font-size: 15px;
  background: rgba(30, 41, 59, 0.75);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #FFFFFF;
  border: 1.5px solid rgba(255, 255, 255, 0.15);
  border-radius: 30px;
  outline: none;
  transition: all 0.3s ease;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
  -webkit-appearance: none;
}

.menu-search-widget .menu-search-input::placeholder {
  color: #94A3B8;
}

.menu-search-widget .menu-search-input:focus {
  border-color: #60A5FA;
  box-shadow: 0 0 18px rgba(96, 165, 250, 0.4);
  background: rgba(30, 41, 59, 0.9);
}

/* ชั้นที่ 1: หมวดใหญ่ */
.menu-search-widget .category-group {
background-color: #262626;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1.5px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  margin-bottom: 14px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.menu-search-widget .category-header {
  display: flex;
  align-items: center;
  padding: 15px 18px;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.2s ease;
}

.menu-search-widget .category-header:hover {
  background-color: rgba(255, 255, 255, 0.05);
}

.menu-search-widget .category-header .cat-icon {
  font-size: 22px;
  margin-right: 12px;
  flex-shrink: 0;
}

.menu-search-widget .category-header span {
	font-family: promptregular;
	font-size: 18px;
	font-weight: normal;
	color: #FFFFFF;
	flex-grow: 1;
	line-height: 1.2;
}

.menu-search-widget .category-header .arrow-main {
  font-style: normal;
  font-size: 13px;
  color: #60A5FA;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  margin-left: 8px;
  flex-shrink: 0;
}

.menu-search-widget .category-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  background-color: rgba(15, 23, 42, 0.85);
}

.menu-search-widget .category-group.active {
  border-color: #60A5FA;
  box-shadow: 0 8px 24px rgba(96, 165, 250, 0.2);
}

.menu-search-widget .category-group.active > .category-header {
  background-color: rgba(30, 41, 59, 0.95);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.menu-search-widget .category-group.active > .category-header .arrow-main {
  transform: rotate(180deg);
}

/* ชั้นที่ 2: หมวดย่อย (ใส่ !important บังคับสไตล์เพื่อป้องกันปัญหาสไตล์ไม่ทำงาน) */
.menu-search-widget .sub-item-container {
  padding: 12px !important;
}

.menu-search-widget .sub-item {
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 8px !important;
  background-color: rgba(30, 41, 59, 0.6) !important;
  margin-bottom: 8px !important;
  overflow: hidden !important;
  transition: border-color 0.3s ease !important;
}

.menu-search-widget .sub-item:last-child {
  margin-bottom: 0 !important;
}

.menu-search-widget .sub-header {
  display: flex !important;
  align-items: center !important;
  padding: 11px 14px !important;
  cursor: pointer !important;
  user-select: none !important;
  transition: background-color 0.2s ease !important;
}

.menu-search-widget .sub-header:hover {
  background-color: rgba(255, 255, 255, 0.05) !important;
}

.menu-search-widget .sub-header span {
  font-family: Noto Sans Thai !important;
  font-size: 14.5px !important;
  font-weight: 600 !important;
  color: #E2E8F0 !important;
  flex-grow: 1 !important;
  line-height: 1.4 !important;
  display: block !important;
}

.menu-search-widget .sub-header .arrow-sub {
  font-style: normal !important;
  font-size: 11px !important;
  color: #94A3B8 !important;
  transition: transform 0.3s ease !important;
  margin-left: 8px !important;
  flex-shrink: 0 !important;
}

.menu-search-widget .sub-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  background-color: rgba(9, 13, 22, 0.9) !important;
}

.menu-search-widget .menu-content {
  list-style: none !important;
  margin: 0 !important;
  padding: 12px 16px 14px 28px !important;
  border-top: 1px solid rgba(255, 255, 255, 0.05) !important;
  font-family: Noto Sans Thai !important;
}

.menu-search-widget .menu-content li {
  font-size: 13.5px !important;
  font-weight: 400 !important;
  color: #CBD5E1 !important;
  padding: 5px 0 !important;
  position: relative !important;
  line-height: 1.5 !important;
  word-break: break-word !important;
  display: list-item !important;
}

.menu-search-widget .menu-content li::before {
  content: "•";
  color: #60A5FA;
  font-weight: bold;
  position: absolute;
  left: -12px;
}

.menu-search-widget .sub-item.active {
  border-color: rgba(96, 165, 250, 0.5) !important;
}

.menu-search-widget .sub-item.active > .sub-header span {
  color: #60A5FA !important;
}

.menu-search-widget .sub-item.active > .sub-header .arrow-sub {
  transform: rotate(180deg) !important;
  color: #60A5FA !important;
}

/* Responsive Design สำหรับมือถือ */
@media (max-width: 768px) {
  .menu-search-widget { padding: 24px 0; }
  .menu-search-widget .selectmenu-container { width: 92% !important; }
  .menu-search-widget .selectmenu-title { font-size: 26px; }
  .menu-search-widget .category-header span { font-size: 1rem; }
}

@media (max-width: 480px) {
  .menu-search-widget .selectmenu-container { width: 95% !important; }
  .menu-search-widget .selectmenu-title { font-size: 22px; margin-bottom: 16px; }
  .menu-search-widget .menu-search-input { padding: 10px 16px; font-size: 14px; }
  .menu-search-widget .category-header { padding: 12px 10px; }
  .menu-search-widget .category-header .cat-icon { font-size: 18px; margin-right: 8px; }
  .menu-search-widget .category-header span { font-size: 1rem; }
}