/**
 * Cookie consent overrides — โหลดหลัง main.min.css
 * ใช้กับ CookieConsent v3 (#cc-main) และ body lock ของ T-REG
 */

html.show--preferences,
html.show--preferences body,
html.treg-cookie-settings-open {
  overflow: hidden !important;
  height: 100% !important;
}

html.treg-cookie-settings-open body {
  position: fixed !important;
  width: 100% !important;
  left: 0 !important;
  right: 0 !important;
  overflow: hidden !important;
  overscroll-behavior: none !important;
}

html.treg-cookie-settings-open body .wrapper,
html.treg-cookie-settings-open body .body-wrapper {
  overflow: hidden !important;
}

html.disable--interaction.show--preferences,
html.disable--interaction.show--preferences body {
  height: auto !important;
  overflow: hidden !important;
}

/* --- CookieConsent v3 (orestbida) --- */
#cc-main .cm--cloud {
  border: 0 !important;
  box-shadow: 0 0.5rem 2rem rgba(0, 0, 0, 0.12) !important;
  max-width: min(900px, calc(100vw - 2rem)) !important;
  border-radius: 1.25rem !important;
  padding: 1.5rem 1.75rem !important;
  margin-bottom: 1.25rem !important;
}

#cc-main .cm--cloud .cm__body {
  align-items: center !important;
  gap: 1.25rem !important;
}

#cc-main .cm--cloud h4,
#cc-main .cm--cloud .cm__desc a {
  color: #04a14e !important;
  background: none !important;
}

#cc-main .cm--cloud h4 {
  font-size: 1.625rem !important;
  font-weight: 700 !important;
}

#cc-main .cm--cloud .cm__desc {
  font-size: 0.875rem !important;
}

#cc-main .cm--cloud .cm__btns {
  border: 0 !important;
  max-width: none !important;
}

#cc-main .cm--cloud.cm--inline .cm__btn-group {
  flex-direction: row !important;
  flex-wrap: wrap !important;
  gap: 0.5rem 1rem !important;
  justify-content: flex-end !important;
}

#cc-main .cm--cloud.cm--inline .cm__btn {
  min-width: auto !important;
  padding: 0.65rem 2rem !important;
  font-weight: 600 !important;
  border-radius: 2rem !important;
}

#cc-main .cm--cloud .cm__btn {
  background: #04a14e !important;
  border-color: #04a14e !important;
  color: #fff !important;
}

#cc-main .cm--cloud .cm__btn:hover {
  background: #008941 !important;
  border-color: #008941 !important;
}

#cc-main .cm--cloud button[data-role="showPreferencesBtn"],
#cc-main .cm--cloud .cm__btn--secondary {
  background: transparent !important;
  border: 0 !important;
  color: #333 !important;
  padding: 0.35rem 0.5rem !important;
  font-weight: 400 !important;
  text-decoration: underline !important;
  min-height: auto !important;
  border-radius: 0 !important;
}

#cc-main .cm--cloud .cm__btn[data-role="showPreferencesBtn"]:hover,
#cc-main .cm--cloud .cm__btn--secondary:hover {
  background: transparent !important;
  color: #04a14e !important;
}

#cc-main .cm--cloud .cm__btn:not([data-role="showPreferencesBtn"]):not(.cm__btn--secondary) {
  background: #04a14e !important;
  border-color: #04a14e !important;
}

#cc-main .pm--box {
  display: flex !important;
  flex-direction: column !important;
  max-height: min(37.5em, calc(100vh - 2rem)) !important;
  left: 50% !important;
  right: auto !important;
  width: calc(100% - 2rem) !important;
  max-width: 43em !important;
  margin: 0 !important;
  transform: translate(-50%, calc(-50% + 1.6em)) !important;
}

html.show--preferences #cc-main .cc--anim .pm--box {
  transform: translate(-50%, -50%) !important;
}

#cc-main .pm__body {
  min-height: 0 !important;
  overflow-y: auto !important;
}

#cc-main .pm__btn:not(.pm__btn--secondary) {
  background: #04a14e !important;
  border-color: #04a14e !important;
  color: #fff !important;
}

#cc-main .pm__btn:not(.pm__btn--secondary):hover {
  background: #008941 !important;
  border-color: #008941 !important;
}

#cc-main .pm__btn--secondary,
#cc-main .pm__footer .pm__btn--secondary {
  background: transparent !important;
  border-color: transparent !important;
  color: #757575 !important;
  font-weight: 400 !important;
}

#cc-main .pm__btn--secondary:hover {
  background: transparent !important;
  border-color: transparent !important;
  color: #5c5c5c !important;
}

#cc-main .cm__btn,
#cc-main .pm__btn:not(.pm__btn--secondary) {
  background: #04a14e !important;
  border-color: #04a14e !important;
}

#cc-main .cm__btn:hover,
#cc-main .pm__btn:not(.pm__btn--secondary):hover {
  background: #008941 !important;
  border-color: #008941 !important;
}
