/* ==========================================================================
   Deny dialog — window.confirmDenyDialog (public/js/scripts/pages/scripts.js).
   Redesigned 2026-11-13; the same dialog on every page that uses it (11 pages).
   Everything is scoped to .swal2-popup.deny-dlg, so no other SweetAlert dialog changes.
   Theme: navy #202B56, red #FF4C4C, line #E3E7F0.
   ========================================================================== */

.swal2-popup.deny-dlg {
  width: 560px;
  max-width: calc(100vw - 24px);
  padding: 0;
  border-radius: 16px;
  overflow: hidden;
  font-family: 'Rubik', 'Segoe UI', system-ui, sans-serif;
  text-align: left;
}
.swal2-popup.deny-dlg .swal2-html-container.deny-dlg-body,
.swal2-popup.deny-dlg .swal2-content {
  margin: 0;
  padding: 0;
  text-align: left;
  overflow: visible;
}

/* header */
.deny-dlg .dd-head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px 22px 16px;
  border-bottom: 1px solid #E3E7F0;
}
.deny-dlg .dd-ico {
  flex: none;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #FFE9E9;
  color: #FF4C4C;
  font-size: 22px;
}
.deny-dlg .dd-title { margin: 0; font-size: 21px; font-weight: 700; color: #202B56; line-height: 1.2; }
.deny-dlg .dd-sub { margin: 3px 0 0; font-size: 14px; color: #6B7591; line-height: 1.35; }

/* sections */
.deny-dlg .dd-sec { padding: 16px 22px 0; }
.deny-dlg .dd-lbl {
  margin-bottom: 8px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #6B7591;
}

/* reason chips */
.deny-dlg .dd-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.deny-dlg .dd-chip {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 14px;
  border: 1.5px solid #C9CFDF;
  border-radius: 999px;
  background: #fff;
  color: #202B56;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  transition: background-color .15s, border-color .15s, color .15s;
}
.deny-dlg .dd-chip:hover { border-color: #202B56; background: #EEF0F6; }
.deny-dlg .dd-chip.is-on { background: #202B56; border-color: #202B56; color: #fff; }
.deny-dlg .dd-chip:focus-visible { outline: 2px solid #0090FF; outline-offset: 2px; }
.deny-dlg .dd-hidden-select { display: none !important; }
.deny-dlg #otherReasonContainer { margin-top: 10px; }
.deny-dlg .dd-input {
  width: 100%;
  height: 48px;
  margin: 0;
  padding: 0 14px;
  border: 1.5px solid #C9CFDF;
  border-radius: 10px;
  font-size: 15px;
  color: #202B56;
  box-shadow: none;
}
.deny-dlg .dd-input:focus { border-color: #202B56; box-shadow: none; }

/* No Trespass switch row */
.deny-dlg .dd-switch-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  padding: 12px 14px;
  border: 1.5px solid #E3E7F0;
  border-radius: 12px;
  background: #F7F8FB;
  cursor: pointer;
}
.deny-dlg .dd-switch-row:has(#noTrespassCheckbox:checked) { border-color: #FFB3B3; background: #FFF5F5; }
.deny-dlg .dd-tp-ico {
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: #fff;
  border: 1px solid #E3E7F0;
  color: #FF4C4C;
  font-size: 15px;
}
.deny-dlg .dd-tp-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.deny-dlg .dd-tp-text b { font-size: 15px; font-weight: 700; color: #202B56; line-height: 1.25; }
.deny-dlg .dd-tp-text small { font-size: 12.5px; color: #6B7591; line-height: 1.3; }
.deny-dlg .dd-switch.form-check { flex: none; margin: 0; padding-left: 2.6em; min-height: 0; }
.deny-dlg .dd-switch .form-check-input {
  width: 2.6em;
  height: 1.45em;
  margin: 0 0 0 -2.6em;
  float: none;
  cursor: pointer;
}
.deny-dlg .dd-switch .form-check-input:checked { background-color: #FF4C4C; border-color: #FF4C4C; }
.deny-dlg #community_select_div { margin-top: 12px; }
.deny-dlg #community_select_div .select2-container { width: 100% !important; }
.deny-dlg #community_select_div .select2-selection--multiple {
  min-height: 48px;
  border: 1.5px solid #C9CFDF;
  border-radius: 10px;
  padding: 4px 8px;
}

/* buttons: Cancel (white) + Deny entry (red), 50px, full width */
.swal2-popup.deny-dlg .swal2-actions.deny-dlg-actions {
  display: flex;
  flex-wrap: nowrap;
  gap: 10px;
  width: 100%;
  margin: 20px 0 0;
  padding: 16px 22px 20px;
  border-top: 1px solid #E3E7F0;
  background: #fff;
}
.swal2-popup.deny-dlg .deny-dlg-confirm,
.swal2-popup.deny-dlg .deny-dlg-cancel {
  flex: 1 1 0;
  height: 50px;
  margin: 0;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color .15s, border-color .15s, color .15s;
}
.swal2-popup.deny-dlg .deny-dlg-confirm { background: #FF4C4C; border: 1.5px solid #FF4C4C; color: #fff; }
.swal2-popup.deny-dlg .deny-dlg-confirm:hover { background: #E63E3E; border-color: #E63E3E; }
.swal2-popup.deny-dlg .deny-dlg-cancel { background: #fff; border: 1.5px solid #C9CFDF; color: #202B56; }
.swal2-popup.deny-dlg .deny-dlg-cancel:hover { background: #EEF0F6; border-color: #202B56; }
.swal2-popup.deny-dlg .deny-dlg-confirm:focus-visible,
.swal2-popup.deny-dlg .deny-dlg-cancel:focus-visible { outline: 2px solid #0090FF; outline-offset: 2px; box-shadow: none; }
.swal2-popup.deny-dlg .swal2-validation-message { margin: 12px 22px 0; }

@media (max-width: 480px) {
  .deny-dlg .dd-head { padding: 16px 16px 14px; }
  .deny-dlg .dd-sec { padding: 14px 16px 0; }
  .swal2-popup.deny-dlg .swal2-actions.deny-dlg-actions { padding: 14px 16px 16px; }
  .deny-dlg .dd-chip { font-size: 13.5px; }
}

/* fine-tuning: switch centred on its row; softer focus ring on the auto-focused button */
.deny-dlg .dd-switch.form-check { display: flex; align-items: center; }
.deny-dlg .dd-switch .form-check-input { margin-top: 0; }
.swal2-popup.deny-dlg .deny-dlg-confirm:focus-visible { outline: 3px solid rgba(255, 76, 76, .35); outline-offset: 2px; }
.swal2-popup.deny-dlg .deny-dlg-cancel:focus-visible { outline: 3px solid rgba(32, 43, 86, .25); outline-offset: 2px; }

/* ---------- Inputs (user 2026-11-13): the site's global .form-control / select2 rules
   overrode the dialog's, so both fields looked thin. Same look for both, dialog-only. ---------- */
.swal2-popup.deny-dlg input.dd-input {
  display: block;
  width: 100% !important;
  height: 52px !important;
  min-height: 52px;
  margin: 0 !important;
  padding: 0 14px !important;
  border: 1.5px solid #C9CFDF !important;
  border-radius: 10px !important;
  background: #fff !important;
  box-shadow: none !important;
  font-family: inherit;
  font-size: 15px !important;
  font-weight: 500;
  line-height: normal;
  color: #202B56 !important;
  transition: border-color .15s, box-shadow .15s;
}
.swal2-popup.deny-dlg input.dd-input::placeholder { color: #9AA3BA; font-weight: 400; }
.swal2-popup.deny-dlg input.dd-input:hover { border-color: #9AA3BA !important; }
.swal2-popup.deny-dlg input.dd-input:focus {
  outline: 0;
  border-color: #202B56 !important;
  box-shadow: 0 0 0 3px rgba(32, 43, 86, .12) !important;
}

/* Communities select2 (multiple) */
.swal2-popup.deny-dlg #community_select_div .select2-container { width: 100% !important; display: block; }
.swal2-popup.deny-dlg #community_select_div .select2-container .select2-selection--multiple {
  display: flex;
  align-items: center;
  min-height: 52px !important;
  height: auto !important;
  padding: 7px 12px !important;
  border: 1.5px solid #C9CFDF !important;
  border-radius: 10px !important;
  background: #fff !important;
  box-shadow: none !important;
  cursor: text;
  transition: border-color .15s, box-shadow .15s;
}
.swal2-popup.deny-dlg #community_select_div .select2-container .select2-selection--multiple:hover { border-color: #9AA3BA !important; }
.swal2-popup.deny-dlg #community_select_div .select2-container--focus .select2-selection--multiple,
.swal2-popup.deny-dlg #community_select_div .select2-container--open .select2-selection--multiple {
  border-color: #202B56 !important;
  box-shadow: 0 0 0 3px rgba(32, 43, 86, .12) !important;
}
.swal2-popup.deny-dlg #community_select_div .select2-selection__rendered {
  display: flex !important;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  width: 100%;
  margin: 0 !important;
  padding: 0 !important;
  list-style: none;
}
.swal2-popup.deny-dlg #community_select_div .select2-search--inline,
.swal2-popup.deny-dlg #community_select_div .select2-search--inline .select2-search__field {
  float: none;
  margin: 0 !important;
  padding: 0 !important;
}
.swal2-popup.deny-dlg #community_select_div .select2-search--inline { flex: 1 1 120px; min-width: 120px; }
.swal2-popup.deny-dlg #community_select_div .select2-search--inline .select2-search__field {
  width: 100% !important;
  height: 34px !important;
  border: 0 !important;
  outline: 0;
  box-shadow: none !important;
  background: transparent;
  font-family: inherit;
  font-size: 15px !important;
  line-height: 34px;
  color: #202B56;
}
.swal2-popup.deny-dlg #community_select_div .select2-search__field::placeholder { color: #9AA3BA; }
/* chosen communities = navy pills */
.swal2-popup.deny-dlg #community_select_div .select2-selection__choice {
  position: relative;
  float: none;
  display: inline-flex;
  align-items: center;
  height: 30px;
  margin: 0 !important;
  padding: 0 12px 0 28px !important;
  border: 0 !important;
  border-radius: 999px !important;
  background: #202B56 !important;
  color: #fff !important;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1;
}
.swal2-popup.deny-dlg #community_select_div .select2-selection__choice__remove {
  position: absolute;
  left: 8px;
  top: 50%;
  transform: translateY(-50%);
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  color: rgba(255, 255, 255, .75) !important;
  font-size: 16px;
  line-height: 1;
}
.swal2-popup.deny-dlg #community_select_div .select2-selection__choice__remove:hover { color: #fff !important; }
.swal2-popup.deny-dlg #community_select_div .select2-selection__choice__display { padding: 0 !important; }

/* Placeholder centring (user 2026-11-13): style.css pushes the inline search field down with
   "#swal2-content … li .select2-search__field { margin-top: 10px/12px !important }", which is
   more specific than the rules above. Out-rank it here, dialog-only. */
#swal2-content .swal2-popup.deny-dlg .select2-search__field,
.swal2-popup.deny-dlg #community_select_div .select2-container--default .select2-selection--multiple .select2-selection__rendered li.select2-search--inline .select2-search__field,
.swal2-popup.deny-dlg #community_select_div .select2-container--default .select2-selection--multiple .select2-selection__rendered li .select2-search__field {
  margin: 0 !important;
  padding: 0 !important;
  height: 34px !important;
  line-height: 34px !important;
  vertical-align: middle;
}
.swal2-popup.deny-dlg #community_select_div .select2-container--default .select2-selection--multiple .select2-selection__rendered li.select2-search--inline {
  display: flex;
  align-items: center;
  height: 34px;
  margin: 0 !important;
}
