.platform-dialog-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(20, 36, 29, 0.34);
}

.platform-dialog-backdrop.nested {
  z-index: 70;
  background: rgba(20, 36, 29, 0.42);
}

.platform-dialog {
  width: min(680px, 100%);
  max-height: calc(100vh - 48px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  border: 1px solid #dce7de;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 24px 60px rgba(20, 36, 29, 0.18);
}

.platform-dialog.compact {
  width: min(480px, 100%);
}

.platform-dialog.wide {
  width: min(920px, 100%);
}

.platform-dialog-head,
.platform-dialog-actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 16px 18px;
}

.platform-dialog-head {
  border-bottom: 1px solid #e2ebe4;
}

.platform-dialog-head h2 {
  margin: 0;
  font-size: 18px;
}

.platform-dialog-head button {
  width: 34px;
  height: 34px;
  border: 1px solid #dce7de;
  border-radius: 8px;
  background: #ffffff;
  color: #24332d;
  cursor: pointer;
}

.platform-dialog-body {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding: 18px;
  overflow: auto;
}

.platform-dialog-body.studio-type {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.platform-dialog-body.single {
  grid-template-columns: 1fr;
}

.platform-dialog-copy {
  margin: 0;
  color: #24332d;
  line-height: 1.45;
}

.platform-dialog-hint {
  color: #65766b;
  font-size: 13px;
}

.platform-dialog-body label {
  display: grid;
  gap: 7px;
  color: #65766b;
  font-size: 13px;
  font-weight: 800;
}

.platform-dialog-body input,
.platform-dialog-body select {
  min-width: 0;
  height: 40px;
  border: 1px solid #ccdace;
  border-radius: 8px;
  padding: 0 11px;
  background: #ffffff;
  color: #24332d;
  font: inherit;
}

.platform-dialog-note,
.platform-attribute-editor {
  grid-column: 1 / -1;
}

.platform-dialog-note {
  border: 1px solid #e2ebe4;
  border-radius: 8px;
  padding: 12px;
  color: #65766b;
  font-size: 13px;
}

.platform-attribute-editor {
  display: grid;
  gap: 12px;
  border-top: 1px solid #e2ebe4;
  padding-top: 14px;
}

.platform-attribute-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.platform-attribute-head div {
  display: grid;
  gap: 4px;
}

.platform-attribute-head span,
.platform-attribute-grid > span {
  color: #65766b;
  font-size: 12px;
}

.platform-attribute-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr 130px 58px 1.4fr 36px;
  gap: 8px;
  align-items: center;
}

.platform-checkbox-field {
  display: flex;
  justify-content: center;
}

.platform-checkbox-field input {
  width: 18px;
  height: 18px;
}

.platform-icon-action {
  width: 36px;
  height: 36px;
  border: 1px solid #dce7de;
  border-radius: 8px;
  background: #ffffff;
  color: #315140;
  font-size: 18px;
  cursor: pointer;
}

.platform-dialog-actions {
  justify-content: flex-end;
  border-top: 1px solid #e2ebe4;
}

.platform-dialog-actions.split {
  justify-content: space-between;
}

.platform-dialog-actions.split > div {
  display: flex;
  gap: 10px;
}

.platform-secondary {
  min-height: 40px;
  border: 1px solid #dce7de;
  border-radius: 8px;
  padding: 0 14px;
  background: #ffffff;
  color: #24332d;
  font-weight: 800;
  cursor: pointer;
}

.platform-dialog-spacer {
  display: none;
}

@media (max-width: 720px) {
  .platform-dialog-backdrop {
    padding: 0;
  }

  .platform-dialog,
  .platform-dialog.wide,
  .platform-dialog.compact {
    width: 100%;
    min-height: 100vh;
    max-height: 100vh;
    border-radius: 0;
  }

  .platform-dialog-head,
  .platform-dialog-actions {
    position: sticky;
    z-index: 1;
  }

  .platform-dialog-head {
    top: 0;
  }

  .platform-dialog-actions {
    bottom: 0;
  }

  .platform-dialog-body,
  .platform-dialog-body.studio-type {
    grid-template-columns: 1fr;
  }

  .platform-attribute-grid {
    grid-template-columns: 1fr;
  }

  .platform-attribute-grid > span {
    display: none;
  }
}
