#theme-indexlaw .ls-rating-row,
#theme-law .ls-rating-row {
  flex-wrap: wrap;
  gap: 8px 10px;
}

#theme-indexlaw .ls-auto-rating-inline,
#theme-law .ls-auto-rating-inline {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 500;
  color: #2b2b2b;
  line-height: 1.3;
  margin-bottom: 10px;
}

#theme-indexlaw .ls-auto-rating-inline strong,
#theme-law .ls-auto-rating-inline strong {
  color: #1e5fb4;
  font-weight: 700;
}

#theme-law .ls-auto-rating-block {
  margin-bottom: 10px;
}

#theme-indexlaw .ls-rating-info-trigger,
#theme-law .ls-rating-info-trigger {
  border: 0;
  background: transparent;
  padding: 0;
  margin: 0;
  line-height: 1;
  color: #1e5fb4;
  cursor: pointer;
}

#theme-indexlaw .ls-rating-info-trigger:hover,
#theme-law .ls-rating-info-trigger:hover {
  color: #154a8c;
}

.ls-rating-info-modal .modal-body {
  font-size: 15px;
  line-height: 1.6;
}

.ls-rating-info-modal .modal-body h3,
.ls-rating-info-modal .modal-body h4 {
  margin-bottom: 10px;
  color: #1c1c1c;
}

.ls-rating-info-modal .modal-body ul {
  padding-left: 18px;
  margin-bottom: 12px;
}

.ls-rating-info-modal .modal-body li {
  margin-bottom: 6px;
}

/* Keep rating-info modal hidden by default even when Bootstrap modal CSS is unavailable. */
.ls-rating-info-modal {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow-y: auto;
  padding: 28px 14px;
  background-color: rgba(0, 0, 0, 0.6) !important;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity 0.26s ease,
    visibility 0.26s ease;
}

.ls-rating-info-modal.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.ls-rating-info-modal .modal-dialog {
  width: min(860px, 100%);
  margin: 0 auto;
  transform: translateY(22px) scale(0.98);
  transition: transform 0.26s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.ls-rating-info-modal.is-open .modal-dialog {
  transform: translateY(0) scale(1);
}

.ls-rating-info-modal .modal-content {
  background: #fff;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: 0 22px 54px rgba(6, 16, 32, 0.34);
  overflow: hidden;
}

.ls-rating-info-modal .modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid #ececec;
}

.ls-rating-info-modal .modal-title {
  margin: 0;
  font-size: 22px;
  line-height: 1.3;
}

.ls-rating-info-modal .close {
  border: 0;
  background: transparent;
  padding: 0;
  margin: 0;
  color: #1a1a1a;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.ls-rating-info-modal .modal-body {
  max-height: calc(100vh - 140px);
  overflow-y: auto;
  padding: 18px;
}

body.ls-rating-modal-open {
  overflow: hidden;
}

@media (max-width: 767px) {
  .ls-rating-info-modal {
    padding: 12px;
    align-items: flex-start;
  }

  .ls-rating-info-modal .modal-dialog {
    transform: translateY(16px) scale(0.985);
  }

  .ls-rating-info-modal .modal-title {
    font-size: 19px;
  }

  .ls-rating-info-modal .modal-body {
    max-height: calc(100vh - 110px);
    padding: 14px;
  }
  #theme-indexlaw .ls-auto-rating-inline,
  #theme-law .ls-auto-rating-inline {
    gap: 3px;
  }
}
