.rala-product-agreement-index {
  background: #f3f4f6;
  border-left: 6px solid #f09100;
  margin: 1.5rem 0 2rem;
  padding: 1rem 1.25rem;
}

.rala-product-agreement-index__title {
  font-size: 1rem;
  font-weight: bold;
  margin-bottom: .5rem;
  text-transform: uppercase;
}

.rala-product-agreement-index ul {
  margin: 0;
  padding: 0;
}

.rala-product-agreement-index li {
  list-style: none;
  margin: .25rem 0;
}

.rala-product-agreements {
  background: #f8f9fa;
  border: 1px solid #c9d2da;
  margin: 2rem 0;
  padding: 1rem;
}

.rala-product-agreements[aria-busy="true"] {
  opacity: .75;
}

.rala-product-agreements__header {
  align-items: center;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.rala-product-agreements h3,
.rala-product-agreements h4 {
  margin: 0;
}

.rala-product-agreements h3 {
  font-size: 1.15rem;
}

.rala-product-agreements h4 {
  font-size: .95rem;
  font-weight: bold;
  margin-bottom: .75rem;
  text-transform: uppercase;
}

.rala-product-agreements__status {
  color: #6c757d;
  font-size: .85rem;
}

.rala-product-agreements__message {
  border: 1px solid transparent;
  margin-bottom: 1rem;
  margin-top: .75rem;
  padding: .75rem;
}

.rala-product-agreements__message.is-error {
  background: #fff5f5;
  border-color: #e73339;
  color: #982126;
}

.rala-product-agreements__message.is-success {
  background: #ecfff8;
  border-color: #00af72;
  color: #006b46;
}

.rala-product-agreements__section {
  border-top: 1px solid #dce3ea;
  padding: 1rem 0;
}

.rala-product-agreements__section:first-of-type {
  border-top: 0;
}

.rala-product-agreements__service {
  align-items: baseline;
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
}

.rala-product-agreements__service-name {
  font-weight: bold;
}

.rala-product-agreements__change {
  border: 0;
  box-shadow: none;
  line-height: 1.2;
  padding: 0;
  text-transform: none;
}

.rala-product-agreements__product {
  align-items: center;
  display: flex;
  gap: .75rem;
  padding: .4rem 0;
}

.rala-product-agreements__product label {
  align-items: center;
  display: flex;
  gap: .5rem;
  margin: 0;
}

.rala-product-agreements__product-code {
  color: #6c757d;
  font-size: .85rem;
}

.rala-product-agreements__modal[hidden] {
  display: none;
}

.rala-product-agreements__modal {
  bottom: 0;
  left: 0;
  position: fixed;
  right: 0;
  top: 0;
  z-index: 1050;
}

.rala-product-agreements__modal-backdrop {
  background: rgba(0, 0, 0, .45);
  bottom: 0;
  left: 0;
  position: absolute;
  right: 0;
  top: 0;
}

.rala-product-agreements__modal-dialog {
  background: #fff;
  border: 1px solid #c9d2da;
  box-shadow: 0 1rem 3rem rgba(0, 0, 0, .2);
  left: 50%;
  max-height: calc(100vh - 3rem);
  max-width: min(560px, calc(100vw - 2rem));
  overflow: auto;
  padding: 1rem;
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
}

.rala-product-agreements__modal-header,
.rala-product-agreements__modal-actions {
  align-items: center;
  display: flex;
  gap: .75rem;
  justify-content: space-between;
}

.rala-product-agreements__modal-header {
  border-bottom: 1px solid #dce3ea;
  margin-bottom: .75rem;
  padding-bottom: .75rem;
}

.rala-product-agreements__modal-header h5 {
  font-size: 1rem;
  font-weight: bold;
  margin: 0;
}

.rala-product-agreements__modal-close {
  background: transparent;
  border: 0;
  color: #343a40;
  font-size: 1.6rem;
  line-height: 1;
  padding: 0 .25rem;
}

.rala-product-agreements__product-list {
  margin-bottom: 1rem;
}

.rala-product-agreements__modal-actions {
  border-top: 1px solid #dce3ea;
  justify-content: flex-end;
  padding-top: .75rem;
}

.rala-product-agreements__publish-row,
.rala-product-agreements__update-row,
.rala-product-agreements__debug-row {
  align-items: end;
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  margin-top: .75rem;
}

.rala-product-agreements__update-row {
  align-items: center;
  border-top: 1px solid #dce3ea;
  justify-content: space-between;
  padding-top: 1rem;
}

.rala-product-agreements__update-row div {
  display: grid;
  gap: .2rem;
}

.rala-product-agreements__update-row span {
  color: #6c757d;
  font-size: .85rem;
}

.rala-product-agreements__debug-row {
  border-top: 1px solid #dce3ea;
  padding-top: 1rem;
}

.rala-product-agreements__date {
  display: grid;
  gap: .25rem;
  margin: 0;
  min-width: 220px;
}

.rala-product-agreements__date span {
  font-size: .85rem;
  font-weight: bold;
}

.rala-product-agreements__history-product {
  border-top: 1px solid #dce3ea;
  padding: .75rem 0;
}

.rala-product-agreements__history-product:first-child {
  border-top: 0;
}

.rala-product-agreements__history-title {
  font-weight: bold;
  margin-bottom: .35rem;
}

.rala-product-agreements__history table {
  background: #fff;
  box-shadow: none;
  margin: .5rem 0 0;
  min-width: 0;
  width: 100%;
}

.rala-product-agreements__history td,
.rala-product-agreements__history th {
  font-size: .85rem;
  padding: .35rem .5rem;
}

.rala-product-agreements__history tbody tr,
.rala-product-agreements__history tbody tr td {
  background: #fff;
}

.rala-product-agreements__history tbody tr.rala-product-agreements__history-current,
.rala-product-agreements__history tbody tr.rala-product-agreements__history-current td {
  background: #e7f1ff;
}

@media screen and (max-width: 767px) {
  .rala-product-agreements__header,
  .rala-product-agreements__product,
  .rala-product-agreements__publish-row,
  .rala-product-agreements__update-row,
  .rala-product-agreements__debug-row {
    align-items: stretch;
    display: grid;
    grid-template-columns: 1fr;
  }
}
