/* V39_UNIVERSAL_CONTENT_EDITOR_CSS_V5 */
.v39-content-editor {
  grid-column: 1 / -1;
}

.v39-content-editor-toolbar {
  display: grid;
  grid-template-columns: minmax(180px, .55fr) minmax(240px, 1fr) minmax(280px, 1.2fr);
  gap: 12px;
  align-items: end;
}

.v39-content-editor-toolbar label,
.v39-content-item label {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.v39-content-editor-toolbar label > span,
.v39-content-item label > span {
  color: #8fb4d6;
  font-size: 13px;
}

.v39-content-editor input,
.v39-content-editor select,
.v39-content-editor textarea {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  color: #f8fafc;
  background: #071121;
  border: 1px solid rgba(148, 163, 184, .22);
  border-radius: 12px;
  padding: 11px 12px;
  font: inherit;
}

.v39-content-editor input:focus,
.v39-content-editor select:focus,
.v39-content-editor textarea:focus {
  outline: 2px solid rgba(96, 165, 250, .42);
  border-color: #60a5fa;
}

.v39-content-editor-source {
  min-height: 48px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  padding: 9px 12px;
  border: 1px solid rgba(147, 197, 253, .2);
  border-radius: 12px;
  background: rgba(30, 64, 175, .1);
  overflow-wrap: anywhere;
}

.v39-content-editor-source span,
.v39-content-editor-source small {
  color: #93c5fd;
}

.v39-content-editor-source b {
  color: #fff;
}

.v39-content-editor-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin: 14px 0;
}

.v39-content-editor-actions .btn {
  min-height: 42px;
}

.v39-content-editor-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 13px;
  border-radius: 12px;
  background: rgba(255, 255, 255, .045);
  color: #cbd5e1;
}

.v39-content-editor-summary b {
  color: #fff;
}

.v39-content-editor-status {
  margin: 11px 0;
  padding: 11px 13px;
  border: 1px solid rgba(147, 197, 253, .2);
  border-radius: 12px;
  background: rgba(30, 64, 175, .08);
  color: #bfdbfe;
}

.v39-content-editor-status.ok {
  color: #bbf7d0;
  border-color: rgba(74, 222, 128, .25);
  background: rgba(22, 163, 74, .1);
}

.v39-content-editor-status.warn {
  color: #fde68a;
  border-color: rgba(250, 204, 21, .25);
  background: rgba(202, 138, 4, .1);
}

.v39-content-editor-status.error {
  color: #fecaca;
  border-color: rgba(248, 113, 113, .28);
  background: rgba(185, 28, 28, .1);
}

.v39-content-items {
  display: grid;
  gap: 10px;
  max-height: 980px;
  overflow: auto;
  padding-right: 5px;
  scrollbar-gutter: stable;
}

.v39-content-item {
  display: grid;
  grid-template-columns: 72px minmax(220px, 1.4fr) minmax(170px, .8fr) minmax(130px, .5fr);
  gap: 10px;
  align-items: end;
  padding: 12px;
  border: 1px solid rgba(148, 163, 184, .16);
  border-radius: 15px;
  background: rgba(2, 8, 23, .48);
}

.v39-content-item[hidden] {
  display: none;
}

.v39-content-item-order {
  align-self: stretch;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
}

.v39-content-item-order b {
  grid-column: 1 / -1;
  display: grid;
  place-items: center;
  min-height: 30px;
  border-radius: 9px;
  background: rgba(99, 102, 241, .18);
  color: #c7d2fe;
}

.v39-content-item button {
  border: 1px solid rgba(148, 163, 184, .22);
  border-radius: 9px;
  padding: 8px 10px;
  color: #e2e8f0;
  background: rgba(30, 41, 59, .74);
  cursor: pointer;
}

.v39-content-item button:hover {
  border-color: #60a5fa;
}

.v39-content-item button.danger {
  color: #fecaca;
  border-color: rgba(248, 113, 113, .24);
}

.v39-content-item-details {
  grid-column: 2 / -1;
  padding: 9px 11px;
  border: 1px dashed rgba(148, 163, 184, .18);
  border-radius: 12px;
}

.v39-content-item-details summary {
  color: #bfdbfe;
  cursor: pointer;
}

.v39-content-item-extra {
  display: grid;
  grid-template-columns: minmax(260px, 1.5fr) minmax(150px, .45fr) minmax(260px, 1fr);
  gap: 10px;
  margin-top: 10px;
  align-items: start;
}

.v39-content-description textarea {
  min-height: 92px;
  resize: vertical;
}

.v39-content-photo-field img {
  width: 92px;
  height: 64px;
  margin-top: 7px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, .22);
}

.v39-content-item-actions {
  grid-column: 2 / -1;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.v39-content-editor-empty {
  padding: 28px 16px;
  text-align: center;
  color: #94a3b8;
  border: 1px dashed rgba(148, 163, 184, .22);
  border-radius: 14px;
}

/* V39_CONTENT_CATEGORY_ORDER_V9_4 */
.v39-category-order {
  margin: 14px 0;
  padding: 14px;
  border: 1px solid rgba(148, 163, 184, .22);
  border-radius: 16px;
  background: rgba(15, 23, 42, .46);
}

.v39-category-order-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.v39-category-order-head span {
  color: #94a3b8;
  font-size: 12px;
}

.v39-category-order-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 8px;
}

.v39-category-order-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 10px;
  border: 1px solid rgba(148, 163, 184, .18);
  border-radius: 12px;
  background: rgba(30, 41, 59, .78);
}

.v39-category-order-actions {
  display: inline-flex;
  gap: 5px;
}

.v39-category-order-actions button {
  width: 30px;
  height: 30px;
  border: 1px solid rgba(148, 163, 184, .26);
  border-radius: 8px;
  background: #0f172a;
  color: #f8fafc;
  cursor: pointer;
}

.v39-category-order-actions button:disabled {
  opacity: .32;
  cursor: not-allowed;
}

@media (max-width: 1050px) {
  .v39-content-editor-toolbar {
    grid-template-columns: 1fr 1fr;
  }

  .v39-content-editor-source {
    grid-column: 1 / -1;
  }

  .v39-content-item {
    grid-template-columns: 70px 1fr 1fr;
  }

  .v39-content-item > label:last-of-type {
    grid-column: 2 / -1;
  }

  .v39-content-item-details,
  .v39-content-item-actions {
    grid-column: 1 / -1;
  }

  .v39-content-item-extra {
    grid-template-columns: 1fr 1fr;
  }

  .v39-content-description {
    grid-column: 1 / -1;
  }
}

@media (max-width: 700px) {
  .v39-category-order-head { align-items: flex-start; flex-direction: column; }
  .v39-content-editor-toolbar,
  .v39-content-item,
  .v39-content-item-extra {
    grid-template-columns: 1fr;
  }

  .v39-content-editor-source,
  .v39-content-item > label:last-of-type,
  .v39-content-item-details,
  .v39-content-item-actions,
  .v39-content-description {
    grid-column: 1;
  }

  .v39-content-item-order {
    grid-template-columns: 1fr 1fr 1fr;
  }

  .v39-content-item-order b {
    grid-column: auto;
  }

  .v39-content-item-actions,
  .v39-content-editor-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .v39-content-item-actions button,
  .v39-content-editor-actions button {
    width: 100%;
  }
}
