/* Indigo lightweight editor. Enabled only with ?edit=1. */
.indigo-edit-toggle {
  box-sizing: border-box;
  position: fixed;
  z-index: 100000;
  left: 16px;
  bottom: 16px;
  width: 56px;
  min-width: 56px;
  max-width: 56px;
  height: 56px;
  min-height: 56px;
  padding: 0 !important;
  border: 0;
  border-radius: 50%;
  background: #0a7be8;
  color: #fff;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.25);
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}

.indigo-pages-toggle {
  box-sizing: border-box;
  position: fixed;
  z-index: 100000;
  left: 16px;
  bottom: 84px;
  width: 56px;
  min-width: 56px;
  max-width: 56px;
  height: 56px;
  min-height: 56px;
  padding: 0 !important;
  border: 0;
  border-radius: 50%;
  background: #102536;
  color: #fff;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.25);
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.indigo-edit-toggle:focus {
  outline: 3px solid #ffcf33;
  outline-offset: 3px;
}

.indigo-pages-toggle:focus {
  outline: 3px solid #ffcf33;
  outline-offset: 3px;
}

.indigo-edit-active [data-indigo-edit-key] {
  outline: 2px dashed rgba(10, 123, 232, 0.55);
  outline-offset: 4px;
  cursor: text;
}

.indigo-edit-active [data-indigo-edit-key]:hover,
.indigo-edit-active [data-indigo-edit-key]:focus {
  outline-color: #ffcf33;
  background: rgba(255, 247, 194, 0.25);
}

.indigo-editor-panel {
  position: fixed;
  z-index: 100001;
  right: 16px;
  bottom: 16px;
  width: min(520px, calc(100vw - 32px));
  max-height: min(78vh, 680px);
  display: none;
  direction: rtl;
  background: #fff;
  color: #102536;
  border: 1px solid #c7d4df;
  border-radius: 8px;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.28);
  overflow: hidden;
  font-family: Arial, sans-serif;
}

.indigo-pages-panel {
  position: fixed;
  z-index: 100001;
  right: 16px;
  top: 16px;
  width: min(430px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  display: none;
  direction: rtl;
  background: #fff;
  color: #102536;
  border: 1px solid #c7d4df;
  border-radius: 8px;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.28);
  overflow: hidden;
  font-family: Arial, sans-serif;
}

.indigo-editor-panel.is-open {
  display: block;
}

.indigo-pages-panel.is-open {
  display: block;
}

.indigo-editor-panel header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  background: #0a7be8;
  color: #fff;
}

.indigo-pages-panel header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  background: #102536;
  color: #fff;
}

.indigo-editor-panel h2 {
  margin: 0;
  font-size: 18px;
  color: #fff;
}

.indigo-pages-panel h2 {
  margin: 0;
  font-size: 18px;
  color: #fff;
}

.indigo-editor-close {
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 24px;
  cursor: pointer;
}

.indigo-pages-close {
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 24px;
  cursor: pointer;
}

.indigo-editor-body {
  padding: 14px;
}

.indigo-pages-body {
  padding: 14px;
  max-height: calc(100vh - 92px);
  overflow: auto;
}

.indigo-pages-body p {
  margin: 0 0 10px;
  font-size: 14px;
  line-height: 1.5;
}

.indigo-pages-list {
  display: grid;
  gap: 8px;
}

.indigo-pages-list a {
  display: block;
  padding: 11px 12px;
  border: 1px solid #d6e0ea;
  border-radius: 6px;
  background: #f7fafc;
  color: #102536;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.35;
  text-decoration: none;
}

.indigo-pages-list a:hover,
.indigo-pages-list a:focus {
  border-color: #0a7be8;
  background: #e9f4ff;
  outline: none;
}

.indigo-pages-list a[aria-current="page"] {
  border-color: #0a7be8;
  background: #0a7be8;
  color: #fff;
}

.indigo-editor-help {
  margin: 0 0 10px;
  font-size: 14px;
  line-height: 1.5;
}

.indigo-editor-textarea {
  box-sizing: border-box;
  width: 100%;
  min-height: 150px;
  resize: vertical;
  padding: 12px;
  border: 1px solid #b8c7d4;
  border-radius: 6px;
  direction: rtl;
  font: 16px/1.55 Arial, sans-serif;
}

.indigo-editor-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.indigo-editor-actions button,
.indigo-editor-actions label {
  border: 0;
  border-radius: 6px;
  background: #0a7be8;
  color: #fff;
  padding: 10px 13px;
  font-weight: 700;
  cursor: pointer;
}

.indigo-editor-actions .secondary {
  background: #e8eef4;
  color: #102536;
}

.indigo-editor-actions .danger {
  background: #b42318;
}

.indigo-editor-actions input[type="file"] {
  display: none;
}

.indigo-editor-status {
  min-height: 20px;
  margin-top: 10px;
  font-size: 13px;
  color: #31506a;
}

@media (max-width: 680px) {
  .indigo-edit-toggle {
    left: 12px;
    bottom: 12px;
    width: 60px;
    min-width: 60px;
    max-width: 60px;
    height: 60px;
    min-height: 60px;
    font-size: 28px;
  }

  .indigo-pages-toggle {
    left: 12px;
    bottom: 84px;
    width: 60px;
    min-width: 60px;
    max-width: 60px;
    height: 60px;
    min-height: 60px;
    font-size: 30px;
  }

  .indigo-editor-panel {
    inset: auto 8px 8px 8px;
    width: auto;
    max-height: 86vh;
  }

  .indigo-pages-panel {
    inset: 8px 8px auto 8px;
    width: auto;
    max-height: calc(100vh - 16px);
  }

  .indigo-pages-body {
    max-height: calc(100vh - 84px);
  }

  .indigo-editor-actions button,
  .indigo-editor-actions label {
    flex: 1 1 46%;
    text-align: center;
  }
}
