.script-snapshot-dialog {
  position: fixed;
  z-index: 1300;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(17, 24, 20, 0.38);
}

.script-snapshot-dialog[hidden] {
  display: none;
}

.script-snapshot-dialog,
.script-snapshot-dialog * {
  box-sizing: border-box;
  letter-spacing: 0;
}

.script-snapshot-dialog__panel {
  width: min(420px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  overflow: auto;
  border: 1px solid #d7dfd9;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 20px 60px rgba(24, 39, 29, 0.2);
  color: #1d2921;
}

.script-snapshot-dialog__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid #e3e9e5;
}

.script-snapshot-dialog__header h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
}

.script-snapshot-dialog__close {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid #d7dfd9;
  border-radius: 6px;
  background: #ffffff;
  color: #526159;
  cursor: pointer;
}

.script-snapshot-dialog__close iconify-icon {
  font-size: 18px;
}

.script-snapshot-dialog__form {
  display: grid;
  gap: 18px;
  padding: 18px;
}

.script-snapshot-dialog__rating {
  display: grid;
  gap: 10px;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.script-snapshot-dialog__rating legend,
.script-snapshot-dialog__comment > span {
  color: #34443a;
  font-size: 12px;
  font-weight: 650;
}

.script-snapshot-dialog__stars {
  display: grid;
  grid-template-columns: repeat(5, 40px);
  gap: 6px;
}

.script-snapshot-dialog__stars button {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid #d7dfd9;
  border-radius: 6px;
  background: #ffffff;
  color: #98a49d;
  cursor: pointer;
}

.script-snapshot-dialog__stars button.is-selected {
  border-color: #83a890;
  background: #eef6f0;
  color: #39734d;
}

.script-snapshot-dialog__star {
  font-size: 22px;
  line-height: 1;
}

.script-snapshot-dialog__comment {
  display: grid;
  gap: 8px;
}

.script-snapshot-dialog__comment textarea {
  width: 100%;
  min-height: 112px;
  resize: vertical;
  padding: 10px 11px;
  border: 1px solid #ccd6cf;
  border-radius: 6px;
  background: #ffffff;
  color: #1d2921;
  font: inherit;
  font-size: 13px;
  line-height: 1.55;
}

.script-snapshot-dialog__error {
  margin: 0;
  padding: 8px 10px;
  border-radius: 6px;
  background: #fff0ed;
  color: #a83225;
  font-size: 12px;
  overflow-wrap: anywhere;
}

.script-snapshot-dialog__actions {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 8px;
}

.script-snapshot-dialog__actions button {
  min-height: 38px;
  border-radius: 6px;
  font: inherit;
  font-size: 13px;
  font-weight: 650;
  cursor: pointer;
}

.script-snapshot-dialog__cancel {
  border: 1px solid #d7dfd9;
  background: #ffffff;
  color: #526159;
}

.script-snapshot-dialog__submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid #5e9270;
  background: #eaf5ed;
  color: #285f3b;
}

.script-snapshot-dialog__submit iconify-icon {
  font-size: 16px;
}

.script-snapshot-dialog__actions button:disabled,
.script-snapshot-dialog__close:disabled,
.script-snapshot-dialog__stars button:disabled,
.script-snapshot-dialog__comment textarea:disabled {
  cursor: wait;
  opacity: 0.58;
}

@media (max-width: 540px) {
  .script-snapshot-dialog {
    align-items: end;
    padding: 10px;
  }

  .script-snapshot-dialog__panel {
    width: 100%;
    max-height: calc(100vh - 20px);
  }

  .script-snapshot-dialog__stars {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .script-snapshot-dialog__stars button {
    width: 100%;
  }
}
