/**
 * ============================================================================
 *  SETTINGS NOTETAKER CSS (assets/css/settings-notetaker.css)
 * ----------------------------------------------------------------------------
 *  Styles for Settings > Tools > Notetaker (settings-notetaker.php)
 *  Built according to CRM base design tokens and HubSpot-style layout.
 * ============================================================================
 */

.nt-wrap {
  max-width: 960px;
  margin: 0;
  padding: 0 0 80px;
  color: var(--text);
  font-family: var(--font);
}

.nt-header {
  margin-bottom: var(--sp-5);
}
.nt-title {
  font-size: clamp(22px, 1.1rem + 1vw, 28px);
  font-weight: 700;
  margin: 0 0 var(--sp-2);
  color: var(--text);
  letter-spacing: -0.01em;
  line-height: 1.2;
}
.nt-desc {
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--text);
  margin-bottom: var(--sp-4);
}
.nt-legal {
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--text-muted);
  padding-bottom: var(--sp-5);
  border-bottom: 1px solid var(--border);
  margin: 0;
}

/* Limit notification alert card */
.nt-alert-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  padding: 14px 18px;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--text);
  margin-bottom: var(--sp-6);
  box-shadow: var(--shadow-sm);
}

/* Section Cards */
.nt-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  padding: var(--sp-6) var(--sp-7, 28px);
  margin-bottom: var(--sp-6);
  box-shadow: var(--shadow-sm);
}
.nt-card__title {
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 6px;
  color: var(--text);
}
.nt-card__desc {
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--text-muted);
  margin: 0 0 var(--sp-5);
}

.nt-subhead {
  font-size: 15px;
  font-weight: 700;
  margin: 0 0 var(--sp-1);
  color: var(--text);
}
.nt-subhead__desc {
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--text-muted);
  margin: 0 0 var(--sp-4);
}

/* Links */
.nt-link {
  font-size: 13.5px;
  color: var(--brand);
  text-decoration: none;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: color var(--fast) var(--ease);
}
.nt-link:hover {
  text-decoration: underline;
  color: var(--brand-hover);
}
.nt-link svg,
.nt-link--dark svg {
  vertical-align: middle;
  width: 12px;
  height: 12px;
}
.nt-link--dark {
  color: var(--text);
  font-weight: 700;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: color var(--fast) var(--ease);
}
.nt-link--dark:hover {
  color: var(--brand);
  text-decoration: underline;
}

.nt-link--teal {
  color: var(--brand);
  font-weight: 600;
  text-decoration: none;
  transition: color var(--fast) var(--ease);
}
.nt-link--teal:hover {
  text-decoration: underline;
  color: var(--brand-hover);
}

/* Toggle Rows */
.nt-toggle-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--sp-5);
  padding: var(--sp-3) 0;
}
.nt-toggle-row__left {
  flex: 1 1 auto;
  min-width: 0;
}
.nt-toggle-row__title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 2px;
}
.nt-toggle-row__desc {
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--text-muted);
}
.nt-toggle-row__right {
  flex: 0 0 auto;
}

.nt-divider {
  border: 0;
  border-top: 1px solid var(--border);
  margin: var(--sp-4) 0;
}

/* Channel blocks (Meetings, Phone calls, Mobile) */
.nt-channel {
  padding: 6px 0;
}
.nt-channel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  margin-bottom: 4px;
}
.nt-channel__title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}
.nt-channel__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
}
.nt-channel__title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}
.nt-channel__sub {
  font-size: 13.5px;
  color: var(--text-muted);
  margin: 0 0 4px 28px;
}
.nt-channel__desc {
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--text);
  margin: 0 0 14px 28px;
}
.nt-channel__grid {
  display: grid;
  grid-template-columns: minmax(140px, 260px) minmax(200px, 1fr);
  gap: var(--sp-4) var(--sp-6);
  margin-left: 28px;
}
.nt-channel__col-label {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 3px;
  display: flex;
  align-items: center;
  gap: 4px;
}
.nt-channel__col-val {
  font-size: 13.5px;
  color: var(--text-muted);
}
.nt-channel__footer-link {
  margin: 14px 0 0 28px;
  font-size: 13.5px;
}

.nt-info-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0;
  width: 14px;
  height: 14px;
  vertical-align: middle;
  transition: color var(--fast) var(--ease);
}
.nt-info-btn:hover {
  color: var(--text);
}

/* Disabled switch hover popovers */
.nt-disabled-switch {
  position: relative;
  flex: 0 0 auto;
  outline: none;
}
.nt-disabled-switch:focus-visible {
  border-radius: var(--radius-sm);
  box-shadow: var(--focus-ring);
}
.nt-disabled-switch .hs-switch--disabled {
  pointer-events: auto;
}
.nt-disabled-switch__popover {
  position: absolute;
  z-index: 10;
  right: calc(100% + 12px);
  top: 50%;
  width: 310px;
  max-width: calc(100vw - 32px);
  padding: 14px 20px;
  border-radius: var(--radius-sm);
  background: var(--panel, #0e1629);
  box-shadow: var(--shadow-lg);
  color: var(--panel-text, #ffffff);
  font-size: 13.5px;
  font-weight: 500;
  line-height: 1.5;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-50%) translateX(4px);
  transition: opacity var(--fast) var(--ease), transform var(--fast) var(--ease), visibility var(--fast) var(--ease);
}
.nt-disabled-switch__popover::before {
  position: absolute;
  top: 0;
  right: -12px;
  width: 12px;
  height: 100%;
  content: "";
}
.nt-disabled-switch__popover::after {
  position: absolute;
  top: 50%;
  right: -10px;
  width: 0;
  height: 0;
  border-top: 10px solid transparent;
  border-bottom: 10px solid transparent;
  border-left: 10px solid var(--panel, #0e1629);
  content: "";
  transform: translateY(-50%);
}
.nt-disabled-switch__popover a {
  color:  #ffffff;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.nt-disabled-switch__popover a svg {
  width: 12px;
  height: 12px;
}
.nt-disabled-switch:hover .nt-disabled-switch__popover,
.nt-disabled-switch:focus-within .nt-disabled-switch__popover {
  opacity: 1;
  visibility: visible;
  transform: translateY(-50%) translateX(0);
}

@media (max-width: 480px) {
  .nt-disabled-switch__popover {
    top: calc(100% + 10px);
    right: 0;
    transform: translateY(4px);
  }
  .nt-disabled-switch__popover::after {
    top: -8px;
    right: 18px;
    border-right: 8px solid transparent;
    border-bottom: 8px solid var(--panel, #0e1629);
    border-left: 8px solid transparent;
  }
  .nt-disabled-switch:hover .nt-disabled-switch__popover,
  .nt-disabled-switch:focus-within .nt-disabled-switch__popover {
    transform: translateY(0);
  }
}

/* ============================================================================
   HUBSPOT SWITCH COMPONENT - Unified for all switches
   ============================================================================ */
.hs-switch {
  position: relative;
  display: inline-block;
  cursor: pointer;
  user-select: none;
}
.hs-switch input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.hs-switch .hs-switch__track {
  width: 62px;
  height: 30px;
  background: var(--surface-2);
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-pill);
  display: flex;
  align-items: center;
  position: relative;
  transition: background-color var(--fast) var(--ease), border-color var(--fast) var(--ease);
  box-sizing: border-box;
}
.hs-switch input:checked + .hs-switch__track {
  background: var(--brand);
  border-color: var(--brand);
}
.hs-switch .hs-switch__label {
  position: absolute;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  transition: opacity var(--fast) var(--ease);
}
.hs-switch .hs-switch__label--on {
  left: 9px;
  color: var(--brand-contrast, #ffffff);
  opacity: 0;
}
.hs-switch .hs-switch__label--off {
  right: 8px;
  color: var(--text-muted);
  opacity: 1;
}
.hs-switch input:checked + .hs-switch__track .hs-switch__label--on {
  opacity: 1;
}
.hs-switch input:checked + .hs-switch__track .hs-switch__label--off {
  opacity: 0;
}
.hs-switch .hs-switch__knob {
  position: absolute;
  left: 4px;
  top: 3px;
  width: 21px;
  height: 21px;
  border-radius: 50%;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--fast) var(--ease), background-color var(--fast) var(--ease);
}
.hs-switch input:checked + .hs-switch__track .hs-switch__knob {
  transform: translateX(31px);
  background: var(--surface);
}
.hs-switch .hs-switch__check {
  width: 13px;
  height: 13px;
  color: var(--brand);
  opacity: 0;
  transition: opacity var(--fast) var(--ease);
}
.hs-switch input:checked + .hs-switch__track .hs-switch__check {
  opacity: 1;
}
.hs-switch--disabled {
  opacity: 0.55;
  cursor: not-allowed;
  pointer-events: none;
}

/* Integrations section */
.nt-int-subhead {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 var(--sp-3);
}
.nt-int-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--sp-3);
  margin-bottom: var(--sp-5);
}
.nt-int-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  transition: border-color var(--fast) var(--ease);
}
.nt-int-card:hover {
  border-color: var(--border-strong);
}
.nt-int-card__info {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  min-width: 0;
}
.nt-int-card__icon {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border-radius: 7px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.nt-int-card__name {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
}
.nt-int-card__meta,
.nt-int-card__installs {
  font-size: 11.5px;
  color: var(--text-muted);
  line-height: 1.3;
}
.nt-int-card__btn-wrap {
  flex: 0 0 auto;
}

/* Install buttons */
.nt-btn-install {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 32px;
  padding: 0 16px;
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--brand);
  color: var(--brand-contrast, #ffffff);
  font: inherit;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color var(--fast) var(--ease);
}
.nt-btn-install:hover {
  background: var(--brand-hover);
}
.nt-btn-install--split {
  padding: 0 10px 0 16px;
  gap: 6px;
}
.nt-btn-install__divider {
  width: 1px;
  height: 14px;
  background: rgba(255, 255, 255, 0.35);
  margin: 0 1px;
}
.nt-btn-install.is-installed {
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--border-strong);
}

.nt-marketplace-link {
  margin-top: var(--sp-3);
}

@media (max-width: 768px) {
  .nt-channel__grid {
    grid-template-columns: 1fr;
    gap: 10px;
    margin-left: 0;
  }
  .nt-channel__sub,
  .nt-channel__desc,
  .nt-channel__footer-link {
    margin-left: 0;
  }
}

/* ============================================================================
   CONFIRMATION MODAL POPUP
   ============================================================================ */
.nt-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(16, 24, 40, 0.48);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  padding: var(--sp-4);
  backdrop-filter: blur(2px);
  animation: ntFadeIn var(--fast) var(--ease);
}
.nt-modal-backdrop[hidden] {
  display: none !important;
}

.nt-modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 500px;
  padding: var(--sp-6) var(--sp-6) var(--sp-5);
  box-sizing: border-box;
  animation: ntPopIn var(--fast) var(--ease);
  position: relative;
}

.nt-modal__title {
  font-size: 22px;
  font-weight: 600;
  line-height: 1.25;
  color: var(--text);
  margin: 0 0 var(--sp-4) 0;
  letter-spacing: -0.01em;
}

.nt-modal__divider {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 0 calc(-1 * var(--sp-6)) var(--sp-4) calc(-1 * var(--sp-6));
}

.nt-modal__body {
  margin-bottom: var(--sp-5);
}

.nt-modal__text {
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--text);
  margin: 0 0 var(--sp-3) 0;
}
.nt-modal__text:last-child {
  margin-bottom: 0;
}

.nt-modal__link {
  color: var(--brand);
  font-weight: 600;
  text-decoration: none;
}
.nt-modal__link:hover {
  text-decoration: underline;
  color: var(--brand);
}

.nt-modal__actions {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}

.nt-modal__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 38px;
  padding: 0 22px;
  border-radius: var(--radius-pill);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--fast) var(--ease);
  font-family: inherit;
  white-space: nowrap;
}

.nt-modal__btn--primary {
  background: var(--brand);
  color: var(--brand-contrast, #ffffff);
  border: none;
  box-shadow: var(--shadow-sm);
}
.nt-modal__btn--primary:hover {
  background: var(--brand-hover);
}

.nt-modal__btn--cancel {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border-strong);
}
.nt-modal__btn--cancel:hover {
  background: var(--surface-hover);
  border-color: var(--text-subtle);
}

@keyframes ntFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes ntPopIn {
  from { opacity: 0; transform: scale(0.97); }
  to { opacity: 1; transform: scale(1); }
}

/* ============================================================================
   EXTERNAL SHARING CONDITIONAL SECTIONS
   ============================================================================ */
.nt-external-options {
  animation: ntFadeIn var(--fast) var(--ease);
}
.nt-external-options[hidden] {
  display: none !important;
}

.nt-ext-section {
  padding: 6px 0 10px;
}
.nt-ext-section__title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 5px;
}
.nt-ext-section__desc {
  font-size: 13.5px;
  color: var(--text);
  margin-bottom: 14px;
  line-height: 1.5;
}

/* Rounded checkboxes styled with base tokens */
.nt-ext-checks {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.nt-round-check {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
}
.nt-round-check input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.nt-round-check__box {
  width: 20px;
  height: 20px;
  border-radius: 5px;
  border: 1.5px solid var(--border-strong);
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  transition: all var(--fast) var(--ease);
  flex-shrink: 0;
}
.nt-round-check input:checked + .nt-round-check__box {
  background: var(--brand);
  border-color: var(--brand);
}
.nt-round-check__box svg {
  width: 16px;
  height: 16px;
  color: var(--brand-contrast);
  opacity: 0;
  transition: opacity var(--fast) var(--ease);
}
.nt-round-check input:checked + .nt-round-check__box svg {
  opacity: 1;
}
.nt-round-check__label {
  font-size: 13.5px;
  color: var(--text);
  font-weight: 500;
}

/* Disabled round check state */
.nt-round-check:has(input:disabled),
.nt-round-check.is-disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.nt-round-check:has(input:disabled:not(:checked)) .nt-round-check__box,
.nt-round-check.is-disabled:not(:has(input:checked)) .nt-round-check__box {
  background: var(--surface-2);
  border-color: var(--border);
  cursor: not-allowed;
}
.nt-round-check:has(input:disabled) .nt-round-check__label,
.nt-round-check.is-disabled .nt-round-check__label {
  cursor: not-allowed;
}

/* Popover for disabled ext_asset_video */
.nt-popover-anchor {
  position: relative;
  display: inline-flex;
  align-items: center;
  width: fit-content;
}

.nt-popover {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 0;
  background: #1e293b;
  color: #ffffff;
  padding: 6px 12px;
  border-radius: var(--radius-sm, 6px);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.4;
  white-space: nowrap;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.22);
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transform: translateY(4px);
  transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s;
  z-index: 100;
}

.nt-popover::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 20px;
  border-width: 5px;
  border-style: solid;
  border-color: #1e293b transparent transparent transparent;
}

/* Show popover when disabled AND hovered or active */
.nt-popover-anchor:has(.is-disabled):hover .nt-popover,
.nt-popover-anchor:has(input:disabled):hover .nt-popover,
.nt-popover-anchor.is-popover-open .nt-popover {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Rounded radios styled with base tokens */
.nt-ext-radios {
  display: flex;
  flex-direction: column;
}
.nt-round-radio {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
}
.nt-round-radio input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.nt-round-radio__circle {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1.5px solid var(--border-strong);
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  transition: all var(--fast) var(--ease);
  flex-shrink: 0;
  position: relative;
}
.nt-round-radio input:checked + .nt-round-radio__circle {
  border-color: var(--brand);
}
.nt-round-radio input:checked + .nt-round-radio__circle::after {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brand);
}
.nt-round-radio__label {
  font-size: 13.5px;
  color: var(--text);
  font-weight: 500;
}
.nt-ext-radio__sub {
  margin-left: 28px;
  margin-top: 5px;
  font-size: 12.5px;
  color: var(--text-muted);
  display: none;
}

.nt-round-radio:has(input:checked) + .nt-ext-radio__sub,
.nt-ext-radio-option.is-active .nt-ext-radio__sub {
  display: block;
}

/* ============================================================================
   SAVE BAR IN FOOTER
   ============================================================================ */
.save-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px clamp(20px, 4vw, 48px);
  background: var(--surface-2);
  border-top: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  transform: translateY(110%);
  visibility: hidden;
  transition: transform var(--slow) var(--ease), visibility 0s linear var(--slow);
  box-sizing: border-box;
}
.save-bar.is-visible {
  transform: translateY(0);
  visibility: visible;
  transition: transform var(--slow) var(--ease), visibility 0s;
}

.save-bar__text {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  margin-right: auto;
}

/* .save-bar .btn-crm--primary,
.save-bar [data-save] {
  background: var(--brand) !important;
  color: var(--brand-contrast, #ffffff) !important;
  border: 1px solid var(--brand) !important;
  border-radius: var(--radius-pill) !important;
  padding: 8px 24px !important;
  font-weight: 600 !important;
  font-size: 13.5px !important;
  cursor: pointer;
  order: 1;
  box-shadow: var(--shadow-sm);
  transition: background-color var(--fast) var(--ease), border-color var(--fast) var(--ease);
}
.save-bar .btn-crm--primary:hover,
.save-bar [data-save]:hover {
  background: var(--brand-hover) !important;
  border-color: var(--brand-hover) !important;
}

.save-bar .btn-crm--outline,
.save-bar [data-cancel] {
  background: var(--surface) !important;
  color: var(--text) !important;
  border: 1px solid var(--border-strong) !important;
  border-radius: var(--radius-pill) !important;
  padding: 8px 24px !important;
  font-weight: 600 !important;
  font-size: 13.5px !important;
  cursor: pointer;
  order: 2;
  margin-left: 10px;
  transition: background-color var(--fast) var(--ease), border-color var(--fast) var(--ease);
}
.save-bar .btn-crm--outline:hover,
.save-bar [data-cancel]:hover {
  background: var(--surface-hover) !important;
  border-color: var(--text-subtle) !important;
} */

/* ============================================================================
 *  SIDE DRAWERS / POPUPS (Users list & Exclude users)
 * ============================================================================ */

.nt-drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 10001;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  display: flex;
  justify-content: flex-end;
  align-items: stretch;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--normal) var(--ease), visibility 0s linear var(--normal);
}

.nt-drawer-backdrop.is-open {
  opacity: 1;
  visibility: visible;
  transition: opacity var(--normal) var(--ease), visibility 0s;
}

.nt-drawer {
  width: min(520px, 100vw);
  height: 100%;
  background: var(--surface);
  box-shadow: -8px 0 32px rgba(0, 0, 0, 0.16);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform var(--slow) cubic-bezier(0.16, 1, 0.3, 1);
  box-sizing: border-box;
}

.nt-drawer-backdrop.is-open .nt-drawer {
  transform: translateX(0);
}

/* Drawer Header */
.nt-drawer__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.nt-drawer__title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
  margin: 0;
  line-height: 1.3;
}

.nt-drawer__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background-color var(--fast) var(--ease), color var(--fast) var(--ease);
}

.nt-drawer__close:hover {
  background: var(--surface-hover);
  color: var(--text);
}

/* Drawer Body */
.nt-drawer__body {
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px;
}

.nt-drawer__intro {
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--text);
  margin: 0 0 16px;
}

/* Users List Drawer Rows */
.nt-user-row {
  padding: 10px 0;
  margin-bottom: 6px;
}

.nt-user-row__name {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 2px;
  line-height: 1.35;
}

.nt-user-row__email {
  font-size: 13px;
  color: var(--text-muted);
  word-break: break-all;
  line-height: 1.4;
}

/* Users & Exclude Drawer Pagination */
.nt-drawer__pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 16px 24px 20px;
  background: var(--surface);
}

.nt-drawer__pagination--exclude {
  padding: 12px 24px 14px;
  border-top: 1px solid var(--border);
}

.nt-page-nav {
  background: transparent;
  border: none;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px 6px;
  transition: color var(--fast) var(--ease);
}

.nt-page-nav:hover:not(:disabled) {
  color: var(--brand);
}

.nt-page-nav:disabled {
  color: var(--text-subtle);
  cursor: not-allowed;
  opacity: 0.5;
}

.nt-page-num {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 50%;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  transition: all var(--fast) var(--ease);
}

.nt-page-num:hover:not(.is-active) {
  background: var(--surface-hover);
}

.nt-page-num.is-active {
  background: var(--surface-2);
  border-color: var(--border-strong);
  color: var(--text);
  font-weight: 600;
}

/* Exclude Drawer: Search Input */
.nt-drawer__search-wrap {
  position: relative;
  margin-bottom: 18px;
}

.nt-drawer__search {
  width: 100%;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text);
  font-family: var(--font);
  font-size: 13.5px;
  padding: 9px 38px 9px 16px;
  box-sizing: border-box;
  transition: border-color var(--fast) var(--ease), box-shadow var(--fast) var(--ease);
}

.nt-drawer__search:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-glow);
}

.nt-drawer__search::placeholder {
  color: var(--text-muted);
}

.nt-drawer__search-icon {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--text-muted);
  pointer-events: none;
}

/* Exclude Drawer: Checkbox List */
.nt-exclude-list {
  display: flex;
  flex-direction: column;
}

.nt-exclude-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 10px 0;
  cursor: pointer;
  user-select: none;
}

.nt-exclude-cb {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.nt-exclude-box {
  width: 18px;
  height: 18px;
  min-width: 18px;
  margin-top: 2px;
  border-radius: 4px;
  border: 1.5px solid var(--border-strong);
  background: var(--surface);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all var(--fast) var(--ease);
}

.nt-exclude-box svg {
  width: 12px;
  height: 12px;
  color: var(--brand-contrast, #ffffff);
  display: none;
}

.nt-exclude-cb:checked + .nt-exclude-box {
  background: var(--brand);
  border-color: var(--brand);
}

.nt-exclude-cb:checked + .nt-exclude-box svg {
  display: block;
}

.nt-exclude-cb:focus-visible + .nt-exclude-box {
  box-shadow: 0 0 0 3px var(--brand-glow);
}

.nt-exclude-item__info {
  display: flex;
  flex-direction: column;
}

.nt-exclude-item__name {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  line-height: 1.35;
  margin-bottom: 1px;
}

.nt-exclude-item__email {
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.4;
  word-break: break-all;
}

.nt-exclude-empty {
  padding: 32px 16px;
  text-align: center;
  font-size: 13.5px;
  color: var(--text-muted);
}

/* Exclude Drawer Footer */
.nt-drawer__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  background: var(--surface);
}

.nt-drawer__foot-count {
  font-size: 13.5px;
  color: var(--text);
  font-weight: 500;
}

.nt-drawer__foot-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nt-drawer__btn {
  font-family: var(--font);
  font-size: 13.5px;
  font-weight: 600;
  padding: 8px 22px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--fast) var(--ease);
}

.nt-drawer__btn--cancel {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border-strong);
}

.nt-drawer__btn--cancel:hover {
  background: var(--surface-hover);
  border-color: var(--text-subtle);
}

.nt-drawer__btn--save {
  background: var(--brand);
  color: var(--brand-contrast, #ffffff);
  border: 1px solid var(--brand);
  box-shadow: var(--shadow-sm);
}

.nt-drawer__btn--save:hover {
  background: var(--brand-hover);
  border-color: var(--brand-hover);
}
