/* Report Builder Modal */

.report-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  visibility: hidden;
  opacity: 0;
  transition:
    opacity 0.2s ease,
    visibility 0.2s ease;
}

.report-modal.is-open {
  visibility: visible;
  opacity: 1;
}

.report-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgb(0 0 0 / 65%);
}

.report-modal-dialog {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 1000px;
  max-height: calc(100vh - 3rem);
  overflow: hidden;
  background: #fff;
  border-radius: 30px;
  box-shadow: 0 10px 40px rgb(0 0 0 / 25%);
}

.report-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--header-border);
}

.report-modal-header h3 {
  margin: 0;
}

.report-modal-header .report-modal-close {
  background: none;
  color: var(--grey);
  font-size: 2rem;
  line-height: 1;
}

.report-modal-close {
  border: 0;
  cursor: pointer;
}

.report-modal-body {
  padding: 1.5rem;
  overflow-y: auto;
}

.report-modal-body .subtitle {
  margin: 0 0 1.25rem;
}

.reports-null {
  padding: 1.5rem;
  background: var(--light-green-bg);
  text-align: center;
}

.reports-null p {
  margin: 0;
}

.reports-list {
  padding: 0;
}

.reports-null[hidden],
.reports-list[hidden] {
  display: none !important;
}

.reports-list:not([hidden]) {
  display: block;
}

.reports-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1rem;
  background: var(--light-green-bg);
  margin: 0;
}

.reports-list li:not(:last-of-type) {
  border-bottom: 1px solid var(--secondary-green);
}

.reports-list li .report-remove,
.report-modal-footer .link-reset {
  background: var(--secondary-green);
}

.reports-list li .report-remove:hover,
.report-modal-footer .link-reset:hover {
  background: #fff;
}

.reports-list li h5 {
  margin: 0;
  color: var(--grey);
}

.report-modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  border-top: 1px solid var(--header-border);
}

.report-modal-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.5rem;
}

@media (max-width: 600px) {
  .report-modal {
    padding: 0.75rem;
  }

  .report-modal-dialog {
    max-height: calc(100vh - 1.5rem);
  }

  .report-modal-header,
  .report-modal-body,
  .report-modal-footer {
    padding: 1rem;
  }

  .report-modal-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .report-modal-actions {
    flex-direction: column;
  }

  .report-modal-actions .button {
    width: 100%;
  }
}
