body { background: #111827; }
.d-none { display: none !important; }
.app { max-width: 1280px; }
.table code { font-size: .9rem; }
.mini-toolbar .btn,
.mini-toolbar .form-select {
  font-size: .75rem;
  padding: .15rem .35rem;
  line-height: 1.2;
}
.mini-toolbar .btn i {
  font-size: .8rem;
}
.import-file-wrap {
  display: inline-flex;
  align-items: stretch;
  border: 1px solid #4b5563;
  border-radius: .5rem;
  overflow: hidden;
  background: #0b1220;
  min-width: 390px;
  max-width: 520px;
}
.import-file-btn {
  border: 0;
  border-right: 1px solid #4b5563;
  border-radius: 0;
  background: #1f2937;
  color: #e5e7eb;
  padding: .5rem .75rem;
  font-size: 1rem;
  line-height: 1.5;
  cursor: pointer;
  margin: 0;
}
.import-file-btn:hover {
  background: #273548;
  color: #f3f4f6;
}
.import-file-name {
  display: inline-flex;
  align-items: center;
  padding: .5rem .75rem;
  color: #e5e7eb;
  min-width: 180px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  background: #0b1220;
}
.action-mini {
  padding: .18rem .42rem;
  line-height: 1;
  font-size: .78rem;
}
.action-mini i {
  font-size: .88rem;
}
.action-visibility.btn-outline-success {
  filter: brightness(1.06);
}
.drag-handle {
  cursor: grab;
  color: #9ca3af;
  user-select: none;
}
.drag-handle:active {
  cursor: grabbing;
}
tr.dragging-row {
  opacity: .55;
}
.regex-bench {
  color: #9ca3af;
}
.enabled-switch-head .form-check-input:checked {
  background-color: #16a34a;
  border-color: #16a34a;
}
.enabled-switch-head .form-check-label {
  display: none;
}
.template-tag-picker {
  max-width: 320px;
}
.template-insert-picker {
  max-width: 300px;
  min-width: 200px;
}
.templates-table .col-action {
  width: 1%;
  white-space: nowrap;
}
.templates-table .col-key {
  width: 160px;
}
.templates-table .col-text {
  min-width: 240px;
}
.template-actions .btn {
  line-height: 1.1;
}
.settings-panel {
  background: #2b3035;
}
.settings-row {
  gap: .75rem;
  align-items: center;
}
.settings-label {
  min-width: 240px;
  font-size: .9rem;
  color: #d1d5db;
}
.settings-input {
  max-width: 420px;
}
@media (max-width: 768px) {
  .settings-panel {
    text-align: left;
  }
  .settings-row {
    flex-direction: column;
    align-items: flex-start;
  }
  .settings-label {
    min-width: 0;
    text-align: left;
    align-self: flex-start;
  }
  .settings-input {
    max-width: 100%;
    width: 100%;
    text-align: left;
    align-self: stretch;
  }
  .settings-row .form-check {
    align-self: flex-start;
  }
  .settings-row .form-check-input {
    margin-left: 0;
  }
}
.cm-wrap .cm-editor {
  border: 1px solid #4b5563;
  border-radius: .5rem;
  background: #000;
  color: #f9fafb;
  min-height: 180px;
}
.cm-wrap .cm-scroller {
  font-family: inherit;
}
.cm-wrap .cm-gutters {
  background: #0b1220;
  color: #6b7280;
  border-right: 1px solid #374151;
}
.cm-wrap .cm-content {
  caret-color: #f9fafb;
}
.response-variant-controls {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  align-items: center;
}
.response-variant-label {
  color: #9ca3af;
  font-size: .85rem;
  margin-right: .35rem;
}
.response-variant-controls .btn {
  padding: .15rem .45rem;
  line-height: 1.1;
  font-size: .85rem;
}
.emoji-helper {
  border: 1px solid #374151;
  border-radius: .5rem;
  background: #0b1220;
  padding: .5rem;
}
.emoji-helper-title {
  color: #9ca3af;
  font-size: .82rem;
  margin-bottom: .45rem;
}
.emoji-set-tabs {
  display: flex;
  gap: .35rem;
  overflow-x: auto;
  padding-bottom: .35rem;
  margin-bottom: .35rem;
}
.emoji-set-tab {
  border: 1px solid #374151;
  background: #111827;
  color: #e5e7eb;
  border-radius: .45rem;
  min-width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 .35rem;
}
.emoji-set-tab:hover {
  border-color: #60a5fa;
}
.emoji-set-tab.active {
  border-color: #60a5fa;
  box-shadow: 0 0 0 1px #60a5fa inset;
  background: #0f172a;
}
.emoji-set-tab img {
  width: 20px;
  height: 20px;
  object-fit: contain;
}
.emoji-set-tab-symbol {
  font-size: 1rem;
  line-height: 1;
}
.emoji-helper-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(32px, 1fr));
  gap: .35rem;
  max-height: 200px;
  overflow-y: auto;
  padding-right: .15rem;
}
.emoji-chip {
  height: 32px;
  width: 32px;
  border: 1px solid #374151;
  border-radius: .4rem;
  background: #111827;
  color: #e5e7eb;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  overflow: hidden;
}
.emoji-chip:hover {
  border-color: #60a5fa;
}
.emoji-chip img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.emoji-chip-selected {
  border-color: #60a5fa;
  box-shadow: 0 0 0 1px #60a5fa inset, 0 0 10px rgba(96, 165, 250, .35);
  background: #0f172a;
}
#sticker_set_helper .emoji-helper-grid {
  grid-template-columns: repeat(auto-fill, minmax(64px, 1fr));
}
#sticker_set_helper .emoji-chip {
  height: 64px;
  width: 64px;
}
.match-text-wrap {
  display: flex;
  align-items: stretch;
  border: 1px solid #4b5563;
  border-radius: .5rem;
  overflow: hidden;
  background: #0b1220;
  width: 100%;
}
.match-text-toggle {
  border: 0;
  border-left: 1px solid #4b5563;
  background: #1f2937;
  color: #e5e7eb;
  padding: .45rem .6rem;
  line-height: 1;
  cursor: pointer;
}
.match-text-toggle:hover {
  background: #273548;
  color: #f3f4f6;
}
.match-text-toggle:disabled {
  opacity: .5;
  cursor: not-allowed;
}
.match-text-control {
  flex: 1 1 auto;
  width: 100%;
  border: 0;
  background: #000;
  color: #f9fafb;
  padding: .5rem .75rem;
  outline: none;
}
.match-text-control:focus {
  box-shadow: none;
}
.match-text-wrap textarea {
  resize: vertical;
  min-height: 48px;
}
.match-text-toggle {
  min-width: 42px;
}
@media (max-width: 768px) {
  .mini-toolbar .template-tag-picker {
    flex: 1 1 100%;
    max-width: none;
    width: 100%;
  }
}
@media (max-width: 768px) {
  .app {
    padding-left: .5rem;
    padding-right: .5rem;
  }
  .import-file-wrap {
    min-width: 0;
    max-width: 100%;
    width: 100%;
  }
  .import-file-name {
    min-width: 0;
  }
  .import-file-btn,
  .import-file-name {
    font-size: .9rem;
    padding: .45rem .6rem;
  }
  .trigger-toolbar {
    width: 100%;
  }
  .trigger-toolbar form {
    width: 100%;
  }
  .trigger-toolbar .import-actions {
    width: 100%;
    flex-wrap: wrap;
  }
  .trigger-toolbar .import-actions .btn {
    white-space: nowrap;
  }
  .modal {
    padding: 0 !important;
  }

  .modal-fullscreen-md-down.modal-dialog {
    margin: 0;
    height: 100%;
  }

  .modal-fullscreen-md-down .modal-content {
    min-height: 100vh;
    min-height: 100dvh;
    height: 100%;
    display: flex;
    flex-direction: column;
    background-color: #111827;
    border: 0;
    border-radius: 0;
  }

  .modal-fullscreen-md-down .modal-header,
  .modal-fullscreen-md-down .modal-body,
  .modal-fullscreen-md-down .modal-footer {
    background-color: #111827;
  }

  .modal-fullscreen-md-down .modal-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: calc(1rem + env(safe-area-inset-bottom));
  }

  .modal-fullscreen-md-down .modal-footer {
    flex: 0 0 auto;
    padding-bottom: calc(0.75rem + env(safe-area-inset-bottom));
    gap: .5rem;
    justify-content: stretch;
  }
  .modal-fullscreen-md-down .modal-footer .btn {
    flex: 1 1 calc(33.333% - .5rem);
    padding: .45rem .5rem;
    font-size: .9rem;
    line-height: 1.2;
  }

  .trigger-table th:nth-child(3),
  .trigger-table td:nth-child(3),
  .trigger-table th:nth-child(4),
  .trigger-table td:nth-child(4) {
    display: none;
  }
  .templates-table .col-key,
  .templates-table .col-text {
    display: none !important;
  }
  .templates-table .col-action {
    width: 1%;
  }
}
