/* =========================================================
   SITEORIGIN CUSTOM CSS (v2025.10 Stable)
   ========================================================= */
#test {
 
}

/* ซ่อน element ที่ไม่จำเป็น */
.order-comments,
.quiz-status .submit-quiz,
.course-buttons .lp-form.form-button.form-button-finish-course,
.can-finish-course .lp-form.form-button.form-button-finish-course,
.form-button-finish-course .lp-button.lp-btn-finish-course,
#quizResultGrade,
ul.result-statistic,
.lp-checkout-form__before,
a.wp-login-register {
  display: none !important;
}
.course-summary .can-finish-course .lp-form.form-button.form-button-finish-course {
  display: inline !important;
}

/* ฟอนต์และขนาดข้อความทั่วไป */
.font-anuphan .n2-ss-section-main-content { font-family: "Anuphan" !important; }
.font-size-footer p { font-size:14px; line-height:18px; }

/* ตัดคำ paragraph อัตโนมัติ */
.smart-popular .descript-kom .n2-ss-item-content.n2-ss-text.n2-ow-all *,
.smart-popular .descript-kom .n2-ss-item-content.n2-ss-text.n2-ow * {
  overflow: hidden;
  display: -webkit-box !important;
  -webkit-box-orient: vertical;
  white-space: pre-wrap;
}
.smart-popular .descript-kom .n2-ss-item-content.n2-ss-text.n2-ow-all p,
.smart-popular .descript-kom .n2-ss-item-content.n2-ss-text.n2-ow-all * { 
		
  display: -webkit-box !important;
  -webkit-box-orient: vertical !important;
  -webkit-line-clamp: 3 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;	
}

.smart-popular .n2-ss-item-content.n2-ss-text.n2-ow-all p:nth-of-type(2) {
  display: none !important;
}


.smart-popular .pop-title-sub2 .pop-title-sub * { 
		-webkit-line-clamp: 2 !important; 
}


/* ฟอนต์ Title Course */
.course-title { font-family: "Anuphan" !important; }

/* ซ่อนเมนู login เมื่อเข้าสู่ระบบ */
.logged-in li#menu-item-8562 { display:none !important; }

/* hide icon ก่อนช่องค้นหา */
.lp-courses-bar .search-courses button:before { display:none !important; }

/* Layout My Account / Related Courses */
body.page-id-609 ul.profile-courses-list li.course,
.lp-list-courses-related ul.lp-courses-related li.course {
  display: flex;
}
body.page-id-609 ul.profile-courses-list li.course .course-item,
.lp-list-courses-related ul.lp-courses-related li.course .course-item {
  display: flex;
  flex-direction: column;
  height: 100%;
  width: 100%;
}
body.page-id-609 ul.profile-courses-list li.course .course-content,
.lp-list-courses-related ul.lp-courses-related li.course .course-content {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
}
body.page-id-609 ul.profile-courses-list li.course .course-info,
.lp-list-courses-related ul.lp-courses-related li.course .course-info {
  margin-top: auto !important;
}
body.page-id-609 ul.profile-courses-list li.course .wap-course-title .course-title,
.lp-list-courses-related ul.lp-courses-related li.course .wap-course-title .course-title {
  display: -webkit-box !important;
  -webkit-box-orient: vertical !important;
  -webkit-line-clamp: 3;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: normal !important;
  line-height: 1.5em;
  max-height: 4.5em;
}

/* Course Search */
.course-search-container {
  max-width: 1200px;
  margin: auto;
  padding: 20px;
}
.course-results {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}
.course-card {
  background: #fff;
  border-radius: 10px;
  padding: 15px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  text-align: center;
}

/* Search icon hover */
.site-search-icon svg { stroke:#fff; transition:0.3s; }
.site-search-icon:hover svg { stroke:#FFD700; }

/* ตาราง Time Report */
.cdgs-time-table, table.cdgs-time-table, .cdgs-time-table th, .cdgs-time-table td {
  border: 1px solid #e6e6e6 !important;
  border-collapse: collapse !important;
}
.cdgs-time-table thead th {
  background:#7dbe7e !important;
  color:#fff !important;
  border:1px solid #e6e6e6 !important;
}
.cdgs-time-report table.cdgs-time-table {
  width:100% !important;
  background:#fff !important;
  box-shadow:0 0 0 1px #e0e0e0 !important;
  border-radius:6px !important;
  overflow:hidden !important;
}



/* Header Overlay */
.site-header {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
/*  background: rgba(0,0,0,0.65);
  backdrop-filter: blur(8px);
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  z-index: 9999;
  transition: all 0.3s ease;*/
}
.hero-section,
.lp-landing-banner,
.elementor-section:first-of-type {
  padding-top: 100px;
}

/* เมนูหลักชิดขวา */
.site-header .main-navigation ul {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 20px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.site-header .main-navigation ul li + li {
  margin-left: 20px; /* fallback gap for Safari */
}
.site-header .main-navigation a {
  color: #fff;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s ease;
}
.site-header .main-navigation a:hover {
  color: #FFD700;
}

/* iframe YouTube */
.lp-course-description iframe {
  width: 100% !important;
  height: auto !important;
  aspect-ratio: 16 / 9;
  max-width: 100% !important;
  display: block;
  margin: 0 auto;
}


/*#menu-main-menu-1 > li.menu-item.menu-item-type-custom.menu-item-object-custom.menu-item-7651 {
	display:none !important;
}*/

/* 🔒 ซ่อนเมนู "สร้างหลักสูตร" สำหรับทุกบทบาท */
#menu-main-menu-1 > li.menu-item.menu-item-type-custom.menu-item-object-custom.menu-item-7651,
.nav-panel ul.s-nav li.menu-item.menu-item-type-custom.menu-item-object-custom.menu-item-7651 {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
  height: 0 !important;
  overflow: hidden !important;
}

/* 👩‍🏫 แสดงเมนู "สร้างหลักสูตร" สำหรับครูเท่านั้น (lp_teacher) */
body.role-lp_teacher #menu-main-menu-1 > li.menu-item.menu-item-type-custom.menu-item-object-custom.menu-item-7651,
body.role-lp_teacher .nav-panel ul.s-nav li.menu-item.menu-item-type-custom.menu-item-object-custom.menu-item-7651 {
  display: list-item !important;
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  height: auto !important;
  overflow: visible !important;
}
html.wp-toolbar body.wp-admin.wp-core-ui.js.acf-admin-5-3.acf-browser-firefox.learnpress.buddypress.edit-php.auto-fold.admin-bar.post-type-lp_course.branch-6-8.version-6-8-3.admin-color-fresh.locale-th.svg.wp-theme-plant3.wp-child-theme-WisdomLMS.customize-support.dialog-body.dialog-buttons-body.dialog-container.dialog-buttons-container.e--ua-firefox.e--ua-mac div#wpwrap div#wpcontent div#wpbody div#wpbody-content h2.nav-tab-wrapper.lp-nav-tab-wrapper {
		display:none;
}

/* เริ่มซ่อนปุ่ม edit */

.role-lp_teacher a.btn-edit {
  display: none !important;
}

/*end ซ่อนปุ่ม edit */

/* ==========================
   ✅ Responsive Scroll Table
   ใช้กับตารางที่อยู่ใน .tb-scroll เท่านั้น
   ========================== */

/* 🌐 Desktop (ค่าเริ่มต้น): ไม่มี scroll */
.tb-scroll {
  overflow-x: visible;
  width: 100%;
}

/* 📱 Mobile / Tablet: เปิด scroll แนวนอน */
@media (max-width: 768px) {
  .tb-scroll {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch; /* scroll ลื่นบน iOS */
    box-shadow: inset 0 -1px 0 rgba(0,0,0,0.05); /* เงาบางๆ ด้านล่าง */
  }

  /* สไตล์ของตารางภายใน */
  .tb-scroll table {
    border-collapse: collapse;
    min-width: 600px; /* ป้องกันตารางบีบ */
    width: 100%;
  }

  .tb-scroll th,
  .tb-scroll td {
    white-space: nowrap;
    padding: 8px 10px;
    border: 1px solid #ddd;
    background: #fff;
  }

  /* scrollbar ล่าง */
  .tb-scroll::-webkit-scrollbar {
    height: 6px;
  }

  .tb-scroll::-webkit-scrollbar-thumb {
    background: rgba(0,0,0,0.2);
    border-radius: 3px;
  }
}

/* 💻 ซ่อน scrollbar สำหรับจอใหญ่ (Desktop) */
@media (min-width: 769px) {
  .tb-scroll::-webkit-scrollbar {
    display: none;
  }
}


/* ให้ footer ยืดเต็มจอ */
.site-footer {
  width: 100vw;          /* เต็มหน้าจอซ้ายขวา */
  margin-left: calc(50% - 50vw);  /* ดึงออกมาจาก container */
  background-color: #6aa176;      /* สีพื้นหลังของ footer */
}

/* ให้เนื้อหาภายในยังจัดอยู่กึ่งกลางเหมือน content ปกติ */
.site-footer .container {
  max-width: 1180px;     /* หรือเท่ากับ .site-content */
  margin: 0 auto;
  padding: 0 20px;       /* เว้นขอบเท่ากับ content */
}

/****** css grid******/
div#page.site.site-page div#content.site-content div.s-container div.lp-archive-courses div.lp-content-area div.lp-main-content div.lp-list-courses-default div.lp-target ul.learn-press-courses.lp-list-courses-no-css.grid{
		display:flex !important;
}

/*** css contact us *****/
.page-id-461 .site-header-space,
.page-id-8163 .site-header-space {
		margin-bottom: 0px !important;
}

/**** form register input space ***/
div.learnpress div.learn-press-form-register.learn-press-form form div.acf-user-register-fields div.acf-input div.acf-input-wrap input {
		margin-bottom:10px;
}
div.learnpress div.learn-press-form-register.learn-press-form form div.acf-user-register-fields .acf-field.acf-field-text[data-name="user_phone"] div.acf-input div.acf-input-wrap input {
		margin-bottom:30px;
}

/**** ซ่อนปุ่ม login หน้าลงทะเบียน ****/
button#tab-login-publish {
		display:none;
}
button#tab-register-publish,
button#tab-register-publish:hover
{
		background:none !important;
		color:#876d55 !important;
}


/* ===============================
   Default (Desktop ≥ 1025px)
==================================*/
.learn-press-form-login.learn-press-form,
.learn-press-form-register.learn-press-form {
    background-color: #ffffff30;
    border-radius: 47px;
}

/* ===============================
   Tablet (768px – 1024px)
==================================*/
@media (max-width: 1024px) and (min-width: 768px) {
    .learn-press-form-login.learn-press-form,
    .learn-press-form-register.learn-press-form {
        border-radius: 36px; /* ปรับตามต้องการ */
    }
}

/* ===============================
   Mobile (≤ 767px)
==================================*/
@media (max-width: 767px) {
    .learn-press-form-login.learn-press-form,
    .learn-press-form-register.learn-press-form {
        border-radius: 20px; /* โค้งมนมากขึ้นสำหรับจอเล็ก */
    }
}

/* ===============================
   Very small mobile (≤ 480px)
==================================*/
@media (max-width: 480px) {
    .learn-press-form-login.learn-press-form,
    .learn-press-form-register.learn-press-form {
        border-radius: 14px; /* เล็กลงให้พอดีจอ */
    }
}










.learn-press-form-login.learn-press-form form a{
		color: #828282;
}
button#tab-register-publish[aria-selected="true"] {
		display:none;
}

/**** icon นาฬิการ time report *****/

.lp-profile-nav-tabs li.time-report > a::before {
  font-family: 'lp-icon';
  content: "\f017"; /* หา unicode ของไอคอนนาฬิกาที่ theme ใช้อยู่ */
  margin-right: 2px;
	margin-top: 3px;
  font-size: 14px;
  vertical-align: middle;
  color:#7bbf7b;
}
.lp-profile-nav-tabs li.time-report.active > a::before {
	color:#fff;	
}

/* ice */
#e-n-tab-content-1909317991 > div > div > div > div.elementor-element.elementor-element-13093fb.elementor-widget.elementor-widget-shortcode > div > div > div > form > ul > li:nth-child(1) > label {
		color:#22150A;
		font-family: 'anuphan';
}
#e-n-tab-content-1909317991 > div > div > div > div.elementor-element.elementor-element-13093fb.elementor-widget.elementor-widget-shortcode > div > div > div > form > ul > li:nth-child(2) > label {
		color:#22150A;
		font-family: 'anuphan';
}
#e-n-tab-content-1909317991 > div > div > div > div.elementor-element.elementor-element-13093fb.elementor-widget.elementor-widget-shortcode > div > div > div > form > p:nth-child(2) > label {
		color:#22150A;
		font-family: 'anuphan';
		margin-bottom: 15px;
}
#e-n-tab-content-1909317991 > div > div > div > div.elementor-element.elementor-element-13093fb.elementor-widget.elementor-widget-shortcode > div > div > div {
		border-radius:20px;
}
#e-n-tab-content-1909317992 > div > div > div > div.elementor-element.elementor-element-7a34cab.elementor-widget.elementor-widget-shortcode > div > div > div {
		border-radius:20px;
}
#e-n-tab-content-1909317992 > div > div > div > div.elementor-element.elementor-element-7a34cab.elementor-widget.elementor-widget-shortcode > div > div > div > form > ul > li:nth-child(1) > label {
		color:#22150A;
		font-family: 'anuphan';
}
#e-n-tab-content-1909317992 > div > div > div > div.elementor-element.elementor-element-7a34cab.elementor-widget.elementor-widget-shortcode > div > div > div > form > ul > li:nth-child(2) > label {
		color:#22150A;
		font-family: 'anuphan';
}
#e-n-tab-content-1909317992 > div > div > div > div.elementor-element.elementor-element-7a34cab.elementor-widget.elementor-widget-shortcode > div > div > div > form > ul > li:nth-child(3) > label {
		color:#22150A;
		font-family: 'anuphan';
}
#e-n-tab-content-1909317992 > div > div > div > div.elementor-element.elementor-element-7a34cab.elementor-widget.elementor-widget-shortcode > div > div > div > form > ul > li:nth-child(4) > label {
		color:#22150A;
		font-family: 'anuphan';
}
#e-n-tab-content-1909317992 > div > div > div > div.elementor-element.elementor-element-7a34cab.elementor-widget.elementor-widget-shortcode > div > div > div > form > ul > li:nth-child(5) > label {
		color:#22150A;
		font-family: 'anuphan';
}
#e-n-tab-content-1909317992 > div > div > div > div.elementor-element.elementor-element-7a34cab.elementor-widget.elementor-widget-shortcode > div > div > div > form > ul > li:nth-child(6) > label {
		color:#22150A;
		font-family: 'anuphan';
}
#e-n-tab-content-1909317992 > div > div > div > div.elementor-element.elementor-element-7a34cab.elementor-widget.elementor-widget-shortcode > div > div > div > form > div.acf-user-register-fields.acf-fields.-clear > div.acf-field.acf-field-text.acf-field-68d9dc148c9db > div.acf-label {
		color:#22150A;
		font-family: 'anuphan';
}
#e-n-tab-content-1909317992 > div > div > div > div.elementor-element.elementor-element-7a34cab.elementor-widget.elementor-widget-shortcode > div > div > div > form > div.acf-user-register-fields.acf-fields.-clear > div.acf-field.acf-field-text.acf-field-68d9dc6a2d9f4 > div.acf-label > label {
		color:#22150A;
		font-family: 'anuphan';
}
#e-n-tab-content-1909317992 > div > div > div > div.elementor-element.elementor-element-7a34cab.elementor-widget.elementor-widget-shortcode > div > div > div > form > div.acf-user-register-fields.acf-fields.-clear > div.acf-field.acf-field-text.acf-field-68d9dc782d9f5 > div.acf-label > label {
		color:#22150A;
		font-family: 'anuphan';
}
#e-n-tab-content-1909317992 > div > div > div > div.elementor-element.elementor-element-7a34cab.elementor-widget.elementor-widget-shortcode > div > div > div > form > div.acf-user-register-fields.acf-fields.-clear > div.acf-field.acf-field-text.acf-field-68d9dc148c9db > div.acf-label > label {
		color:#22150A;
		font-family: 'anuphan';
}

/* padding list courses */

.cdgs-item.list .cdgs-card-body {
		padding:0 ;
		
}

.cdgs-item.list .cdgs-card-body .cdgs-meta {
		grid-template-columns: repeat(4,1fr);
		font-size: 0.9em;
}

/* ซ่อนคอร์สของบทบาทครู */
body.role-cdgsmember div.course-item[data-id="7632"] {
		display:none;		
}


/* ===== ปุ่ม "เรียนจบบทนี้" LearnPress ===== */
form.learn-press-form.form-button {
  display: flex;
  justify-content: flex-end; /* ชิดขวา */
}

/* ปุ่มหลัก */
form.learn-press-form.form-button .lp-button {
  background-color: #57A357;     /* Primary */
  color: #fff;                   /* ตัวอักษรสีขาว */
  border: none;
  border-radius: 6px;
  padding: 10px 24px;
  font-weight: 600;
  letter-spacing: 0.3px;
  transition: all 0.3s ease;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1);
  position: relative;            /* สำหรับ tooltip */
}

/* Hover (Accent tone) */
form.learn-press-form.form-button .lp-button:hover {
  background-color: #34393A;     /* Accent */
  transform: translateY(-2px);
  box-shadow: 0 6px 10px rgba(0, 0, 0, 0.15);
}

/* Disabled state */
form.learn-press-form.form-button .lp-button[disabled] {
  background-color: #876D55;     /* Secondary */
  color: #e0e0e0;
  cursor: not-allowed;
  box-shadow: none;
}

/* ===== Tooltip (Custom) ===== */
form.learn-press-form.form-button .lp-button::after {
  content: "กดเพื่อยืนยันว่าเรียนบทนี้จบแล้ว ระบบจะบันทึกความคืบหน้าอัตโนมัติ";
  position: absolute;
  bottom: 125%; /* อยู่เหนือปุ่ม */
  right: 0;
  background-color: #696969; /* Text color tone จาก Global Colors */
  color: #fff;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 12px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  transform: translateY(4px);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

/* แสดง tooltip เมื่อ hover */
form.learn-press-form.form-button .lp-button:hover::after {
  opacity: 1;
  transform: translateY(0);
}

/* ลูกศรเล็ก ๆ ใต้ tooltip */
form.learn-press-form.form-button .lp-button::before {
  content: "";
  position: absolute;
  bottom: 115%;
  right: 20px;
  border-width: 6px;
  border-style: solid;
  border-color: #696969 transparent transparent transparent;
  opacity: 0;
  transition: opacity 0.25s ease;
}

form.learn-press-form.form-button .lp-button:hover::before {
  opacity: 1;
}


/* ===== เปลี่ยนหัวใจทึบให้เป็นหัวใจขอบ (outline) ===== */
.lp-icon-heart:before {
  content: "\f08a" !important; /* FA Regular Heart Outline */
  font-weight: normal !important;
}

/* ======================================================
   CDGS LMS — YouTube Box Style (v2025.11)
   ใช้ได้กับทุกบทเรียน (Lesson Page)
   ====================================================== */

/* ===== กรอบวิดีโอและคำอธิบายของบทเรียน ===== */
.learnpress-page .content-item-description.lesson-description {
  background-color: #f5f5f5;        /* สีพื้นเทาอ่อน */
  border-radius: 12px;              /* มุมโค้งมน */
  padding: 16px 20px;
  margin: 24px auto;                /* จัดให้อยู่ตรงกลางและเว้นระยะรอบ */
  text-align: center;               /* ให้วิดีโออยู่กลางแนวนอน */
  max-width: 800px;                 /* จำกัดความกว้างสูงสุด */
  box-shadow: 0 2px 6px rgba(0,0,0,0.08); /* เงาเบา ๆ */
  border: 1px solid #e0e0e0;        /* ขอบบาง ๆ */
  transition: all 0.3s ease;
}

/* เอฟเฟกต์ hover */
.learnpress-page .content-item-description.lesson-description:hover {
  box-shadow: 0 4px 10px rgba(0,0,0,0.12);
  transform: translateY(-2px);
}

/* ===== ปรับ iframe ของ YouTube ===== */
.learnpress-page .content-item-description.lesson-description iframe {
  display: block;
  margin: 0 auto;
  width: 100%;
  max-width: 720px;                 /* จำกัดขนาดสูงสุดของวิดีโอ */
  aspect-ratio: 16 / 9;             /* รักษาสัดส่วน 16:9 */
  border-radius: 10px;              /* มุมโค้งตามกรอบ */
  overflow: hidden;
}

/* ===== รองรับมือถือ ===== */
@media (max-width: 768px) {
  .learnpress-page .content-item-description.lesson-description {
    padding: 12px 10px;
    margin: 16px auto;
  }

  .learnpress-page .content-item-description.lesson-description iframe {
    max-width: 100%;
    border-radius: 8px;
  }
}

/*แก้ไขขนาด ข้อมูลเพิ่มเติม */
div.learnpress div.learn-press-form-register.learn-press-form form h2 {
	font-size: 1.2em;	
}

/* =======================================================
   CDGS LMS — Force All Register Fields Required (*) Mark
   ======================================================= */

/* เพิ่มดอกจันสีแดงหลัง label ทุกช่องในฟอร์มสมัครสมาชิก LearnPress */
.learn-press-register label::after {
  content: " *";
  color: #e63946; /* สีแดงเข้มตาม CI หรือใช้ #ff0000 ก็ได้ */
  font-weight: bold;
}

/* สำหรับ Elementor layout ที่มี .form-field */
.elementor .learn-press-register .form-field label::after {
  content: " *";
  color: #e63946;
  font-weight: bold;
}

/* ป้องกันซ้ำกับฟิลด์ที่ระบบมีดอกจันอยู่แล้ว (จะมี span.required) */
.learn-press-register label span.required {
  display: none !important;
}

/* จัดแนว label ให้อยู่ชิดซ้ายและเว้นระยะสวยงาม */
.learn-press-register label {
  display: inline-block;
  margin-bottom: 4px;
  color: #34393A;
  font-weight: 600;
}

/* เผื่อกรณี Elementor ซ้อน container */
.elementor-widget-shortcode .learn-press-register label::after {
  content: " *";
  color: #e63946;
  font-weight: bold;
}

/*footer pdpa*/

#moove_gdpr_cookie_info_bar.moove-gdpr-light-scheme {
background-color: #fff;
border-top: 1px solid #ebebeb !important;
}

/* กล่องรวมปุ่มให้อยู่บรรทัดเดียวของแบบฟอร์มแจ้งปัญหา */
/* ===== รวมปุ่มให้อยู่บรรทัดเดียวกันของแบบฟอร์มแจ้งปัญหา ===== */
.quform-element-submit,
.quform-element-html.qform-cf {
  display: inline-block !important;
  vertical-align: middle;
  margin: 0 4px;
}

/* ===== จัดให้อยู่ตรงกลางหน้าฟอร์มแจ้งปัญหา ===== */
.quform-elements .quform-element-submit,
.quform-elements .quform-element-html{
  text-align: center !important;
}

/* ===== ปุ่มส่งของแบบฟอร์มแจ้งปัญหา ===== */
.quform-submit {
  background-color: #57A357;
  color: #fff;
  border: none;
  width: 120px;
  height: 42px;
  border-radius: 6px;
  font-size: 16px;
  font-weight: 500;
  transition: all 0.25s ease-in-out;
  cursor: pointer;
}

.quform-submit:hover {
  background-color: #15748e;
  transform: translateY(-1px);
}

/* ===== ปุ่มยกเลิกของแบบฟอร์มแจ้งปัญหา ===== */
.qbutton.reset-button {
  background-color: #f2f2f2;
  color: #333;
  border: 1px solid #ccc;
  width: 120px;
  height: 42px;
  border-radius: 6px;
  font-size: 16px;
  font-weight: 500;
  transition: all 0.25s ease-in-out;
  cursor: pointer;
}

.qbutton.reset-button:hover {
  background-color: #FA9732;
  border-color: #FA9732;
  color: #fff;
  transform: translateY(-1px);
}
.quform-element-submit,
.quform-element-html {
  float: none !important;
  display: inline-block !important;
}




/* ซ่อนเมนูแจ้งปัญหาในทุก Device */
#menu-item-8456,
nav.nav-panel-right #menu-item-8456,
nav.nav-panel-right li.menu-item-8456,
nav.nav-panel-right .menu-item-8456 {
    display: none !important;
}

/* แสดงเฉพาะ role-cdgsmember */
body.role-cdgsmember #menu-item-8456,
body.role-cdgsmember nav.nav-panel-right #menu-item-8456,
body.role-cdgsmember nav.nav-panel-right li.menu-item-8456,
body.role-cdgsmember nav.nav-panel-right .menu-item-8456 {
    display: block !important;
}

/* แสดงเฉพาะ role-subscriber */
body.role-subscriber #menu-item-8456,
body.role-subscriber nav.nav-panel-right #menu-item-8456,
body.role-subscriber nav.nav-panel-right li.menu-item-8456,
body.role-subscriber nav.nav-panel-right .menu-item-8456 {
    display: block !important;
}










.e-n-tabs-heading {
   /* display: none !important;*/
}


/* แก้ไข space ระหว่าง content กับ เมนู page-id-8534 */
.page-id-8524 .site-header-space,
.page-id-8534 .site-header-space {
    display: none !important;
}




/************************************************************
 * LearnPress Register Form — FINAL V3
 * Fix LP Required Star + Add Star to First/Last Name + Border Sync
 ************************************************************/


/* ==========================================================
   1) GRID LAYOUT
   ========================================================== */

.learn-press-form-register .form-fields,
.learn-press-form-register .acf-user-register-fields {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    column-gap: 30px;
    row-gap: 20px;
}

/* LP password fields full width */
.learn-press-form-register .form-field:nth-child(3),
.learn-press-form-register .form-field:nth-child(4) {
    grid-column: 1 / -1;
}

/* ACF: phone full width */
.acf-field-68d9dc782d9f5 {
    grid-column: 1 / -1;
}


/* ==========================================================
   2) REQUIRED STAR SYSTEM
   ========================================================== */

/* ⭐ 1) ให้ LearnPress แสดง * ของมันเอง (Email, Username, Password) */


/* ⭐ 2) เพิ่มดอกจันทร์เฉพาะฟิลด์ First Name / Last Name ของ LP */
.learn-press-form-register label[for="reg_first_name"]:after,
.learn-press-form-register label[for="reg_last_name"]:after {
    content: " *";
    color: red;
    font-weight: bold;
    margin-left: 4px;
}


/* ⭐ 3) ACF — เพิ่มดอกจันทร์ 
.learn-press-form-register .acf-field label:after {
    content: " *";
    color: red;
    font-weight: bold;
    margin-left: 4px;
} */


/* ==========================================================
   3) INPUT HEIGHT & BORDER COLOR (เพิ่มเข้ม 5%)
   ========================================================== */

.learn-press-form-register input[type="text"],
.learn-press-form-register input[type="email"],
.learn-press-form-register input[type="password"],
.learn-press-form-register .acf-field input[type="text"] {
    width: 100%;
    height: 48px;
    padding: 10px 14px;
    border-radius: 6px;

    /* ★ Border ทั้งหมดเป็นสีเดียวกัน */
    border: 1px solid #bfbfbf !important;

    font-size: 15px;
    box-sizing: border-box;
    background-clip: padding-box;
}

/* Password wrapper height fix */
.learn-press-form-register .lp-password-wrapper {
    height: 48px;
}
.learn-press-form-register .lp-password-wrapper input {
    height: 100%;
}


/* ==========================================================
   4) REMOVE HEADING “ข้อมูลเพิ่มเติม”
   ========================================================== */

.learn-press-form-register h2 {
    display: none !important;
}


/* ==========================================================
   5) SUBMIT BUTTON FULL WIDTH
   ========================================================== */

.learn-press-form-register form > p {
    grid-column: 1 / -1;
    margin-top: 10px;
}


/* ==========================================================
   6) RESPONSIVE (MOBILE)
   ========================================================== */

@media (max-width: 768px) {
    .learn-press-form-register .form-fields,
    .learn-press-form-register .acf-user-register-fields {
        grid-template-columns: 1fr;
    }
}


/*********************************************
 * PDPA Field – LearnPress Register (ACF)
 * Field Key: field_691a80a5fc807
 *********************************************/

/* 1) ให้ PDPA กินเต็มความกว้าง 2 คอลัมน์ (แก้ปัญหา width 244px) */
.acf-field-691a80a5fc807 {
    grid-column: 1 / -1 !important;
}

/* 2) ซ่อน label "PDPA *" ที่หัว */
.acf-field-691a80a5fc807 .acf-label {
    display: none !important;
}

/* 3) เอา bullet ของ checkbox ออก */
.acf-field-691a80a5fc807 .acf-checkbox-list {
    list-style: none !important;
    margin: 0 !important;
    padding-left: 0 !important;
}

/* 4) Layout checkbox = อยู่ซ้าย / ข้อความยาวอยู่ขวา */
.acf-field-691a80a5fc807 .acf-checkbox-list li {
    display: flex !important;
    align-items: flex-start !important;
    gap: 10px;
    width: 100% !important;
}

/* 5) ตำแหน่ง checkbox ให้ตรงกับด้านบนของข้อความ */
.acf-field-691a80a5fc807 input[type="checkbox"] {
    vertical-align: top !important;
    margin-top: 3px !important;
    width: 16px;
    height: 16px;
}

/* 6) ให้ข้อความ PDPA ยืดเต็มกว้าง / แสดงหลายบรรทัด */
.acf-field-691a80a5fc807 .forminator-checkbox-label {
    display: block !important;
    width: 100% !important;
    white-space: normal !important;
    line-height: 1.6;
    margin-top: 0px;
}

/* 7) ซ่อน label ว่างที่ ACF สร้างมา (ถ้ามี) */
.acf-field-691a80a5fc807 .acf-checkbox-list li > label:empty {
    display: none !important;
}

/* แก้ ACF required mark */
.acf-required,
.acf-field .acf-required,
.acf-field .acf-label .acf-required {
    display: inline-block !important;
    color: #e63946 !important;
}

/* ป้องกัน LearnPress ซ่อนดอกจันของ ACF */
.learn-press-register label span.required {
    display: none !important; /* ซ่อนเฉพาะของ LP */
}

.acf-field .acf-label span.acf-required {
    display: inline-block !important; /* แสดงของ ACF */
}

/* ให้ label ของ ACF เอียงเหมือน LP */
.acf-field .acf-label label {
    font-style: italic !important;
		font-weight: 700;
		font-size: calc(var(--lp-font-size-base, 1em) * 0.86);
}

/*link color เน้นหน่อยจ้า */
.register-2 a,
.link-color {
		color:#000;
		text-decoration:underline !important;
}

/*คำนำหน้า*/
/* Sub-label ใต้ช่องชื่อ */
.learn-press-form-register .form-fields li:nth-child(5)::after {
    content: "หากมีชื่อนำหน้าพิเศษ เช่น น.อ., พ.ต., ดร. สามารถพิมพ์นำหน้าชื่อได้เลย";
    font-size: 13px;
    color: #666;
    display: block;
    margin-top: 4px;
}

/* Mobile + Tablet ทั้งหมด (0–1024px) */
@media (max-width: 1024px) {
    .site-branding {
        justify-content: flex-end !important;
    }

    .site-branding a.custom-logo-link {
        margin-left: auto !important;
        margin-left: 40px !important;  /* ปรับตาม UI */
    }
}