
/* DTS_ITEM_CONFIG_MODAL_V1 */

#dtsItemConfigModal[hidden],
#dtsItemConfigModal [hidden] {
  display:none!important;
}

#dtsItemConfigModal {
  position:fixed;
  inset:0;
  z-index:99999;
  display:grid;
  place-items:center;
  padding:16px;
  background:rgba(0,5,12,.82);
  backdrop-filter:blur(5px);
}

.dts-config-window {
  width:min(500px,100%);
  max-height:calc(100dvh - 32px);
  overflow-y:auto;
  background:#171b20;
  color:#eaf8ff;
  border:1px solid #345064;
  border-radius:12px;
  box-shadow:0 25px 90px #000a;
  scrollbar-width:thin;
}

.dts-config-header {
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  padding:18px;
  border-bottom:1px solid #35414c;
}

.dts-config-header strong {
  font-size:18px;
  overflow-wrap:anywhere;
}

.dts-config-close {
  border:0;
  background:transparent;
  color:#a9b7c3;
  font-size:26px;
  padding:0 5px;
}

.dts-config-body {
  padding:20px 18px;
}

.dts-config-field {
  margin-bottom:19px;
}

.dts-config-field label {
  display:block;
  margin-bottom:9px;
  font-size:14px;
  font-weight:600;
}

.dts-config-field input,
.dts-config-field select {
  width:100%;
  background:#101820;
  border:1px solid #526372;
  color:#eaf8ff;
  border-radius:6px;
  padding:12px;
}

.dts-config-field small,
.dts-config-note {
  display:block;
  color:#91a4b5;
  font-size:12px;
  line-height:1.5;
  margin-top:7px;
}

.dts-config-footer {
  padding:15px 18px;
  border-top:1px solid #35414c;
  display:flex;
  flex-wrap:wrap;
  justify-content:flex-end;
  gap:9px;
}

.dts-config-footer button {
  padding:10px 13px;
}

#dtsConfigRemove {
  margin-right:auto;
  background:#9e2436;
  color:white;
  border-color:#d13b50;
}

#dtsConfigSave {
  background:#07875b;
  color:white;
  border-color:#0cb979;
}

#dtsConfigToggleAttachments {
  width:100%;
  background:#00d9a5;
  color:#021c17;
  border-color:#00d9a5;
}

#dtsConfigAttachmentPanel {
  margin-top:14px;
  padding:13px;
  border:1px solid #345064;
  border-radius:8px;
  background:#101820;
}

#dtsConfigAttachmentSearch {
  width:100%;
}

#dtsConfigAttachmentResults {
  display:flex;
  flex-direction:column;
  gap:5px;
  max-height:150px;
  overflow-y:auto;
  margin-top:9px;
}

#dtsConfigAttachmentResults button {
  text-align:left;
  font-size:12px;
  overflow-wrap:anywhere;
}

.dts-config-attachment {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  padding:7px;
  margin-top:6px;
  background:#1b303e;
  border-radius:6px;
  font-size:12px;
  overflow-wrap:anywhere;
}

.dts-config-attachment button {
  flex-shrink:0;
  padding:5px 8px;
}

#dtsConfigError {
  color:#ff8e9d;
  font-size:12px;
  margin:8px 0;
}

@media(max-width:550px) {
  .dts-config-header strong {font-size:15px}
  .dts-config-body {padding:14px}
  .dts-config-footer {padding:12px}
}


/* DTS_ITEM_CONFIG_HELP_V1 */

.dts-config-intro {
  background:#0b2635;
  border:1px solid #23566d;
  border-radius:9px;
  padding:13px;
  margin-bottom:20px;
}

.dts-config-intro strong {
  display:block;
  color:#00d9f5;
  font-size:14px;
  margin-bottom:6px;
}

.dts-config-intro p {
  color:#b9d1df;
  font-size:13px;
  line-height:1.6;
  margin:0;
}

.dts-config-field small,
.dts-config-note {
  color:#b9c9d6;
  font-size:13px;
  line-height:1.6;
  margin-top:9px;
}

.dts-config-field small strong {
  color:#00d9f5;
  font-weight:700;
}

.dts-config-field {
  margin-bottom:22px;
}

.dts-config-field label {
  color:#f0f8ff;
  font-size:14px;
}

.dts-config-window {
  scrollbar-width:thin;
  scrollbar-color:#31576d #171b20;
}


/* DTS_WIDE_CONFIG_MODAL_V1 */

/* Wider desktop popup with two-column settings */
@media (min-width:850px) and (min-height:620px) {

  .dts-config-window {
    width:min(900px,calc(100vw - 40px));
    max-height:calc(100dvh - 28px);
    display:flex;
    flex-direction:column;
    overflow:hidden;
  }

  .dts-config-header {
    flex-shrink:0;
    padding:15px 22px;
  }

  .dts-config-body {
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    column-gap:24px;
    row-gap:15px;
    padding:16px 22px;
    min-height:0;
    overflow-y:auto;
    align-content:start;
  }

  .dts-config-intro {
    grid-column:1/-1;
    margin:0;
    padding:11px 14px;
  }

  .dts-config-intro p {
    font-size:12px;
    line-height:1.45;
  }

  .dts-config-field {
    margin:0;
    min-width:0;
  }

  .dts-config-field label {
    margin-bottom:6px;
  }

  .dts-config-field input,
  .dts-config-field select {
    padding:10px 12px;
  }

  .dts-config-field small {
    margin-top:6px;
    font-size:12px;
    line-height:1.45;
  }

  #dtsConfigToggleAttachments,
  #dtsConfigAttachmentPanel,
  #dtsConfigError {
    grid-column:1/-1;
  }

  #dtsConfigToggleAttachments {
    padding:11px;
  }

  #dtsConfigAttachmentPanel {
    max-height:190px;
    overflow-y:auto;
  }

  .dts-config-footer {
    flex-shrink:0;
    padding:12px 22px;
  }
}

/* Keep the popup usable on smaller screens */
@media (max-width:849px), (max-height:619px) {

  .dts-config-window {
    width:min(600px,100%);
    max-height:calc(100dvh - 24px);
    overflow-y:auto;
  }
}
