:root {
  --text-color: var(--accent-2, #2BA269);
  --background-color: var(--accent-2, #2BA269);
  --background-color-grup: #F2F4F7;
  --background-color-opcaity-32: rgba(158, 216, 134, 0.32);
  --text-color-reset: #ff0000;


  --fs-16: 16px;
  --fs-18: 18px;
  --fs-20: 20px;
  --control-height: 32px;
}

/* ==========================================
   STYLE CORE & LAYOUT REVAMP (DESKTOP BASED)
   ========================================== */
.accessibility-panel {
  position: fixed;
  background: #fff;
  color: #000;
  border: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 9998;
  border-radius: 20px;
  padding: 0; /* Reset default dialog padding */
  width: min(480px, calc(100vw - 125px));
  max-width: 500px;
  top: max(24px, env(safe-area-inset-top, 24px));
  bottom: 30px;
  right: 105px;
  left: auto;
  height: auto;
  max-height: calc(100vh - 60px);
  max-height: calc(100dvh - 60px);
}

/* Saat user sedang login (WordPress Admin Bar aktif) */
body.admin-bar .accessibility-panel {
  top: calc(32px + 15px); /* 47px */
  max-height: calc(100vh - 92px);
  max-height: calc(100dvh - 92px);
}

@media (max-width: 782px) {
  body.admin-bar .accessibility-panel {
    top: calc(46px + 15px); /* 61px */
  }
}

@media (max-width: 768px) {
  .accessibility-panel {
    width: auto;
    max-width: calc(100vw - 24px);
    left: 12px;
    right: 12px;
    bottom: 144px;
    top: max(20px, env(safe-area-inset-top, 20px));
    height: auto;
    max-height: calc(100vh - 175px);
    max-height: calc(100dvh - 175px);
    margin: 0;
  }

  body.admin-bar .accessibility-panel {
    top: calc(46px + 12px); /* 58px */
    max-height: calc(100vh - 215px);
    max-height: calc(100dvh - 215px);
  }
}

.container-main-panel {
  position: relative;
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0;

  /* Firefox */
  scrollbar-width: thin;
  scrollbar-color: var(--background-color) transparent;
}

/* Chrome / Edge / Safari */
.container-main-panel::-webkit-scrollbar {
  width: 12px;
}

.container-main-panel::-webkit-scrollbar-track {
  background: transparent;
  border-radius: 999px;
  margin: 8px 4px;
}

.container-main-panel::-webkit-scrollbar-thumb {
  background: var(--background-color);
  border-radius: 999px;
  border: 3px solid transparent;
  background-clip: padding-box;
}

.container-main-panel::-webkit-scrollbar-thumb:hover {
  background: var(--background-color);
  border: 3px solid transparent;
  background-clip: padding-box;
}
.container-button-drag {
  align-items: center;
  padding: 2px 28px;
  padding-bottom: 0;
  cursor: grab;
  background: var(--background-color);
  color: #ffffff;
}
.container-button-drag-main{
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}
.container-button-drag-main h2 {
  margin: 0;
  font-size: var(--fs-20);
  font-weight: 600;
}
.container-button-drag-border {
  height: 1px;
  width: 100%;
  background-color:  var(--background-color-grup);
  opacity: 40%;
}

.panel-footer-sticky {
  padding: 16px 28px;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  background: #fff;
  display: flex;
  justify-content: center;
  align-items: center;
}

.reset-btn {
  width: 100%;
  padding: 14px 0px;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 600;
  border: none;
  font-size: var(--fs-16);
  text-align: center;
  background: var(--background-color);
  color: #fff;
}

/* Card Section Reddish Soft Background styling */
.section-card-group {
  background: var(--background-color-grup);
  border-radius: 16px;
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  gap: 26px;
}

.accessibility-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.accessibility-menu-title {
  display: flex;
  align-items: center;
  gap: 4px;
}

.accessibility-menu-title svg {
  width: 24px;
  height: 24px;
  padding-block: 20px;
  flex-shrink: 0;
  color: white;
}

.accessibility-menu-title h3 {
  margin: 0px;
}

.section-title {
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  color: rgba(0, 0, 0, 0.56);
  margin: 0;
  padding-left: 4px;
}

.containerbutton {
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: transparent;
  padding: 4px 0px;
}

/* Polos layout untuk Content Scaling (Tanpa Box Putih) */
.content-scaling-polos {
  background: transparent;
  padding: 8px 4px;
}

/* ==========================================
   EXTERNAL HEADER GROUP (Header di Luar Box)
   ========================================== */

.external-header-group {
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: transparent;
  width: 100%;
}

.external-header-group .custom-color-header,
.external-header-group .sub-group-header,
.external-header-group .highlight-header-info {
  padding: 0 4px;
}

/* ==========================================
   GROUP BOX LAYOUT & SEPARATOR SYSTEM
   ========================================== */

.box-inner-list {
  background: #ffffff;
  border-radius: 12px;
  padding: 8px 20px;
  display: flex;
  flex-direction: column;
  gap: 0; /* Menggunakan separator border */
}

/* Separator Line */
.separator-row {
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

/* ==========================================
   ALIGNMENT & INLINE STEPPERS (JUSTIFY-BETWEEN)
   ========================================== */

.stepper-inline-container {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
}

.stepper-header {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1;
  min-width: 0;
}

.stepper-header .feature-info {
  flex: 1;
  min-width: 0;
}

/* Step Plus Minus Controls */
.step-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: transparent;
  flex-shrink: 0;
  min-width: 0;
  width: auto;
}

@media (max-width: 480px) {
  .stepper-inline-container {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  .stepper-header {
    width: 100%;
  }
  .step-controls {
    width: 100%;
    justify-content: space-between;
  }
}

.stepper-inline-container .feature-info-title {
  margin: 0;
}

.step-controls .button {
  width: var(--control-height);
  height: var(--control-height);
  padding: 0;
  margin: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  color: var(--background-color);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.step-controls .button svg {
  width: var(--control-height);
  height: var(--control-height);
}

.default-indicator-text {
  font-size: var(--fs-16);
  color: #000;
  font-weight: 500;
  min-width: 50px;
  text-align: center;
}

/* Layout Vertikal Fleksibel dengan Icon */
.layout-with-icon {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
}

.icon-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--background-color);
  flex-shrink: 0;
  width: 24px;
  height: 24px;
}

.feature-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 16px;
  cursor: pointer;
}

.feature-info {
  flex: 1;
  min-width: 0;
}

.feature-info-title {
  display: block;
  font-size: var(--fs-18);
  font-weight: 500;
  color: #000000;
  margin: 0 0 4px 0;
}

.feature-info-desc {
  display: block;
  font-size: var(--fs-16);
  color: rgba(0, 0, 0, 0.7);
  margin: 0;
}

/* ==========================================
   EXPANDABLE COLOR PICKER (JUSTIFY-BETWEEN ROW)
   ========================================== */

.control-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
}

.control-row .feature-info-title {
  margin: 0;
  font-weight: 500;
  font-size: var(--fs-16);
}

@media (max-width: 480px) {
  .control-row {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .color-control-actions {
    width: 100%;
    justify-content: space-between;
    min-width: 0;
  }
}

.color-control-actions .button.button-reset {
  color: var(--text-color-reset);
}

.color-row-item .feature-info-title {
  margin: 0;
  font-weight: 500;
  font-size: var(--fs-16);
}

.color-picker-round-wrapper {
  position: relative;
  width: 32px;
  height: var(--control-height);
  border-radius: 50%;
  border: 1px solid var(--background-color-opcaity-32);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* Custom rounded color input */
.color-picker-round-wrapper input[type="color"] {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 28px;
  height: 28px;
  border: none;
  padding: 0;
  margin: 0;
  cursor: pointer;
  border-radius: 50%;
  appearance: none;
  -webkit-appearance: none;
}

.color-picker-round-wrapper input[type="color"]::-webkit-color-swatch-wrapper {
  padding: 0;
}

.color-picker-round-wrapper input[type="color"]::-webkit-color-swatch {
  border: none;
  border-radius: 50%;
}

.color-picker-round-wrapper input[type="color"]::-moz-color-swatch {
  border: none;
  border-radius: 50%;
}

.color-control-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.color-control-actions .button {
  padding: 6px 10px;
  font-size: var(--fs-16);
  border-radius: 6px;
  font-weight: 600;
  background: transparent;
  color: var(--background-color);
  border: none;
  cursor: pointer;
  transition: opacity 0.2s;
}

.color-control-actions .button:hover {
  opacity: 0.8;
}

.color-control-actions .button.bg-black-aceesibility {
  background: transparent;
  color: var(--background-color);
  font-weight: 700;
}

/* ==========================================
   SEGMENTED BUTTONS INTEGRATION
   ========================================== */

.layout-segmented-row {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

.layout-segmented-row.layout-with-icon {
  display: grid;
  grid-template-columns: 24px 1fr;
  column-gap: 14px;
  row-gap: 12px;
  align-items: center;
}

.layout-segmented-row.layout-with-icon .icon-wrapper {
  grid-column: 1;
  grid-row: 1;
}

.layout-segmented-row.layout-with-icon .feature-info {
  grid-column: 2;
  grid-row: 1;
  min-width: 0;
}

.layout-segmented-row.layout-with-icon .custom-segmented {
  grid-column: 1 / -1;
  grid-row: 2;
  width: 100%;
  margin-top: 4px;
}

.custom-segmented {
  display: flex;
  flex: 1;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  padding: 4px;
  box-sizing: border-box;

  background: #ffffff;
  border: 1px solid var(--background-color-opcaity-32);
  border-radius: 120px;

  overflow: hidden;
}

.custom-segmented .mode-btn,
.custom-segmented .segmented-label-btn {
  flex: 1 1 0%;
  min-width: 0;
  width: 100%;
  height: var(--control-height);

  margin: 0;
  padding: 0;

  display: flex;
  align-items: center;
  justify-content: center;

  box-sizing: border-box;

  text-align: center;
  cursor: pointer;
}

.custom-segmented .mode-btn,
.custom-segmented .segment-btn-view {
  width: 100%;
  height: var(--control-height);

  display: flex;
  align-items: center;
  justify-content: center;

  padding: 0;
  margin: 0;

  box-sizing: border-box;

  background: transparent;
  color: var(--text-color);

  border: none;
  border-radius: 120px;

  font-size: var(--fs-16);
  font-weight: 500;

  /* white-space: nowrap; */
  overflow: hidden;
  text-overflow: ellipsis;

  transition: all 0.2s ease;
}

.custom-segmented .mode-btn.active {
  background: var(--background-color);
  color: #ffffff;
  font-weight: 600;
}

.custom-segmented .hidden-switch-trigger:checked + .segment-btn-view {
  background: var(--background-color);
  color: #ffffff;
  font-weight: 600;
}

.hidden-switch-trigger {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.custom-segmented .segmented-label-btn {
  position: relative;
  flex: 1 1 0%;
  min-width: 0;
}

.custom-segmented .segmented-label-btn .segment-btn-view {
  flex: 1;
}

/* ==========================================
   STANDARD BASE SWITCH & FLOATING TOGGLE BINDINGS
   ========================================== */

.switch-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
  width: 56px;
  height: var(--control-height);
  flex: 0 0 56px;
}

.switch-input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.switch-slider {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  background: #ffffff;
  border: 1px solid var(--background-color-opcaity-32);
  border-radius: 100px;
  box-sizing: border-box;
  transition: background 0.3s;
}

.switch-slider::before {
  content: "";
  position: absolute;
  width: 24px;
  height: 24px;
  top: 50%;
  left: 3px;
  transform: translateY(-50%);
  border-radius: 50%;
  background: var(--background-color);
  transition: left 0.3s ease, background 0.3s ease;
}

.switch-input:checked + .switch-slider {
  background: var(--background-color);
}

.switch-input:checked + .switch-slider::before {
  left: calc(100% - 27px);
  background: #fff;
}

/* ==========================================
   Floating Action Button (FAB)
   ========================================== */

.accessibility-fab {
  position: fixed;
  bottom: 105px;
  right: 30px;
  border: 1px solid #fff;
  border-radius: 50%;
  width: 60px;
  height: 60px;
  cursor: pointer;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  background-color: var(--primary-green, #9ED886);
  color: #000000;
  transition:
          background 0.2s,
          transform 0.2s;
}

.accessibility-fab svg {
  width: 35px;
  height: 35px;
}

.accessibility-fab:hover {
  transform: scale(1.08);
}

@media (max-width: 768px) {
  .accessibility-fab {
    bottom: 82px;
    right: 20px;
    width: 50px;
    height: 50px;
  }

  .accessibility-fab svg {
    width: 28px;
    height: 28px;
  }
}


.bg-black-aceesibility {
  background-color: var(--background-color);
  color: #000000;
}

.reading_mask {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.75);
  z-index: 999999;
  pointer-events: none;
  display: none; /* Akan diubah JS menjadi 'block' saat aktif */
}

.reading_mask.active {
  display: block;
}

.hidden {
  display: none;
}

/* Class pembantu untuk mematikan SEMUA animasi & transisi secara instan */
.no-transition,
.no-transition * {
  -webkit-transition: none !important;
  -moz-transition: none !important;
  -o-transition: none !important;
  transition: none !important;
  animation: none !important;
}
/* =========================================================================
   TOP ACCENT BANNER (.blue-1) & CONTENT CONTAINER (.conainer-section)
   Menggunakan absolute positioning untuk latar aksen hijau, sehingga konten
   berada dalam flow normal dan jaraknya 100% stabil di semua ukuran layar
   tanpa perlu hack margin negatif (%) ataupun media query bertingkat.
   ========================================================================= */

.blue-1 {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 120px; /* Tinggi aksen warna latar di bagian atas */
  background-color: var(--background-color);
  pointer-events: none;
  z-index: 0;
}

.blue-1-1 {
  display: none; /* Dinonaktifkan karena tinggi aksen sudah ditentukan secara pasti oleh .blue-1 */
}

.conainer-section {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 32px;
  /* Jarak padding-top 18px ini stabil dan konsisten di semua layar */
  padding: 40px 28px 24px 28px;
}

@media (max-width: 480px) {
  .conainer-section {
    padding: 40px 20px 24px 20px;
  }
}

.section-title-1 {
  color: #ffffff;
  margin: 0;
  font-weight: 600;
}
