.editor {
  display: none;
  position: fixed;
  bottom: 0;
  right: 0;
  left: 0;
  top: 0;
  background: var(--ego-bg-1);
  z-index: 1500;
}

.editor .width {
  max-width: 560px;
  margin: 0 auto;
  padding: 0 10px;
}

.editor>div {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.editor .header {
  background: var(--ego-bg-2);
  padding: 20px 0;
}

.editor .header>div {
  text-align: center;
  font-size: 18pt;
  color: var(--ego-text-color);
  font-weight: bold;
}

.editor .options {
  padding: 40px 0;
}

.editor>div>.content {
  width: 100%;
  height: 0;
  flex-grow: 1;
  overflow-y: auto;
}

.editor>span {
  position: fixed;
  right: 10px;
  top: 36px;
  font-size: 18pt;
  font-weight: bold;
  color: var(--ego-text-color-1);
  opacity: 0.1;
}

@media screen and (min-width: 600px) {
  .editor>span {
    top: 32px;
    font-size: 128pt;
    color: var(--ego-bg-2);
    opacity: 0.25;
  }
}

.editor p {
  margin: 16px 0 0 8px;
}

.editor textarea {
  resize: vertical;
  width: 100%;
}

.editor select {
  width: 100%;
  height: 38px;
  text-align: center;
  padding-left: 16px;
  padding-right: 16px;
  margin: 10px 0;
  border-radius: var(--border-radius-lg);
  border: none;
}

.editor .input-data-nullable {
  display: flex;
  gap: 5px;
}

.editor .input-data-nullable input {
  width: 0;
  flex-grow: 1;
}

.editor .input-data-nullable button {
  width: 48px;
}

.editor .selector button,
.editor .int button {
  width: 0;
  flex-grow: 1;
  margin: 0;
  max-width: 102px;
}

.editor .int button {
  max-width: 72px;
}

.editor .int .val {
  width: 52px;
  text-align: center;
}

.editor .selector,
.editor .int {
  display: flex;
  color: white;
  padding: 10px 0;
  padding-top: 8px;
  gap: 8px;
  align-items: center;
}

.editor .selector .label,
.editor .int .label {
  margin: 0 0 0 16px;
  width: 0;
  flex-grow: 1;
  color: white;
}

.editor .file {
  background: var(--ego-bg-2);
  padding: 10px;
  border-radius: 16px;
  display: flex;
  position: relative;
  overflow: hidden;
}

.editor .file.ok,
.editor .file .progress {
  background: var(--ego-interactable);
}

.editor .file>.icon {
  width: 32px;
  text-align: center;
  font-size: 16pt;
}

.editor .file>.data {
  width: 0;
  flex-grow: 1;
  position: relative;

  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
  padding-right: 36px;
}

.editor .file>.data>span {
  color: var(--ego-text-color-2);
}

.editor .file>.data>span.id {
  position: absolute;
  right: 2px;
  top: 0;

  font-weight: bold;
  opacity: 0.25;
}

.editor .file>.data>span.red {
  color: white;
  background: red;
  padding: 2px 4px;
  font-size: 10pt;
}


.editor .file>.actions {
  display: flex;
  padding: 0;
  margin: 0;
  gap: 8px;
}

.editor .file>.actions>button {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  font-size: 11pt;
}

.editor .file>div {
  z-index: 1;
}

.editor .file>.progress {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 0;
  z-index: 0;
  transition: width 0.2s ease;
}

.editor .file-list .list {
  padding: 10px;
}

.editor .file-list .list>div {
  background: var(--ego-bg-0);
  margin: 8px 0;
  padding: 8px;
  color: var(--ego-text-color);
  border-radius: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.editor .file-list .list>div.delete {
  background: var(--interact-red);
}


.editor .file-list .list>div.delete button {
  transition: opacity .3s ease;
  opacity: 0.75;
}

.editor .file-list .list>div.delete button>i.fa-trash-can,
.editor .file-list .list>div button>i.fa-trash-can-arrow-up {
  display: none;
}

.editor .file-list .list>div button>i.fa-trash-can,
.editor .file-list .list>div.delete button>i.fa-trash-can-arrow-up {
  display: inline-block;
}

.editor .file-list .list>div .actions {
  background: none;
}

.editor .file-list .list>div>button {
  width: 46px;
  height: 46px;
  border-radius: 8px;
  margin: 0;
}

.editor .file-list .add {
  position: relative;
  overflow: hidden;
}

.editor .file-list .add>span {
  position: absolute;
  display: block;
  left: 0;
  top: 0;
  background: var(--ego-interactable-active);
  width: 0;
  height: 100%;
}

.editor .list {
  background: var(--ego-bg-2);
  border-radius: 16px;
  margin: 8px 0;
}

.editor .list>.list-element {
  padding: 8px;
}

.editor-v2 .list-element {
  display: flex;
  gap: 8px;
  flex-wrap: nowrap;
}

.editor-v2 .list .values {
  display: flex;
  width: 0;
  flex-grow: 1;
  flex-wrap: wrap;
  gap: 8px;
}

.editor-v2 .list .list-element-col,
.editor-v2 .list .list-element-col.m {
  width: 0;
  flex-grow: 1;
  min-width: 140px;
  max-width: 360px;
}

.editor-v2 .list .list-element-col.s {
  min-width: 120px;
  max-width: 220px;
}

.editor-v2 .list .list-element-col.l {
  min-width: 200px;
  max-width: 480px;
}

.editor-v2 .list .list-element-col>label {
  display: block;
  color: var(--ego-text-color-2);
  margin-top: -2px;
}

.editor-v2 .list .list-element-col>select,
.editor-v2 .list .list-element-col>input,
.editor-v2 .list .list-element-col>.object {
  width: 100%;
  border-radius: 8px;
  margin: 0;
  height: 32px;
}


.editor-v2 .list-element>.actions {
  display: flex;
  flex-direction: column;
  background: none;
  gap: 8px;
  padding: 0;
  margin: 0;
}

@media screen and (min-width:480px) {
  .editor-v2 .list-element {
    flex-wrap: nowrap;
    flex-direction: row;
  }

  .editor-v2 .list-element>.actions {
    flex-direction: row;
  }
}




.editor .list>.list-element>div,
.editor .list>.list-element>.list-element-col>div {
  display: flex;
  gap: 8px;
}

.editor .list>.list-element>div>select,
.editor .list>.list-element>div>input {
  width: 0;
  flex-grow: 1;
  border-radius: 8px;
}

.editor .list>.list-element>div>select,
.editor-v2 .list>.list-element>.list-element-col>div>select {
  flex-grow: 2;
}

.editor .list>.list-element>div>input[type="date"],
.editor-v2 .list>.list-element>.list-element-col {
  min-width: 120px;
}

.editor .list>.list-element>div>button,
.editor-v2 .list>.list-element>.list-element-col>div>button {
  width: 48px;
  border-radius: 8px;
}

.editor .list select {
  text-align: left;
}

.editor .list>.list-element>div>*,
.editor-v2 .list>.list-element>.list-element-col>div>* {
  margin: 0;
}

.editor .list>.list-element>p,
.editor-v2 .list>.list-element>.list-element-col>p {
  margin: 4px;
  margin-bottom: 8px;
  color: var(--ego-text-color-2);
}

.editor .list>.list-element>p>span,
.editor-v2 .list>.list-element>.list-element-col>p>span {
  color: var(--ego-text-color);
}

.editor .list>p {
  padding: 0 2px;
  margin: 0 8px;
  color: var(--ego-text-color-1);
  border-bottom: solid 1px var(--ego-text-color-1);
}

.editor .field {
  position: relative;
}

.editor .field.modified::after,
.editor .field.modifyed::after {
  position: absolute;
  left: -8px;
  width: 2px;
  top: 4px;
  bottom: 4px;
  content: "";
  border-radius: 2px;
  background: var(--ego-interactable-active);
}

.editor .field.view-only {
  opacity: 0.7;
}



.editor .geo-area .box {
  background: var(--ego-interactable);
  color: var(--ego-interactable-content);
  border-radius: 18px;
  position: relative;
  padding: 16px 10px;
  padding-bottom: 48px;
}

.editor .geo-area .box .map {
  font-size: 8pt;
}

.editor .geo-area .box button.edit {
  position: absolute;
  right: 4px;
  bottom: 4px;
  margin: 0;
  width: unset;
  background: var(--interact-action);
  color: var(--interact-action-content);
  border-radius: 14px;
}

#editor-geo {
  position: fixed;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  z-index: 2000;
}

#editor-geo-bg {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;

  background: var(--ego-focus-bg);
}

#editor-geo .geo-header {
  text-align: center;
  font-size: 18pt;
  color: var(--ego-text-color);
  font-weight: bold;
  padding: 12px 0;
}

#editor-geo-content {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 100%;
  max-width: 620px;
  max-height: 100vh;
  max-height: 100dvh;
  transform: translate(-50%, -50%);
  background: var(--ego-bg-2);
  border-radius: 34px;
  box-shadow: 0 0 20px var(--ego-focus-bg);
  z-index: 2001;
  color: var(--ego-text-color);
}

#editor-geo .geo-content {
  background: var(--ego-bg-1);
  background: var(--ego-bg-3);
  border-radius: 26px;
  margin: 0 8px;
}


#editor-geo #editor-geo-map {
  border-radius: 26px 26px 8px 8px;
  height: 400px;
  max-height: 40vh;
  max-height: 40svh;
}

#editor-geo #editor-geo-map .leaflet-left .leaflet-control {
  margin: 14px 0 0 14px;
}

#editor-geo #editor-geo-map .leaflet-bar {
  border-radius: 8px;
  border-top-left-radius: 12px;
}

#editor-geo #editor-geo-map .leaflet-bar a:first-child {
  border-top-left-radius: 12px;
  border-top-right-radius: 6px;
}

#editor-geo #editor-geo-map .leaflet-bar a:last-child {
  border-bottom-left-radius: 6px;
  border-bottom-right-radius: 6px;
}

#editor-geo-list-content {
  padding: 8px;
  min-height: 120px;
  position: relative;
}

#editor-geo-list-empty {
  padding: 12px 0;
  color: var(--ego-text-color-2);
  text-align: center;
  font-size: 14pt;
  font-style: italic;
  position: absolute;
  left: 0;
  top: 50%;
  width: 100%;
  transform: translateY(-50%);
}

#editor-geo-list-elements {
  max-height: calc(100vh - 520px);
  overflow-y: auto;
}

#editor-geo-list-elements .element {
  background: var(--ego-interactable);
  margin-bottom: 12px;
  padding: 4px;
  border-radius: 18px;
  transition: background-color 0.2s ease;
}

#editor-geo-list-elements .element:hover {
  background: var(--ego-interactable-hover);
}

#editor-geo-list-elements .element.active {
  background: var(--ego-interactable-active);
}

#editor-geo-list-elements .element>.row {
  padding: 0 4px;
  padding-right: 56px;
  position: relative;
  display: flex;
  gap: 8px;
  align-items: center;
}

#editor-geo-list-elements .element>.row>img {
  width: 48px;
  height: 48px;
  margin-right: 8px;
}

#editor-geo-list-elements .element>.row>p {
  width: 0;
  flex-grow: 1;
  margin: 0;
  font-size: 9pt;
}

#editor-geo-list-elements .element>.row>p>span {
  font-weight: bold;
  font-size: 11pt;
}

#editor-geo-list-elements .element>.row>button {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  margin: 0;
  padding: 0;
  width: 36px;
  height: 36px;
  line-height: 36px;
  text-align: center;
  border-radius: 10px;
}

#editor-geo-list-elements .element>.details {
  display: none;
  background: var(--ego-row-odd);
  border-radius: 14px;
  padding: 8px;
  padding-top: 1px;
  margin-top: 8px;
}

#editor-geo-list-elements .element>.details>p {
  margin: 12px 0 4px 10px;
}

#editor-geo-list-elements .element>.details>input {
  border-radius: 10px;
  margin: 0;
}

#editor-geo-list-add {
  padding: 8px;

  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

#editor-geo-list-add>span {
  display: block;
  width: 100%;
  color: var(--ego-text-color);
}

@media screen and (min-width: 600px) {
  #editor-geo-list-add {
    flex-wrap: nowrap;
  }

  #editor-geo-list-add>span {
    width: 0;
    flex-grow: 1;
    text-align: right;
  }
}

#editor-geo-list-add>button {
  width: 0;
  flex-grow: 1;
  max-width: 150px;
  margin: 0;
  padding: 0;
  height: 36px;
  line-height: 36px;
  border-radius: 18px;
  position: relative;
  text-align: left;
  box-sizing: border-box;
}

#editor-geo-list-add>button>img {
  position: absolute;
  left: 8px;
  top: 8px;
  width: 20px;
  height: 20px;
  display: inline-block;
}

#editor-geo-list-add>button>span {
  padding-left: 36px;
}

#editor-geo .footer {
  display: flex;
  justify-content: space-between;
  padding: 16px;
  gap: 8px;
  align-items: center;
}

#editor-geo .footer>button {
  margin: 0;
  padding: 0;
  width: 0;
  flex-grow: 1;
  height: 36px;
  line-height: 36px;
  border-radius: 18px;
}

#editor-geo .delete-btn {
  background: #2c4983;
  border: 1px solid #254585;
  border-radius: 4px;
  padding: 0;
  width: 24px;
  height: 24px;
  line-height: 24px;
  text-align: center;
  font-size: 12px;
  cursor: pointer;
  margin: 0;
}