.water-meter-card {
  background-image: url("../icons/water-meter.svg");
  background-repeat: no-repeat;
  background-position: top 5px right 20px;
  background-size: 90px;
}

.water-meter-dialog {
  width: min(960px, calc(100% - 2rem));
  height: 90vh;
  height: 90dvh;
  max-width: none;
  max-height: calc(100% - 2rem);
  margin: auto;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 1rem;
  color: #111827;
  background: #fff;
  box-shadow: 0 24px 64px rgb(0 0 0 / 25%);
}

.water-meter-dialog:not([open]) {
  display: none;
}

.water-meter-dialog[open] {
  display: flex;
  flex-direction: column;
}

.water-meter-dialog::backdrop {
  background: rgb(0 0 0 / 55%);
}

.water-meter-dialog__header {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem 0;
}

.water-meter-dialog__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: .5rem;
  color: #374151;
  background: #f3f4f6;
  line-height: 1;
  cursor: pointer;
}

.water-meter-dialog__close-icon {
  display: block;
  flex-shrink: 0;
}

.water-meter-dialog__close:hover {
  background: #e5e7eb;
}

.water-meter-dialog__close:focus-visible,
.water-meter-card:focus-visible {
  outline: 3px solid #2563eb;
  outline-offset: 3px;
}

.water-meter-dialog__notice {
  display: flex;
  flex-shrink: 0;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .5rem 1rem;
  padding: .5rem 1.25rem 1rem;
  border-bottom: 1px solid #e5e7eb;
  color: #4b5563;
  font-size: .875rem;
}

.water-meter-dialog__notice a {
  color: #2563eb;
  text-decoration: underline;
  white-space: nowrap;
}

.water-meter-dialog__loading {
  flex-shrink: 0;
  padding: .75rem 1.25rem;
  color: #4b5563;
  font-size: .875rem;
}

.water-meter-dialog__frame {
  flex: 1;
  width: 100%;
  min-height: 0;
  border: 0;
  background: #fff;
}

@media (max-width: 640px) {
  .water-meter-dialog {
    width: calc(100% - 1rem);
    height: calc(100vh - 1rem);
    height: calc(100dvh - 1rem);
    max-height: calc(100% - 1rem);
    border-radius: .75rem;
  }

  .water-meter-dialog__header {
    gap: .5rem;
    padding: .75rem .75rem 0;
  }

  .water-meter-dialog__notice,
  .water-meter-dialog__loading {
    padding-right: .75rem;
    padding-left: .75rem;
  }
}
