#new-subscriptions-modal {
  max-height: 90vh;
  overflow: auto;
  background: #eee;
}

#subscriptions-modal .section #dashboard_subscriptions {
  height: 390px;
  overflow: auto;
}

/* ── Section titles ─────────────────────────────────────────── */
#new-subscriptions-modal .sectionTitle {
  color: #242E3D;
  font-weight: 600;
  margin-bottom: 16px;
}

#new-subscriptions-modal .section .sectionTitle {
  color: #1e293b;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .4px;
  margin-bottom: 6px;
  text-transform: uppercase;
}

/* ── Day-of-week / month picker ─────────────────────────────── */
#new-subscriptions-modal input + label {
  align-items: center;
  aspect-ratio: 1;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  color: #64748b;
  cursor: pointer;
  display: flex;
  font-size: 11px;
  font-weight: 500;
  height: 26px;
  justify-content: center;
  margin-right: 4px;
  transition: background .12s, color .12s, border-color .12s;
  width: 26px;
}

#new-subscriptions-modal input + label:hover {
  background: #f1f5f9;
  color: #1e293b;
}

#new-subscriptions-modal input:checked + label {
  background-color: #e8eaed;
  border-color: #242E3D;
  color: #242E3D;
  font-weight: 700;
}

#new-subscriptions-modal li[data-page] {
  background-color: #eee;
}

#subscription_send_every_sub_container {
  flex-flow: wrap;
  gap: 4px;
}

/* ── Misc ───────────────────────────────────────────────────── */
#multiSelectForDashboardSubscriptions {
  height: 25px;
}

#multiSelectForDashboardSubscriptions .uMultiSelect.trigger {
  border: thin solid #00000030;
}

#new-subscriptions-modal small {
  color: #94a3b8;
  font-size: 10px;
}

/* ── Contact group badge ────────────────────────────────────── */
.contact-groups-added {
  align-items: center;
  background: #f1f5f9;
  border: 1px solid #e2e8f0 !important;
  border-radius: 6px 0 0 6px;
  color: #475569;
  cursor: pointer;
  display: flex !important;
  font-size: 10px;
  gap: 4px;
  padding: 0 8px !important;
  position: relative;
  white-space: nowrap;
  width: auto;
}

.contact-groups-added[data-contactgroups="0"] {
  display: none !important;
}

.contact-groups-added::before {
  background: #242E3D;
  border-radius: 50%;
  color: white;
  content: attr(data-contactgroups);
  font-size: 8px;
  font-weight: 700;
  height: 14px;
  line-height: 14px;
  min-width: 14px;
  padding: 0 3px;
  text-align: center;
}

/* ── Modal header ───────────────────────────────────────────── */
#new-subscriptions-modal .subsModalTitle {
  color: #1e293b;
  font-weight: 700;
}

#new-subscriptions-modal .subsModalSubtitle {
  color: #94a3b8;
  font-size: 11px;
}

/* ── Cards ──────────────────────────────────────────────────── */
#new-subscriptions-modal .subsCard {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 14px;
}

#new-subscriptions-modal .subsCard + .subsCard {
  margin-top: 12px;
}

#new-subscriptions-modal .subsCardHeader {
  align-items: center;
  color: #1e293b;
  display: flex;
  font-size: 10px;
  font-weight: 700;
  gap: 6px;
  letter-spacing: .4px;
  margin-bottom: 12px;
  text-transform: uppercase;
}

#new-subscriptions-modal .subsCardHeader i {
  color: #64748b;
  font-size: 12px;
}

/* ── Advanced options (collapsible card) ───────────────────── */
#new-subscriptions-modal details.advancedOptions summary {
  align-items: center;
  color: #1e293b;
  cursor: pointer;
  display: flex;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .4px;
  list-style: none;
  margin: 0;
  text-transform: uppercase;
  user-select: none;
}

#new-subscriptions-modal details.advancedOptions summary::-webkit-details-marker {
  display: none;
}

#new-subscriptions-modal details.advancedOptions summary i.bi-chevron-right {
  color: #64748b;
  font-size: 12px;
}

#new-subscriptions-modal details.advancedOptions .advancedToggleIcon {
  display: inline-block;
  transition: transform .15s;
}

#new-subscriptions-modal details.advancedOptions[open] .advancedToggleIcon {
  transform: rotate(90deg);
}

/* ── Inline reveal panel (expands under its trigger toggle) ──── */
#new-subscriptions-modal .revealPanel {
  display: grid;
  grid-template-rows: 1fr;
  margin-top: 10px;
  opacity: 1;
  transition: grid-template-rows .2s ease, opacity .15s ease, margin-top .2s ease;
}

#new-subscriptions-modal .revealPanel > div {
  min-height: 0;
  overflow: hidden;
}

#new-subscriptions-modal .revealPanel.collapsed {
  grid-template-rows: 0fr;
  margin-top: 0;
  opacity: 0;
}

/* ── Conditional tab bell icons ─────────────────────────────── */
#newSubscriptionsModal [data-page="conditionalTab"] .bi-bell        { display: none; }
#newSubscriptionsModal [data-page="conditionalTab"] .bi-bell-slash  { display: block; }
#newSubscriptionsModal [data-page="conditionalTab"].usingAlertMode .bi-bell       { display: block; }
#newSubscriptionsModal [data-page="conditionalTab"].usingAlertMode .bi-bell-slash { display: none; }

.htCheckboxRendererInput {
  margin-top: 15px !important;
}

/* ── Form base ──────────────────────────────────────────────── */
.form {
  font-size: 12px;
}

.form > .section:has(+.section) {
  margin-bottom: 20px;
}

.form > .section > .sectionTitle {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .4px;
  margin-bottom: 6px;
  text-transform: uppercase;
}

.form > .section > div:not(.sectionTitle):has(+div) {
  margin-bottom: 8px;
}

.form label {
  align-items: center;
  color: #475569;
  display: flex;
  font-size: 10px;
  font-weight: 500;
  justify-content: space-between;
  margin-bottom: 4px;
}

.form input:disabled + label {
  background-color: #f8fafc;
}

.form input,
.form select {
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  color: #1e293b;
  font-size: 11px;
  height: 28px;
  padding: 2px 8px;
  transition: border-color .12s;
  width: 100%;
}

.form input:focus,
.form select:focus {
  border-color: #94a3b8;
  outline: none;
}

.form input[type="file"] {
  font-size: 10px;
}

.form textarea {
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  font-size: 11px;
  height: 75px;
  padding: 6px 8px;
  resize: vertical;
  transition: border-color .12s;
  width: 100%;
}

.form textarea:focus {
  border-color: #94a3b8;
  outline: none;
}

.form select {
  padding: 2px 6px;
}

.form button.save {
  align-items: center;
  background: #1e293b;
  border: 0;
  border-radius: 6px;
  color: white;
  cursor: pointer;
  display: flex;
  font-size: 11px;
  font-weight: 500;
  height: 30px;
  justify-content: center;
  margin-right: 9px;
  transition: background .12s;
  width: 100%;
}

.form button.save:hover {
  background: #334155;
}

/* ── Save button (shared) ───────────────────────────────────── */
.saveNewAttributeButton {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  color: #374151;
  cursor: pointer;
  font-size: 11px;
  padding: 5px 12px;
  transition: background .12s, border-color .12s;
}

.saveNewAttributeButton:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

#saveSubscription.saveNewAttributeButton {
  background: #242E3D;
  border-color: #242E3D;
  color: white;
  font-weight: 500;
}

#saveSubscription.saveNewAttributeButton:hover {
  background: #1a2230;
}

/* ── Form switch ────────────────────────────────────────────── */
.form-check.form-switch {
  align-items: center;
  display: flex;
  justify-content: space-between;
  padding: 0 !important;
  width: 100%;
}

.form-check-input:checked {
  background-color: #242E3D;
  border-color: #242E3D;
}

/* ── Tab selector (segmented control) ──────────────────────── */
#new-subscriptions-modal .uTabsHeader {
  background: #f1f5f9;
  border-radius: 8px;
  display: flex;
  gap: 2px;
  padding: 3px;
  width: 100%;
}

#new-subscriptions-modal .uTabsHeader > div {
  border: none !important;
  border-radius: 6px;
  flex: 1;
  overflow: hidden;
  padding: 0 !important;
  transition: background-color .15s ease;
}

#new-subscriptions-modal .uTabsHeader label {
  align-items: center;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  font-size: 11px;
  font-weight: 600;
  justify-content: center;
  margin: 0;
  padding: 7px 8px !important;
  transition: background-color .15s ease, color .15s ease;
  white-space: nowrap;
  width: 100%;
}

#new-subscriptions-modal .uTabsHeader label i {
  font-size: 12px;
}

#new-subscriptions-modal .uTabsHeader > div:not(.selectedTab):hover label {
  background-color: #e2e8f0 !important;
  color: #1e293b !important;
}

#new-subscriptions-modal .uTabsHeader .selectedTab label {
  box-shadow: 0 1px 3px rgba(0,0,0,.15);
  font-weight: 700;
}

/* ── Subscription list cards ────────────────────────────────── */
#dashboard_subscriptions .subscription {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
  height: auto;
  margin-bottom: 8px;
  margin-left: 2px;
  padding: 12px;
  width: calc(100% - 4px);
}

#dashboard_subscriptions .subscription:hover {
  box-shadow: 0 2px 8px rgba(0,0,0,.08);
}

/* Subscription action buttons */
#dashboard_subscriptions .subscription .d-flex.align-items-start > div {
  align-items: center;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  color: #374151;
  cursor: pointer;
  display: flex;
  font-size: 10px;
  gap: 4px;
  height: 26px;
  margin-left: 4px;
  padding: 0 8px;
  transition: background .12s, border-color .12s;
  white-space: nowrap;
}

#dashboard_subscriptions .subscription .d-flex.align-items-start > div:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

/* Frequency / schedule / recipients info chips */
#dashboard_subscriptions .subscription .card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  color: #475569;
  font-size: 10px;
  margin-inline: 3px;
  padding: 4px 8px;
  width: 100%;
}

/* Subscription title */
#dashboard_subscriptions .subscription [style*="font-weight:bold"],
#dashboard_subscriptions .subscription [style*="font-weight: bold"] {
  color: #1e293b;
  font-size: 13px;
}

/* "Created by" badge shown when an admin views all users' subscriptions */
.subscriptionOwnerBadge {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  color: #475569;
  font-size: 10px;
  font-weight: 500;
  padding: 2px 6px;
}

/* ── Subscriptions list modal header ────────────────────────── */
#subscriptions-modal > .m-2 > div:first-child {
  color: #1e293b;
  font-size: 14px !important;
  font-weight: 600;
}

/* New subscription button in list */
#subscriptions-modal .saveNewAttributeButton {
  background: #242E3D;
  border-color: #242E3D;
  color: white;
  font-weight: 500;
}

#subscriptions-modal .saveNewAttributeButton:hover {
  background: #1a2230;
}
