/* Final layout support for rules & regulations detail page */
.rules-regulation-sidebar {
  position: sticky;
  top: 24px;
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  background-color: #F8F8F8;
  border-radius: 8px;
  padding: 8px;
}
.rules-regulation-content {
  position: relative;
  padding-right: 12px;
  overflow-y: auto;
  scroll-behavior: smooth;
  min-height: 0;
  max-height: calc(100vh - 80px);
}
.rule-panel {
  margin-bottom: 32px;
}
.dark .rule-panel {
  border-color: #FFFFFF10;  
}
.chapter-cards article{
  border-bottom: 1px solid #CED1D6;
  padding-bottom: 16px;
}
.dark .chapter-cards article{
  border-color: #FFFFFF1A;
}
.chapter-cards article:last-child{
  border-bottom: none;
}
.rules-regulation-content::-webkit-scrollbar,
.rules-regulation-sidebar::-webkit-scrollbar {
  width: 8px;
}
.rules-regulation-content::-webkit-scrollbar-thumb,
.rules-regulation-sidebar::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.12);
  border-radius: 9999px;
}
.rules-regulation-sidebar::-webkit-scrollbar-track,
.rules-regulation-content::-webkit-scrollbar-track {
  background: transparent;
}
.dark .chapter-tab.active{
  color: #130F26 !important;
}

.chapter-cards {
    border: 1px solid #CED1D6;
    border-radius: 6px;
    padding: 16px;
    /* border-bottom:0; */
}

.dark .chapter-content p , .dark .chapter-content span , .dark .chapter-content ul , .dark .chapter-content li {
    background-color: transparent !important;
    color: #F5F5F5 !important;
    line-height: 150%;
}

.rules-regulation-sidebar {
  position: sticky;
  top: 24px;
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  min-height: 0;
}

.rules-regulation-content {
  overflow-y: auto;
  scroll-behavior: smooth;
  min-height: 0;
}

.rule-panel .document-header {
  position: sticky;
  top: 0;
  z-index: 10;
  padding-top:6px;
  padding-bottom: 0.75rem;
  background-color: #fff;
}

.dark .rule-panel .document-header {
  color: #FFF;
  background-color: #10191f;
}
.document-item{
  padding: 12px;
  border-radius: 6px;
  color: #130F26;
  font-weight: 400;
  background-color: #EDF3EB;
}

.document-item.active {
  border-color: #B8CEB1;
  background-color: #B8CEB1 !important;
  font-weight: 700;
}

.chapter-tab {
  border-radius: 50px;
  font-size: 14px;
  font-weight: 400;
  border: 1px solid #CED1D6;
  padding: 8px 12px;

}

.chapter-tab.active{
  background-color: #EAE8D9;
  font-weight: 700;
}

.dark.chapter-tab.active {
  color: #000;
}
.chapter-cards h3{
    color: #130F26;
    font-size: 18px;
    font-weight: 700;
    line-height: 150%;
}
.chapter-cards p{
    margin: 0 !important;
    margin-bottom: 0.75rem !important;
    color: #130F26;
    font-size: 16px;
    font-weight: 400;
    line-height: 150%;
    padding: 0 !important;
}
.chapter-cards p span{
    color: #130F26;
    font-size: 16px;
    font-weight: 400;
    line-height: 150%;
    margin: 0;
}
.chapter-cards ul{
    color: #130F26;
    font-size: 16px;
    font-weight: 400;
    line-height: 150%;
    margin: 0;
    padding-left: 1.5rem;
    list-style-type: disc;
}
[dir="rtl"] .chapter-cards ul, [dir="rtl"] .chapter-cards ol {
    padding-left: 0;
    padding-right: 1.5rem;
}

.chapter-cards ol{
    color: #130F26;
    font-size: 16px;
    font-weight: 400;
    line-height: 150%;
    margin: 0;
    padding-left: 1.5rem;
    list-style-type: decimal;
}
.chapter-cards ul li{
    color: #130F26;
    font-size: 16px;
    font-weight: 400;
    line-height: 150%;
    margin: 0;
}

.dark .document-item.active{
      color: #130F26;
    background-color: #B6D8AB;
}
.dark .chapter-cards h3, .dark .chapter-cards p, .dark .chapter-cards ul, .dark .chapter-cards li {
      color: #fff !important;
    background-color: transparent !important;
}
.dark .chapter-cards {
    border: 1px solid #FFFFFF1A;
}
.mobile-accordion-body .wp-block-table table, .chapter-cards .wp-block-table table {
  width: 100% !important;
  overflow-x: auto;
  display: block;
}
 .mobile-accordion-body .wp-block-table table th, .chapter-cards .wp-block-table table th, .mobile-accordion-body .wp-block-table table td, .chapter-cards .wp-block-table table td {
  border: 1px solid #CED1D6 !important;
}
.wp-block-table table th, .wp-block-table table td {
  padding: 10px;
}
 .dark .chapter-cards .wp-block-table table th, .dark .mobile-accordion-body .wp-block-table table, .dark .chapter-cards .wp-block-table table td, .dark .chapter-cards .wp-block-table table {
  border: 1px solid #FFFFFF1A !important;
}

@media (max-width: 767px) {
  /* .the_content_wrapper {
    display: block;
    overflow: visible;
  } */
  .chapter-cards{
        border-bottom:0;
  }
  
  .rules-regulation-sidebar {
    position: static;
    top: auto;
    max-height: none;
    overflow: visible;
    padding: 0;
  }

  .rules-regulation-sidebar .document-list {
    display: grid;
    gap: 0.75rem;
    padding: 0;
  }

  .rules-regulation-sidebar .document-item {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    border: 1px solid #D1D5DB;
    border-radius: 18px;
    background-color: #FFFFFF;
    color: #130F26;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  }

  .rules-regulation-sidebar .document-item.active {
    background-color: #E5F4E4 !important;
    border-color: #A3D1A6;
    font-weight: 700;
  }

  .rules-regulation-sidebar .document-item:focus-visible {
    outline: 2px solid #2563EB;
    outline-offset: 2px;
  }

  .rules-regulation-content {
    overflow: visible;
    padding-top: 16px;
  }

  .rule-panel {
    display: none;
  }

  .rule-panel.active-panel {
    display: block;
  }

  .rule-panel .document-header {
    position: static;
    top: auto;
    padding-top: 0;
    padding-bottom: 0;
    background-color: transparent;
  }

  .chapter-navigation {
    padding-bottom: 0.75rem;
  }

  .chapter-tabs {
    flex-wrap: nowrap;
    min-width: 100%;
  }

  .chapter-tabs .chapter-tab {
      min-width: fit-content;
      padding: 8px 12px;
      border-radius: 50px;
      white-space: nowrap;
      font-size: 14px;
  }

  .chapter-tabs .chapter-tab:focus-visible {
    outline: 2px solid #2563EB;
    outline-offset: 2px;
  }

  .mobile-accordion-card .mobile-accordion-header{
    border-radius: 6px;
    background: #DCE6D8;
  }
  .dark .mobile-accordion-card .mobile-accordion-header {
    background: #FFFFFF1A;
  }

  .mobile-accordion-header {
    width: 100%;
    border: none;
    background: transparent;
    text-align: left;
    position: sticky;
    top: 0;
    z-index: 9;
  }

  .mobile-accordion-header[aria-expanded="true"] {
    background-color: #B8CEB1;
  }

  .dark .mobile-accordion-header[aria-expanded="true"] {
    background-color: #B6D8AB;
    color: #130F26;
  }
  .mobile-accordion-icon {
    transform: rotate(0deg);
  }

  .mobile-accordion-header[aria-expanded="true"] .mobile-accordion-icon {
    transform: rotate(180deg);
  }
.mobile-accordion-header[aria-expanded="true"] .mobile-accordion-icon img{
  filter:unset;
}
  .mobile-accordion-body {
    display: none;
    max-height: calc(100vh - 300px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;

  }

  .mobile-accordion-body:not(.hidden) {
      display: block; 
     border-bottom: 1px solid #ced1d6;
    border-radius: 6px;
  }
  .dark .mobile-accordion-body:not(.hidden) {
    border-bottom: 1px solid #FFFFFF1A;
  }
  .mobile-accordion-body .chapter-navigation {
    position: sticky;
    top: 0;
    z-index: 20;
    background: white;
    padding-top: 1rem;
    padding-bottom: 1rem;
  }
  .dark .mobile-accordion-body .chapter-navigation {
    background: #11191F;
    border-color: #FFFFFF1A;
  }
  .dark .chapter-cards{
    border-color: #FFFFFF1A;
  }
  .chapter-cards article{
    border:0;
    background-color: transparent;
  }
}


