
/* ================================
   NOTIFICATIONS – MAIN VIEW
   ================================ */

#notifications-content { padding: 10px 12px 70px; font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; background: #f4f5f7;}
#notifications-content h1 { font-size: 18px; font-weight: 600; margin: 4px 0 8px;}
#noSubscriptionsMsg { margin-top: 16px; font-size: 14px; color: #777; text-align: center; }

/* Add New button */
#AddNewButton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  min-height: 44px;
  border-radius: 999px;
  border: none;
  background: #1f6feb;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  touch-action: manipulation;
}

#AddNewButton.disabled {
  background: #d4d4d4;
  color: #777;
  cursor: not-allowed;
}

/* List of subscriptions */
#subscriptionsList {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

/* Subscription card base */
.subscription-item {
  border-radius: 12px;
  padding: 8px 10px;
  margin-bottom: 1px;
  border: 1px solid #d9e2ec;
  background-color: #f8fafc;
  cursor: pointer;
  transition: background 0.12s ease, transform 0.08s ease, box-shadow 0.08s ease;
}

.subscription-item:active {
  background: #f1f5ff;
  transform: scale(0.99);
  box-shadow: 0 0 0 rgba(0, 0, 0, 0);
}

/* Light blue for "New Listings" (type=1) */
.subscription-item.subscription-type-new {
  background-color: #e7f1ff;
  border-color: #c3d8ff;
}

/* Light red/pink for "Price Changes" (type=2) */
.subscription-item.subscription-type-price {
  background-color: #ffe7e7;
  border-color: #ffc2c2;
}

/* Location line */
.location-line {
  font-size: 15px;
  font-weight: 600;
  color: #111827;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Ad-type / details line under the location */
.ad-type-line {
  font-size: 13px;
  color: #4b5563;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Location name + type label styling */
.subscription-item .subscription-location-name {
  font-weight: 600;
}

.subscription-item .subscription-type-label {
  color: #666;        /* medium grey */
  font-weight: 500;
}

/* Responsive tweaks for cards */
@media (max-width: 480px) {
  .subscription-item {
    padding: 10px 11px;
  }
  .location-line {
    font-size: 14px;
  }
  .ad-type-line {
    font-size: 12px;
  }
}


/* ================================
   NOTIFICATIONS – FULLSCREEN MODAL
   ================================ */

/* Fullscreen shell – allows vertical scroll, no horizontal scroll */
#addModal {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: 100%;
  background: #fff;
  z-index: 1000;

  overflow-y: auto;
  overflow-x: hidden;
}

/* Inner container */
#addModal .add-modal-container {
  min-height: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding: 10px 12px 12px;
}

/* Header bar – sticky at top */
#addModal #listing-count-wrapper {
  position: sticky;
  top: 0;
  z-index: 5;
  background: #fff;
  padding: 8px 0 6px;

  display: flex;
  align-items: center;
  justify-content: center;
}

/* Title */
#modalTitle {
  font-size: 17px;
  font-weight: 600;
  margin: 0;
}

/* Close button in top-right of header */
#closeModal {
  position: absolute;
  top: 10px;
  right: 10px;

  border: none;
  background: transparent;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  padding: 6px;
}

/* The form is just a normal block below header */
#addForm {
  display: block;
  margin-top: 8px;
}

/* Give the main body some padding at the bottom so
   sticky buttons don’t overlap final fields */
#modalBodyContent {
  padding-bottom: 70px;
}

/* Stick Save/Update/Delete row to bottom of viewport */
#formButtons {
  position: sticky;
  bottom: 0;
  background: #fff;
  padding-top: 10px;
  padding-bottom: 8px;
  border-top: 1px solid #e5e7eb;

  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* Expiry text in the form row */
#expiryInfo {
  font-size: 12px;
  color: #64748b;
}

/* Error message inside modal */
#errorMessage {
  margin-top: 6px;
  font-size: 12px;
  color: #b91c1c;
}

/* Safety net: prevent children from causing x-scroll */
#addModal input,
#addModal button,
#addModal .dropdown-menu,
#addModal .filter-group,
#addModal .price-range {
  max-width: 100%;
  box-sizing: border-box;
}


/* ================================
   TOGGLES (Sale/Rent, Type, Frequency)
   ================================ */

.toggle-button,
.toggle-button2 {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

/* Sale / Rent toggle */
#notifForSaleBtn,
#notifToRentBtn {
  flex: 1 1 0;
  border-radius: 999px;
  border: 1px solid #d0d7e2;
  background: #f3f5fa;
  font-size: 13px;
  padding: 8px 10px;
  min-height: 40px;
  cursor: pointer;
  touch-action: manipulation;
}

#notifForSaleBtn.active,
#notifToRentBtn.active {
  background: #1f6feb;
  border-color: #1f6feb;
  color: #ffffff;
}

/* New / Price Change & Daily / Weekly toggles */
#newBtn,
#changeBtn,
#dailyBtn,
#weeklyBtn {
  flex: 1 1 0;
  border-radius: 999px;
  border: 1px solid #d0d7e2;
  background: #f3f5fa;
  font-size: 13px;
  padding: 8px 10px;
  min-height: 40px;
  cursor: pointer;
  touch-action: manipulation;
}

#newBtn.active,
#changeBtn.active,
#dailyBtn.active,
#weeklyBtn.active {
  background: #1f6feb;
  border-color: #1f6feb;
  color: #ffffff;
}


/* ================================
   PRICE DROPDOWNS
   ================================ */

/* Layout of min / max row */
.price-range {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
}

.price-separator {
  font-size: 14px;
  color: #4b5563;
}

/* Wrappers */
#notifMinDropdownWrapper,
#notifMaxDropdownWrapper {
  position: relative;
  flex: 1 1 0;
}

/* Buttons */
#notifMinDropdownButton,
#notifMaxDropdownButton {
  width: 100%;
  text-align: left;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid #d0d7e2;
  background: #ffffff;
  font-size: 13px;
  min-height: 40px;
  cursor: pointer;
  touch-action: manipulation;
}

#notifMinDropdownButton::after,
#notifMaxDropdownButton::after {
  content: '▾';
  float: right;
  opacity: 0.65;
}

/* Dropdown menu (both min/max) */
#addModal .dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin-top: 2px;
  background: #ffffff;
  border-radius: 10px;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.25);
  border: 1px solid rgba(148, 163, 184, 0.4);
  max-height: 260px;
  overflow-y: auto;
  z-index: 20;
}

#addModal .dropdown-item {
  padding: 8px 10px; font-size: 13px; cursor: pointer;}

#addModal .dropdown-item:hover {
  background: #f3f5ff;}





  #notifications-content.notifications-page {
    background: transparent;
  }

  #notifications-content.notifications-page #listings-container.notifications-page__container {
    max-width: 920px;
    margin: 0 auto;
    padding: 20px 16px 96px;
    box-sizing: border-box;
  }

  #notifications-content .notifications-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px;
    margin-bottom: 16px;
    border: 1px solid #e5ebf3;
    border-radius: 22px;
    background:
      radial-gradient(circle at top right, rgba(37,99,235,.08), transparent 34%),
      linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    box-shadow: 0 10px 28px rgba(15,23,42,.06);
  }

  #notifications-content .notifications-hero__copy {
    min-width: 0;
  }

  #notifications-content .notifications-hero__eyebrow {
    display: inline-block;
    margin-bottom: 6px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #2563eb;
  }

  #notifications-content .notifications-hero h2 {
    margin: 0 0 6px;
    font-size: 28px;
    line-height: 1.1;
    letter-spacing: -.02em;
    color: #0f172a;
  }

  #notifications-content .notifications-hero p {
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
    color: #64748b;
    max-width: 560px;
  }

  #notifications-content .notifications-add-btn {
    flex: 0 0 auto;
    min-height: 48px;
    padding: 0 18px;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(180deg, #3b82f6 0%, #2563eb 100%);
    color: #fff;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: -.01em;
    box-shadow: 0 12px 24px rgba(37,99,235,.22);
    cursor: pointer;
  }

  #notifications-content .notifications-page-note {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    padding: 10px 14px;
    border: 1px solid #e8edf5;
    border-radius: 16px;
    background: #ffffff;
    color: #64748b;
    font-size: 13px;
    line-height: 1.45;
  }

  #notifications-content .notifications-page-note strong {
    color: #0f172a;
  }

  #notifications-content .subscriptions-list {
    padding: 8px 0;
  }

  #notifications-content .notifications-empty-state {
    display: none;
    margin-top: 10px;
    padding: 28px 20px;
    border: 1px dashed #d6e0ec;
    border-radius: 22px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    text-align: center;
    color: #64748b;
    font-size: 14px;
    line-height: 1.55;
  }

  /* modal shell */
/* ===============================
   Notifications modal - fixed working layout
   =============================== */

#addModal.notifications-modal-shell {
  position: fixed !important;
  inset: 0 !important;
  z-index: 3000 !important;
  display: none !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 12px !important;
  box-sizing: border-box !important;
  background: rgba(15, 23, 42, 0.58) !important;
  backdrop-filter: blur(5px) !important;
}

#addModal.notifications-modal-shell.is-open {
  display: flex !important;
}

#addModal.notifications-modal-shell .notifications-modal-card {
  position: relative !important;
  width: min(100%, 760px) !important;
  max-width: 760px !important;
  height: min(860px, calc(100dvh - 24px)) !important;
  max-height: min(860px, calc(100dvh - 24px)) !important;
  display: grid !important;
  grid-template-rows: auto minmax(0, 1fr) !important;
  overflow: hidden !important;
  border-radius: 26px !important;
  background: linear-gradient(180deg, #ffffff 0%, #fcfdff 100%) !important;
  border: 1px solid rgba(226,232,240,.85) !important;
  box-shadow: 0 24px 60px rgba(15,23,42,.20) !important;
}

#addModal .notifications-modal-header {
  display: flex !important;
  align-items: flex-start !important;
  justify-content: space-between !important;
  gap: 12px !important;
  padding: 18px 20px 16px !important;
  border-bottom: 1px solid #eef2f7 !important;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%) !important;
}

#addModal .notifications-modal-header__title {
  min-width: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 4px !important;
}

#addModal .notifications-modal-header__eyebrow {
  font-size: 11px !important;
  font-weight: 800 !important;
  letter-spacing: .08em !important;
  text-transform: uppercase !important;
  color: #2563eb !important;
}

#addModal #modalTitle {
  font-size: 20px !important;
  line-height: 1.2 !important;
  font-weight: 800 !important;
  letter-spacing: -.02em !important;
  color: #0f172a !important;
  text-align: left !important;
}

#addModal .notifications-modal-close {
  flex: 0 0 auto !important;
  width: 38px !important;
  height: 38px !important;
  border: 1px solid #dbe3ef !important;
  border-radius: 999px !important;
  background: #fff !important;
  color: #334155 !important;
  font-size: 22px !important;
  line-height: 1 !important;
  cursor: pointer !important;
}

#addModal #addForm.notifications-form {
  min-height: 0 !important;
  display: grid !important;
  grid-template-rows: minmax(0, 1fr) auto !important;
  overflow: hidden !important;
}

#addModal .notifications-modal-scroll {
  min-height: 0 !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  -webkit-overflow-scrolling: touch !important;
  overscroll-behavior: contain !important;
  padding: 18px 20px 24px !important;
}

#addModal .notifications-form-grid {
  display: grid !important;
  gap: 20px !important;
}

#addModal .notifications-location-group {
  position: relative !important;
  z-index: 25 !important;
}

#addModal .filter-group > label {
  display: block !important;
  margin-bottom: 10px !important;
  font-size: 13px !important;
  font-weight: 800 !important;
  color: #0f172a !important;
  letter-spacing: -.01em !important;
}

#addModal #locationInput {
  width: 100% !important;
  min-height: 48px !important;
  padding: 0 14px !important;
  border: 1px solid #dbe3ef !important;
  border-radius: 14px !important;
  box-sizing: border-box !important;
  font-size: 15px !important;
  background: #fff !important;
}

#addModal #locationInput:focus {
  outline: none !important;
  border-color: #93c5fd !important;
  box-shadow: 0 0 0 4px rgba(37,99,235,.10) !important;
}

#addModal #autocompleteResults {
  position: absolute !important;
  left: 0 !important;
  right: 0 !important;
  top: calc(100% + 10px) !important;
  background: #fff !important;
  z-index: 1001 !important;
  max-height: min(320px, 45dvh) !important;
  overflow-y: auto !important;
  display: none;
  border: 1px solid #dbe3ef !important;
  border-radius: 18px !important;
  box-shadow: 0 16px 34px rgba(15,23,42,.12) !important;
}

#addModal .toggle-button,
#addModal .toggle-button2 {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 10px !important;
}

#addModal .bedrooms-buttons {
  display: grid !important;
  grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
  gap: 8px !important;
}

#addModal .toggle-btn,
#addModal .toggle-btn2,
#addModal .bedroom-btn {
  min-height: 44px !important;
  padding: 10px 14px !important;
  border: 1px solid #dbe3ef !important;
  border-radius: 999px !important;
  background: #fff !important;
  color: #0f172a !important;
  font-weight: 800 !important;
  font-size: 14px !important;
  cursor: pointer !important;
  transition: all .14s ease !important;
}

#addModal .bedroom-btn {
  width: 100% !important;
  min-width: 0 !important;
  padding: 10px 0 !important;
  text-align: center !important;
  white-space: nowrap !important;
}

#addModal .toggle-btn.active,
#addModal .toggle-btn2.active,
#addModal .bedroom-btn.active {
  color: #fff !important;
  border-color: #2563eb !important;
  background: linear-gradient(180deg, #3b82f6 0%, #2563eb 100%) !important;
  box-shadow: 0 10px 18px rgba(37,99,235,.18) !important;
}

#addModal .price-range {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) !important;
  gap: 10px !important;
  align-items: center !important;
}

#addModal .price-separator {
  color: #94a3b8 !important;
  font-weight: 700 !important;
}

#addModal .custom-dropdown {
  position: relative !important;
  min-width: 0 !important;
}

#addModal .dropdown-button {
  width: 100% !important;
  min-width: 0 !important;
  min-height: 46px !important;
  padding: 10px 14px !important;
  border: 1px solid #dbe3ef !important;
  border-radius: 14px !important;
  background: #fff !important;
  text-align: left !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  color: #0f172a !important;
  cursor: pointer !important;
}

#addModal .dropdown-button::after {
  content: "▾" !important;
  float: right !important;
  color: #64748b !important;
}

#addModal .dropdown-menu {
  display: none;
  position: absolute !important;
  left: 0 !important;
  right: 0 !important;
  top: calc(100% + 6px) !important;
  z-index: 20 !important;
  max-height: 260px !important;
  overflow-y: auto !important;
  border: 1px solid #dbe3ef !important;
  border-radius: 16px !important;
  background: #fff !important;
  box-shadow: 0 16px 34px rgba(15,23,42,.12) !important;
  padding: 6px !important;
}

#addModal .dropdown-item {
  padding: 10px 12px !important;
  border-radius: 10px !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  cursor: pointer !important;
}

#addModal .dropdown-item:hover {
  background: #eff6ff !important;
  color: #1d4ed8 !important;
}

#addModal .exact-match {
  margin-top: 12px !important;
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  color: #475569 !important;
  font-size: 14px !important;
  font-weight: 600 !important;
}

#addModal hr {
  margin: 8px 0 0 !important;
  border: 0 !important;
  border-top: 1px solid #eef2f7 !important;
}

#addModal .notifications-form-error {
  min-height: 20px !important;
  margin-top: 6px !important;
  color: #dc2626 !important;
  font-size: 13px !important;
  font-weight: 700 !important;
}

#addModal .notifications-bottom-spacer {
  height: 8px !important;
}

#addModal .notifications-actions-bar {
  position: sticky !important;
  bottom: 0 !important;
  z-index: 5 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
  padding: 16px 20px !important;
  border-top: 1px solid #eef2f7 !important;
  background: linear-gradient(180deg, rgba(255,255,255,.98) 0%, #f8fbff 100%) !important;
  box-shadow: 0 -8px 18px rgba(15,23,42,.05) !important;
}

#addModal .notifications-actions {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  flex-wrap: wrap !important;
}

#addModal #saveButton,
#addModal #updateButton,
#addModal #deleteButton {
  min-height: 46px !important;
  padding: 0 18px !important;
  border-radius: 999px !important;
  font-size: 14px !important;
  font-weight: 800 !important;
  letter-spacing: -.01em !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  cursor: pointer !important;
}

#addModal #saveButton,
#addModal #updateButton {
  border: 0 !important;
  color: #fff !important;
  background: linear-gradient(180deg, #3b82f6 0%, #2563eb 100%) !important;
  box-shadow: 0 10px 20px rgba(37,99,235,.18) !important;
}

#addModal #deleteButton {
  border: 1px solid #fecaca !important;
  color: #dc2626 !important;
  background: #fff !important;
}

#addModal #expiryInfo {
  font-size: 13px !important;
  color: #64748b !important;
  font-weight: 700 !important;
}

@media (max-width: 767px) {
  #addModal.notifications-modal-shell {
    padding: 0 !important;
    align-items: flex-end !important;
  }

  #addModal.notifications-modal-shell .notifications-modal-card {
    width: 100% !important;
    max-width: none !important;
    height: calc(100dvh - 6px) !important;
    max-height: calc(100dvh - 6px) !important;
    border-radius: 24px 24px 0 0 !important;
  }

  #addModal .notifications-modal-scroll {
    padding: 16px 14px 18px !important;
  }

  #addModal .price-range {
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) !important;
    gap: 8px !important;
  }

  #addModal .bedrooms-buttons {
    grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
    gap: 6px !important;
  }

  #addModal .bedroom-btn {
    font-size: 12px !important;
  }

  #addModal .dropdown-button {
    font-size: 13px !important;
    padding: 10px 12px !important;
  }

  #addModal .notifications-actions-bar {
    flex-direction: column !important;
    align-items: stretch !important;
    padding: 14px !important;
    padding-bottom: calc(14px + env(safe-area-inset-bottom, 0px)) !important;
  }

  #addModal .notifications-actions {
    width: 100% !important;
  }

  #addModal #saveButton,
  #addModal #updateButton,
  #addModal #deleteButton {
    width: 100% !important;
  }
}  



.notifications-page-note{ display:flex; align-items:center; gap:12px;}

.notifications-page-note__icon{
  flex:0 0 auto;
  width:32px;
  height:32px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  line-height:0;
}

.notifications-tip-bulb{ width:32px; height:32px; display:block;}

.notifications-page-note__text{ display:block;}

#notifications-content .notifications-page-note{
  display:flex;
  align-items:center;
  gap:12px;
  opacity:1;
  visibility:visible;
  transform:translateY(0);
  transition:opacity .28s ease, transform .28s ease, visibility .28s ease;
}

#notifications-content .notifications-page-note.is-hiding{
  opacity:0;
  visibility:hidden;
  transform:translateY(-4px);
  pointer-events:none;
}