/* Allow & Deny List — design assets/css/allow-deny-list.css */

.ad-settings {
  min-width: 0;
}

.ad-main {
  min-width: 0;
  padding: 0;
  overflow: visible;
}

.ad-page-head {
  margin: 0 0 18px;
}

.ad-page-head .set-head__title {
  margin: 0 0 4px;
}

.ad-page-head .set-head__sub {
  max-width: 900px;
}

.ad-section {
  margin: 0 0 20px;
  min-width: 0;
}

.ad-section__heading h2,
.ad-spam-section h2 {
  margin: 0 0 3px;
  color: var(--text);
  font-size: 17px;
  font-weight: 600;
  line-height: 1.35;
}

.ad-section__heading p {
  margin: 0;
  color: var(--text);
  font-size: 13px;
  line-height: 1.5;
}

.ad-add-btn {
  gap: 7px;
  height: 36px;
  min-height: 36px;
  margin-top: 14px;
  padding: 0 20px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
}

.ad-add-btn svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
}

.ad-list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 47px;
  padding: 0 20px;
  border-bottom: 1px solid var(--border-strong);
  color: var(--text-muted);
  font-size: 12px;
}

.ad-list-note {
  font-size: 12px;
  white-space: nowrap;
}

.ad-list-note a {
  margin-left: 5px;
  color: var(--brand-ink);
  font-weight: 600;
  text-decoration: none;
}

.ad-list-note a:hover {
  text-decoration: underline;
}

.ad-list {
  min-width: 0;
}

.ad-empty {
  padding: 20px 0 0;
  color: var(--text);
  font-size: 12px;
}

.ad-entry-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 52px;
  padding: 8px 14px 8px 20px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  font-size: 13px;
}

.ad-entry-row:hover {
  background: var(--surface-hover);
}

.ad-entry-row__value {
  min-width: 0;
  overflow-wrap: anywhere;
}

.ad-entry-row__remove {
  display: inline-flex;
  flex: 0 0 30px;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
}

.ad-entry-row__remove:hover {
  background: var(--surface-hover);
  color: var(--danger);
}

.ad-entry-row__remove svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ad-section--deny {
  margin-top: 2px;
}

.ad-list-head--deny {
  justify-content: flex-start;
}

.ad-spam-section {
  margin-top: 6px;
}

.ad-spam-note {
  margin: 12px 0 16px;
  color: var(--text);
  font-size: 13px;
  line-height: 1.5;
}

.ad-checks {
  display: grid;
  gap: 14px;
}

.ad-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
  cursor: pointer;
}

.ad-check input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.ad-check .check__box {
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  margin-top: 2px;
}

.ad-check__copy {
  display: grid;
  gap: 2px;
  min-width: 0;
  color: var(--text);
  font-size: 14px;
  line-height: 1.4;
}

.ad-check__copy strong {
  font-size: 14px;
  font-weight: 500;
}

.ad-check__copy small {
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.45;
}

.ad-check:focus-within .check__box {
  box-shadow: var(--focus-ring);
}

dialog.set-modal.ad-modal {
  width: min(390px, calc(100vw - 32px));
  max-height: min(90vh, 420px);
  overflow: visible;
  border-radius: 14px;
  box-shadow: 0 18px 55px rgba(16, 24, 40, 0.24);
}

dialog.set-modal.ad-modal::backdrop {
  background: rgba(20, 24, 32, 0.48);
  backdrop-filter: blur(4px);
}

.ad-modal__form {
  margin: 0;
}

.ad-modal__head {
  padding: 17px 22px;
}

.ad-modal__title {
  font-size: 17px;
  font-weight: 600;
}

.ad-modal__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
}

.ad-modal__close:hover {
  background: var(--surface-hover);
  color: var(--text);
}

.ad-modal__close svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
}

.ad-modal__body {
  display: block;
  padding: 20px 22px 14px;
}

.ad-modal__description {
  margin: 0 0 14px;
  color: var(--text);
  font-size: 12px;
  line-height: 1.5;
}

.ad-field-label {
  display: flex;
  align-items: center;
  gap: 5px;
  margin: 0 0 6px;
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
}

.ad-entry-input {
  width: 100%;
  height: 36px;
  font-size: 13px;
}

.ad-field-error {
  margin: 6px 0 0;
  color: var(--danger);
  font-size: 12px;
}

.ad-modal__foot {
  justify-content: flex-start;
  padding: 8px 22px 20px;
  border-top: 0;
}

.ad-help {
  position: relative;
  display: inline-flex;
  align-items: center;
  cursor: help;
}

.ad-help > svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: var(--text-muted);
  stroke-width: 1.3;
}

.ad-help__tip {
  position: absolute;
  z-index: 5;
  bottom: calc(100% + 8px);
  left: 50%;
  width: 220px;
  padding: 9px 11px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow-md);
  color: var(--text);
  font-size: 11px;
  font-weight: 400;
  line-height: 1.4;
  transform: translateX(-50%);
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

.ad-help:hover .ad-help__tip,
.ad-help:focus .ad-help__tip {
  visibility: visible;
  opacity: 1;
}

.ad-savebar {
  position: fixed;
  z-index: 80;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  width: 100%;
  min-height: 64px;
  padding: 10px 20px;
  background: var(--surface);
  border-top: 1px solid var(--border);
  box-shadow: 0 -3px 12px rgba(16, 24, 40, 0.04);
}

.ad-savebar[hidden] {
  display: none;
}

.ad-savebar .btn-crm {
  min-height: 36px;
  border-radius: 8px;
}

.ad-savebar span {
  margin-right: auto;
  color: var(--text-muted);
  font-size: 12px;
}

@media (max-width: 1100px) {
  .ad-main {
    padding: 0;
  }

  .ad-list-note {
    text-align: right;
    white-space: normal;
  }
}

@media (max-width: 767px) {
  .ad-main {
    padding: 0;
  }

  .ad-page-head {
    margin-bottom: 20px;
  }

  .ad-page-head .set-head__title {
    font-size: 22px;
  }

  .ad-page-head .set-head__sub {
    font-size: 13px;
    line-height: 1.5;
  }

  .ad-section {
    margin-bottom: 30px;
  }

  .ad-list-head {
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 3px;
    min-height: 46px;
    padding: 0 12px;
  }

  .ad-list-note {
    font-size: 11px;
    text-align: left;
  }

  .ad-empty {
    padding: 17px 12px;
  }

  .ad-entry-row {
    padding-left: 12px;
  }

  .ad-checks {
    gap: 15px;
  }

  .ad-savebar {
    left: 0;
    min-height: 60px;
    padding: 9px 14px;
  }

  .ad-savebar span {
    font-size: 11px;
  }

  dialog.set-modal.ad-modal {
    width: calc(100vw - 28px);
  }

  .ad-modal__head {
    padding: 15px 18px;
  }

  .ad-modal__body {
    padding: 18px;
  }

  .ad-modal__foot {
    padding: 8px 18px 18px;
  }
}
