.content-section {
  background: #ffffff;
  padding: 30px 50px;
  border: 0px solid #dddddd;
  border-radius: 0px;
  margin-bottom: 0px;
}

/* Expandable Channel List Styling */
.expandable-channel-list {
  font-family: monospace;
  cursor: pointer !important;
  display: inline;
}

.expandable-channel-list:hover {
  color: #004499;
}

.expandable-channel-list .channel-list-content,
.expandable-channel-list .channel-list-full {
  font-family: monospace;
  color: #0066cc;
}

.expandable-channel-list:hover .channel-list-content,
.expandable-channel-list:hover .channel-list-full {
  color: #004499;
}

/* JSON Editor Checkbox Visibility Fix */
/* Override Jet's checkbox hiding for JSON editor array tables (checkboxes without labels) */
/* Target checkboxes inside table cells with boolean schema type (array context) */
td[data-schematype="boolean"] input[type="checkbox"] {
  display: inline-block !important;
  width: auto !important;
  height: auto !important;
  opacity: 1 !important;
  position: relative !important;
  appearance: auto !important;
  -webkit-appearance: checkbox !important;
  -moz-appearance: checkbox !important;
}

.content-section2 {
  background: #e4edf7;
  padding: 30px 50px;
  border: 0px solid #dddddd;
  border-radius: 0px;
  margin-bottom: 0px;
}

.flex-container {
    display: flex;
}

.flex-child1 {
    flex: 1;
    vertical-align: middle;
    padding: 20px 50px;
}
.flex-child2 {
    flex: 1;
    vertical-align: middle;
    padding: 20px 20px;
    margin-left: 50px;
    alignment:  right;
}  
.flex-child3 {
    flex: 1;
    vertical-align: middle;
    padding: 20px 20px;
    margin-left: 10px;
    alignment:  right;
}
.flex-child4 {
    flex: 1;
    vertical-align: middle;
    padding: 10px 10px;
    alignment:  right;
}
.content-section3 {
  background: #ffffff;
  padding: 5px 5px;
  border: 0px;
  border-radius: 0px;
  border-bottom-left-radius: 10px;
  border-bottom-right-radius: 10px;
  margin-bottom: 0px;
}
.content-section4 {
  background: #e4edf7;
  padding: 10px 15px;
  border: 0px;
  border-radius: 0px;
  border-top-left-radius: 10px;
  border-top-right-radius: 10px;
  margin-bottom: 0px;
}
.popup1 {
  width: 500px;
  font-weight: normal !important;
  box-shadow:     0      5px      10px       #666;
  border-radius: 10px;
}

.tooltip-popup {
  filter: drop-shadow(0 14px 24px rgba(26, 27, 28, 0.18));
}

.tooltip-popup .popup1 {
  box-shadow: none;
  overflow: hidden;
  width: min(520px, calc(100vw - 40px));
}

.tooltip-popup .popup1 .content-section4 {
  align-items: center !important;
  background: #faf9fd !important;
  border-bottom: 1px solid rgba(145, 119, 197, 0.14);
  display: flex !important;
  gap: 8px;
  justify-content: space-between;
  min-height: 42px;
  padding: 9px 14px !important;
}

.tooltip-popup .popup1 .content-section4 > div {
  float: none !important;
  width: auto !important;
}

.tooltip-popup .popup1 .content-section4 > div:first-child,
.tooltip-popup .popup1 .summary-popup__title {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tooltip-popup .popup1 .content-section4 > div:last-child,
.tooltip-popup .popup1 .summary-popup__actions {
  align-items: center;
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  font-size: 0;
  gap: 8px;
  justify-content: flex-end;
  text-align: right;
}

.tooltip-popup .popup1 .content-section4 a.changelink,
.tooltip-popup .popup1 .content-section4 a.addlink,
.tooltip-popup .popup1 .content-section4 a.managelink,
.tooltip-popup .popup1 .content-section4 > div:last-child > a,
.tooltip-popup .popup1 .content-section4 a.summary-popup__action {
  align-items: center;
  background: var(--secondary) !important;
  background-image: none !important;
  border: 1px solid var(--secondary);
  border-radius: 6px;
  color: #ffffff !important;
  display: inline-flex !important;
  font-size: 0.86rem;
  font-weight: 500;
  gap: 4px;
  line-height: 1.2;
  min-height: 28px;
  padding: 4px 8px !important;
  text-decoration: none;
  white-space: nowrap;
}

.tooltip-popup .popup1 .content-section4 a.changelink::before,
.tooltip-popup .popup1 .content-section4 a.addlink::before,
.tooltip-popup .popup1 .content-section4 a.managelink::before {
  margin-right: 4px;
}

.tooltip-popup .popup1 .content-section4 a.changelink:hover,
.tooltip-popup .popup1 .content-section4 a.addlink:hover,
.tooltip-popup .popup1 .content-section4 a.managelink:hover,
.tooltip-popup .popup1 .content-section4 > div:last-child > a:hover,
.tooltip-popup .popup1 .content-section4 a.summary-popup__action:hover {
  background: var(--primary) !important;
  border-color: var(--primary);
  color: #ffffff !important;
}

.tooltip-popup .popup1 .content-section4 a.changelink:focus,
.tooltip-popup .popup1 .content-section4 a.changelink:active,
.tooltip-popup .popup1 .content-section4 a.changelink:visited,
.tooltip-popup .popup1 .content-section4 a.addlink:focus,
.tooltip-popup .popup1 .content-section4 a.addlink:active,
.tooltip-popup .popup1 .content-section4 a.addlink:visited,
.tooltip-popup .popup1 .content-section4 a.managelink:focus,
.tooltip-popup .popup1 .content-section4 a.managelink:active,
.tooltip-popup .popup1 .content-section4 a.managelink:visited,
.tooltip-popup .popup1 .content-section4 > div:last-child > a:focus,
.tooltip-popup .popup1 .content-section4 > div:last-child > a:active,
.tooltip-popup .popup1 .content-section4 > div:last-child > a:visited,
.tooltip-popup .popup1 .content-section4 a.summary-popup__action:focus,
.tooltip-popup .popup1 .content-section4 a.summary-popup__action:active,
.tooltip-popup .popup1 .content-section4 a.summary-popup__action:visited {
  color: #ffffff !important;
}

.tooltip-popup .popup1 .content-section4 a.summary-popup__action i {
  color: #ffffff !important;
  font-size: 0.84rem;
}

.tooltip-popup .popup1 .content-section4 a span,
.tooltip-popup .popup1 .content-section4 a.summary-popup__action span {
  background: transparent !important;
  border: 0 !important;
  color: #ffffff !important;
  display: inline !important;
  font: inherit !important;
  letter-spacing: 0 !important;
  line-height: inherit !important;
  overflow: visible !important;
  padding: 0 !important;
  text-align: inherit !important;
  text-overflow: clip !important;
  white-space: inherit !important;
}

.tooltip-popup .popup1 .content-section3 {
  padding: 0.75rem 0.75rem 0.9rem !important;
}

.tooltip-popup .popup1 .content-section3 .summary-popup__media {
  align-items: flex-start;
  display: flex;
  gap: 0.75rem;
}

.tooltip-popup .popup1 .content-section3 .summary-popup__image {
  flex: 0 0 auto;
}

.tooltip-popup .popup1 .content-section3 .summary-popup__image img {
  border-radius: 0.375rem;
  height: 4rem;
  object-fit: cover;
  width: 4rem;
}

.tooltip-popup .popup1 .content-section3 .summary-popup__media-content {
  flex: 1 1 auto;
  min-width: 0;
}

.tooltip-popup .popup1 .content-section3 .form-row {
  border-bottom: 0;
  gap: 0.5rem 0.75rem;
  line-height: 1.35;
  margin: 0 !important;
  padding: 0.3rem 0.5rem !important;
}

.tooltip-popup .popup1 .content-section3 .form-row + .form-row {
  margin-top: 0.25rem !important;
}

.autosave-inline-disabled {
  pointer-events :none;
  opacity: 0.5;
}

a.inline-deletelink {
  display: none !important;
}

#subjectlog_housing_form a.inline-deletelink,
#subjectlog_waterdeprivation_form a.inline-deletelink,
#subjectlog_fooddeprivation_form a.inline-deletelink {
  display: inline-block !important;
}

.autosave-status-idle {
  opacity: 0.5;
}

/* First-column quick actions */
.actions_container {
  gap: 0.25rem;
}

.actions_container .row-action,
.actions_container > a.has-tooltip,
.actions_container .dropbtn {
  align-items: center;
  background: transparent !important;
  background-image: none !important;
  border: 0 !important;
  border-radius: 0;
  color: var(--primary) !important;
  cursor: pointer;
  display: inline-flex !important;
  height: 1.5rem;
  justify-content: center;
  line-height: 1;
  padding: 0 !important;
  text-decoration: none !important;
  width: 1.5rem;
}

.actions_container .row-action:hover,
.actions_container > a.has-tooltip:hover,
.actions_container .dropbtn:hover,
.actions_container .dropbtn:focus {
  background: transparent !important;
  border-color: transparent !important;
  color: var(--secondary) !important;
}

.actions_container .row-action i,
.actions_container > a.has-tooltip i,
.actions_container .dropbtn i {
  color: var(--primary) !important;
  font-size: 1.05rem;
}

.actions_container .row-action:hover i,
.actions_container > a.has-tooltip:hover i,
.actions_container .dropbtn:hover i,
.actions_container .dropbtn:focus i {
  color: var(--secondary) !important;
}

.actions_container .row-action__label {
  display: none;
}

/*
 * Permission-aware hover JS (static/js/modalPopup.js) toggles visibility by
 * setting inline `display: none` on actions the user is not allowed to use.
 * The base action rules above use `display: ... !important`, which would
 * otherwise override that inline style and leak forbidden actions. These
 * high-specificity overrides ensure a hidden action stays hidden.
 */
.actions_container a[style*="display: none"],
.actions_container .row-action[style*="display: none"],
.actions_container .dropbtn[style*="display: none"],
.actions_container .dropdown[style*="display: none"],
.actions_container .dropdown-content[style*="display: none"],
.actions_container .dropdown-content a[style*="display: none"] {
  display: none !important;
}

.actions_container .row-action--view-only {
  cursor: help;
  opacity: 0.55;
}

.actions_container .row-action--view-only:hover {
  opacity: 0.75;
}

.actions_container img.dropbtn {
  filter: none;
  object-fit: contain;
  padding: 0.15rem !important;
}

.actions_container .dropdown {
  display: inline-flex;
  position: relative;
}

.actions_container .dropdown-content {
  background-color: #ffffff !important;
  border: 1px solid rgba(145, 122, 194, 0.18);
  border-radius: 0.375rem;
  box-shadow: 0 0.5rem 1.25rem rgba(0,0,0,0.12);
  display: none;
  min-width: 11rem;
  padding: 0.25rem;
  position: absolute;
  right: 0;
  top: calc(100% + 0.25rem);
  z-index: 20;
}

.actions_container .dropdown-content.dropdown-content--fixed {
  position: fixed !important;
  right: auto !important;
  z-index: 10000;
}

.actions_container .dropdown-content a {
  align-items: center;
  background: transparent !important;
  border-radius: 0.25rem;
  color: #393843 !important;
  display: flex !important;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem !important;
  text-decoration: none !important;
}

.actions_container .dropdown-content a::before {
  color: var(--secondary) !important;
  display: inline-block;
  font: normal normal normal 14px/1 FontAwesome;
  min-width: 1rem;
  text-rendering: auto;
  -webkit-font-smoothing: antialiased;
}

.actions_container .dropdown-content a:has(i)::before {
  display: none;
}

.actions_container .dropdown-content a.changelink::before {
  content: "\f040";
}

.actions_container .dropdown-content a.addlink::before {
  content: "\f0c5";
}

.actions_container .dropdown-content a.templatelink::before {
  content: "\f0f6";
}

.actions_container .dropdown-content a.managelink::before {
  content: "\f1de";
}

.actions_container .dropdown-content a.deletelink::before {
  content: "\f014";
}

.actions_container .dropdown-content a i {
  color: var(--secondary) !important;
  min-width: 1rem;
}

.actions_container .dropdown-content a .row-action__label {
  display: inline;
}

.actions_container .dropdown-content a:hover {
  background: var(--base) !important;
  color: var(--primary) !important;
}

.actions_container .dropdown-content a:hover::before,
.actions_container .dropdown-content a:hover i {
  color: var(--primary) !important;
}

.show {display:block;}

.name_container {
  display: flex;
}

input.remove-button:not(.has_original),
input.duplicate-button:not(.has_original) {
  display: none;
}

.help-modal__content {
    display: none;
    border-top: none;
}

.help-modal__content.active {
    display: block;
}

.help-modal__footer {
}

.help-modal__tab.button {
    all: unset; /* Reset all inherited button styles */
    display: inline-block; /* Ensure tabs are block-level elements */
    text-align: center; /* Center the text */
}

input[type=checkbox].toggle {
    display: inline-block!Important; /* Make it visible */
}

/* Project change form: fix User roles inline tabular grid alignment */
#user_roles-group .inline-related.tabular table {
  width: 100% !important;
  table-layout: fixed !important;
}

#user_roles-group .inline-related.tabular table .form-row {
  display: table-row !important;
}

#user_roles-group .inline-related.tabular table .form-row.empty-form {
  display: none !important;
}

#user_roles-group .inline-related.tabular table thead th,
#user_roles-group .inline-related.tabular table tbody td {
  display: table-cell !important;
  vertical-align: middle !important;
  text-align: left !important;
}

#user_roles-group .inline-related.tabular table tbody td select,
#user_roles-group .inline-related.tabular table tbody td input:not([type="hidden"]):not([type="checkbox"]),
#user_roles-group .inline-related.tabular table tbody td .select2-container,
#user_roles-group .inline-related.tabular table tbody td .select2-selection {
  width: 100% !important;
  max-width: none !important;
}

#user_roles-group .inline-related.tabular table tbody td.delete {
  white-space: nowrap;
  width: auto;
}

#user_roles-group .inline-related.tabular table th.original,
#user_roles-group .inline-related.tabular table td.original {
  display: none !important;
  width: 0 !important;
  padding: 0 !important;
}
