/*
================================================================
| global.css
|
| This file contains all custom styles for the Oxford application.
| It uses CSS variables defined in the :root for easy theme
| management, based on the provided "Design Guidelines".
================================================================
*/

/* -- FONT & COLOR DEFINITIONS -- */
@import url("https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100..900;1,100..900&display=swap");

:root {
  /* Primary Color Palette from Design Guidelines */
  --primary-midnight-indigo: #fcfcfc;
  --accent-electric-violet: #6c4ff6;
  --neutral-base-light: #fff;
  --highlight-signal-coral: #ff6b59;

  /* UI Element Colors */
  --body-bg-color: #f5f5f5;
  --text-primary-color: #333540;
  --text-secondary-color: #a0a0a0;
  --border-color: #9e9e9e;

  /* Semantic colors */
  --success-color: #00803a;
  --warning-color: #ffc107;
  --danger-color: #ff6859;

  /* Bootstrap Overrides & Customizations */
  --bs-body-font-family: "Roboto", sans-serif;
  --bs-body-font-size: 0.9rem;
  --bs-body-color: var(--text-primary-color);
  --bs-body-bg: var(--body-bg-color);
  --bs-border-color: var(--border-color);
  --bs-dark-rgb: 26, 28, 44;
}

body {
  font-family: var(--bs-body-font-family);
  background-color: var(--bs-body-bg);
  color: var(--bs-body-color);
  font-size: var(--bs-body-font-size);
}
img {
  max-width: 100%;
}
::-webkit-scrollbar {
  width: 6px;
  height: 4px;
}
::-webkit-scrollbar-track {
  background: var(--text-secondary-color);
  border-radius: 6px;
}
::-webkit-scrollbar-thumb {
  background: var(--text-primary-color);
  border-radius: 6px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent-electric-violet);
}

/*
================================================================
| MAIN LAYOUT
================================================================
*/
.app-wrapper {
  display: flex;
  min-height: 100vh;
}
.main-sidebar {
  width: 250px;
  background-color: var(--primary-midnight-indigo);
  padding: 1.5rem 1rem;
  display: flex;
  flex-direction: column;
  transition: width 0.3s ease-in-out, left 0.3s ease-in-out;
  border: 1px solid #a8a8a8;
  box-shadow: 0 0 10px 0 rgba(51, 53, 64, 0.1);
  z-index: 1030;
  position: fixed;
  left: 32px;
  top: 32px;
  bottom: 32px;
  border-radius: 20px;
}
.main-content {
  flex-grow: 1;
  padding: 2rem 2.5rem;
  overflow-y: auto;
  margin-left: 280px;
  transition: all 0.3s;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.main-sidebar.collapsed + .main-content {
  margin-left: 150px;
}

/*
================================================================
| SIDEBAR STYLES (EXPANDED & COLLAPSED)
================================================================
*/
.sidebar-header {
  margin: 2rem auto 1rem;
  text-align: center;
}
.sidebar-header > span {
  font-size: 0.75rem;
}
.app-logo {
  display: flex;
  justify-content: center;
  max-width: 162px;
  margin: 0 auto;
}
.sidebar-nav {
  flex-grow: 1;
  overflow-x: hidden;
  overflow-y: auto;
}
.user-profile {
  margin-top: 1rem;
  font-size: 1rem;
  font-weight: 500;
  margin-left: 1rem;
}
.user-info {
  display: flex;
  align-items: center;
  margin-bottom: 1rem;
}
.userAvatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  overflow: hidden;
  border: 1px solid var(--border-color);
}
.user-name {
  margin-left: 10px;
  flex: 1;
}
.logout {
  color: var(--danger-color);
  text-decoration: none;
  line-height: 2rem;
  display: flex;
}
.sidebar-nav hr {
  margin: 1rem 0;
  color: inherit;
  border: 0;
  border-top: var(--bs-border-width) solid;
  opacity: 0.25;
}
/* Desktop Collapse Button */
.sidebar-toggle-btn {
  background: transparent;
  color: var(--accent-electric-violet);
  padding: 0;
  position: absolute;
  top: 20px;
  right: -12px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background-color: var(--primary-midnight-indigo);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1031;
  transition: transform 0.3s ease;
}
.sidebar-toggle-btn svg {
  width: 30px;
  height: 30px;
  stroke-width: 1px;
}
.sidebar-toggle-btn:hover {
  border-color: var(--accent-electric-violet);
}
.main-sidebar.collapsed .sidebar-toggle-btn svg {
  width: 24px;
  height: 24px;
}
.main-sidebar.collapsed .sidebar-toggle-btn {
  transform: rotate(180deg);
}

/* Collapsed State */
.main-sidebar.collapsed {
  width: 120px;
  padding: 1.5rem 0.5rem;
}
.main-sidebar.collapsed .nav-label,
.main-sidebar.collapsed .user-name,
.main-sidebar.collapsed .nav-section-title .nav-label {
  display: none;
}
.main-sidebar.collapsed .nav-link {
  justify-content: center;
}
.main-sidebar.collapsed .nav-link .nav-icon {
  margin-right: 0;
}
.main-sidebar.collapsed .user-profile img {
  margin-right: 0;
}
.main-sidebar.collapsed .sidebar-header > span {
  font-size: 0.5rem;
}

/*
================================================================
| CONTENT & TABLE STYLES
================================================================
*/
.page-header {
  margin-bottom: 2rem;
}
.page-title {
  font-size: 2.25rem;
  font-weight: 700;
}
.page-back-link {
  display: block;
  font-size: 0.9rem;
  color: var(--accent-electric-violet);
  text-decoration: none;
  margin-bottom: 0.25rem;
}
.page-back-link:hover {
  color: var(--text-primary-color);
}

/* Buttons */
.btn {
  padding: 6px 16px;
  font-weight: 600;
  border-radius: 0.5rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.btn.btn-primary {
  background-color: var(--accent-electric-violet);
  border-color: var(--accent-electric-violet);
  color: var(--primary-midnight-indigo);
  display: flex;
  align-items: center;
  gap: 10px;
}
.btn-primary svg {
  height: 24px;
}
.btn.btn-primary:hover,
.btn.btn-primary:active,
.btn.btn-primary:focus {
  background-color: var(--text-primary-color);
  border-color: var(--text-primary-color);
  color: var(--primary-midnight-indigo);
}
.btn-icon {
  padding: 0.6rem;
}
.btn-outline-secondary,
.controlBtnWrap .btn {
  background-color: transparent;
  border: 1px solid var(--accent-electric-violet);
  color: var(--accent-electric-violet);
  padding: 6px 16px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.btn-check:checked + .btn,
.btn.active,
.btn.show,
.btn:first-child:active,
:not(.btn-check) + .btn:active,
.btn-outline-secondary:hover,
.btn-secondary:hover,
.btn-secondary:active,
.btn-secondary:focus,
.controlBtnWrap .btn:hover {
  border-color: var(--text-primary-color);
  background-color: var(--text-primary-color);
  color: var(--neutral-base-light);
}
.blockContent,
.form-container {
  background-color: var(--primary-midnight-indigo);
  padding: 20px;
  border-radius: 20px;
  border: 1px solid var(--border-color);
  box-shadow: 0 0 10px 0 rgba(51, 53, 64, 0.1);
}
.btnWrap {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}
/* DataTables */
.dataTables_wrapper {
  background-color: var(--primary-midnight-indigo);
  border: 1px solid #a8a8a8;
  box-shadow: 0 0 10px 0 rgba(51, 53, 64, 0.1);
  padding: 1.5rem;
  border-radius: 20px;
}
table.dataTable {
  border-collapse: collapse !important;
  width: 100% !important;
  margin-top: 16px !important;
}
table.dataTable thead th {
  border-bottom: 1px solid var(--border-color);
  font-weight: 400;
  white-space: nowrap;
}
table.dataTable thead th .dt-column-order {
  color: var(--accent-electric-violet);
}
table.dataTable thead > tr > th.dt-ordering-asc span.dt-column-order:before,
table.dataTable thead > tr > th.dt-ordering-desc span.dt-column-order:after,
table.dataTable thead > tr > td.dt-ordering-asc span.dt-column-order:before,
table.dataTable thead > tr > td.dt-ordering-desc span.dt-column-order:after {
  opacity: 1;
}
table.dataTable tbody tr {
  background-color: transparent;
}
table.dataTable tbody tr:hover {
  cursor: pointer;
}
.table > :not(caption) > * > * {
  background-color: transparent;
}
table.dataTable.table-striped > tbody > tr.odd > * {
  box-shadow: none;
}
.dataTables_wrapper .btn {
  padding: 3px 6px;
}
/* Override Bootstrap's hover color by targeting the cells (td/th) directly */
table.dataTable.table-hover > tbody > tr:hover > * {
  background-color: #e3e3e3;
}
table.dataTable tbody td {
  border-top: 1px solid var(--border-color);
  vertical-align: middle;
  color: var(--text-primary-color);
  transition: background-color 0.15s ease-in-out;
}
table.dataTable thead th:not(:first-child),
table.dataTable tbody td:not(:first-child) {
  border-left: 1px solid var(--border-color);
}
table.dataTable thead th:first-child,
table.dataTable tbody td:first-child {
  padding-left: 0;
}
td.show-name-col {
  width: 300px !important;
  min-width: 300px !important;
  white-space: nowrap !important;
}
table.dataTable thead > tr > th.sorting_asc:before,
table.dataTable thead > tr > th.sorting_desc:after,
table.dataTable thead > tr > td.sorting_asc:before,
table.dataTable thead > tr > td.sorting_desc:after {
  color: var(--accent-electric-violet);
  opacity: 1;
}
/* Hide default DataTables pagination per user request */
/* .dataTables_paginate,
.pagination {
  display: none !important;
} */

.show-more-container {
  padding: 0.5rem 0;
  text-align: center;
}

.show-more-link {
  font-size: 1rem;
  color: var(--accent-electric-violet);
  border: none;
  font-weight: 600;
  text-decoration: underline;
  display: inline-flex;
  align-items: center;
  padding: 0;
}
.show-more-link:hover {
  color: var(--text-primary-color);
}
.show-more-link svg {
  margin-left: 0.5rem;
  width: 16px;
  height: 16px;
  transition: transform 0.2s ease;
}

/* Custom Checkbox */
.form-check-input {
  -webkit-appearance: none;
  appearance: none;
  margin: 0;
  font: inherit;
  width: 1.25rem;
  height: 1.25rem;
  background-color: var(--neutral-base-light);
  border: 1px solid var(--text-secondary-color);
  border-radius: 50%;
  display: grid;
  place-content: center;
  cursor: pointer;
  transition: border-color 0.2s;
  flex-shrink: 0;
}
.form-check-input:hover {
  border-color: var(--accent-electric-violet);
}
.form-check-input::before {
  content: "";
  width: 0.65em;
  height: 0.65em;
  transform: scale(0);
  transition: 120ms transform ease-in-out;
  box-shadow: inset 1em 1em var(--accent-electric-violet);
  background-color: CanvasText;
  transform-origin: bottom left;
  clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 43% 62%);
}
.form-switch .form-check-input {
  border: 1px solid var(--border-color);
}
.form-check-input:checked {
  border-color: var(--accent-electric-violet);
  background-color: var(--accent-electric-violet);
}
.form-check-input[type="radio"]:checked {
  background-color: var(--neutral-base-light);
}
.form-check-input[type="radio"]:checked::before {
  width: 0.75rem;
  height: 0.75rem;
  background-color: var(--body-bg-color);
  transform: scale(1);
  clip-path: none;
  border-radius: 50%;
}

/* Override Bootstrap's float-based .form-check for better alignment with custom checkboxes */
.form-check {
  display: flex;
  align-items: center;
  gap: 0.5rem; /* Space between checkbox and label */
  padding-left: 0; /* Remove Bootstrap's default padding */
}

.form-check-label {
  white-space: nowrap; /* Prevent label from wrapping */
  margin-bottom: 0; /* Remove default margin */
  font-size: 1rem; /* Adjust as needed */
  line-height: 1.2;
}

/* Make important section labels brighter */
.form-label,
.form-label.mb-2 {
  color: var(--text-primary-color); /* or your default */
  font-weight: 600; /* Optional: make them bolder */
  letter-spacing: 0.01em; /* Optional: subtle clarity */
}
.label-header {
  font-size: 1rem;
  font-weight: 500;
  margin-top: 4px;
}

.form-control::placeholder {
  color: #776f6f !important;
  opacity: 0.85 !important;
}

/*
================================================================
| FILTER PANEL STYLES
================================================================
*/
.offcanvas.offcanvas-end {
  width: 640px;
}
#detailsPanel.offcanvas.offcanvas-end {
  width: 1400px; /* Wider panel for details view */
  max-width: 90%;
}

.offcanvas {
  background-color: var(--primary-midnight-indigo);
  border-left: 1px solid var(--border-color);
  overflow-y: auto;
}
.offcanvas-header {
  box-shadow: 0px 4px 10px 0px rgba(0, 0, 0, 0.05);
  padding: 20px 60px;
  font-size: 2rem;
  font-weight: 600;
}
.offcanvas-header .btn-close {
  display: none;
}

.horizontalChkRadio {
  display: flex;
  align-items: center;
  gap: 2rem;
  margin-bottom: 1rem;
}
/* Custom Close Button for Offcanvas - Per user spec */
.offcanvas-close-btn {
  position: absolute;
  top: 50%;
  left: 0px;
  transform: translateY(-50%);
  width: 19px;
  height: 110px;
  background-color: var(--accent-electric-violet);
  border: none;
  border-top-right-radius: 1rem;
  border-bottom-right-radius: 1rem;
  color: var(--primary-midnight-indigo);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1056;
  padding: 0;
}
.offcanvas-close-btn:hover {
  background-color: var(--text-primary-color);
}
.offcanvas-body {
  display: flex;
  flex-direction: column;
  padding: 20px 60px;
}
.offcanvas-body .form-check-label {
  font-size: 0.875rem;
}
.sectionHeadingBig {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1rem;
}
.sectionHeading {
  font-size: 1.25rem;
  margin-bottom: 1rem;
}
.offcanvas-footer-custom {
  padding: 20px 60px;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
}

/* Use more padding for the details panel body to match original page layout */
#detailsPanel .offcanvas-body {
  padding: 60px;
}

.offcanvas-body form {
  flex-grow: 1;
}

.filter-actions {
  flex-shrink: 0;
}

.form-group-separator {
  border-color: var(--border-color);
}
.form-select,
.form-control {
  background-color: var(--neutral-base-light);
  border-color: var(--border-color);
  color: var(--text-primary-color);
  text-align: left;
}
.form-select:focus,
.form-control:focus {
  background-color: var(--neutral-base-light);
}
.form-check-input:focus,
.form-select:focus,
.form-control:focus {
  border-color: var(--accent-electric-violet);
  box-shadow: 0 0 0 0.25rem rgba(108, 79, 246, 0.3);
  color: var(--text-primary-color);
}

.filter-group .btn-group .btn {
  white-space: nowrap;
}

/* Custom Switch */
.custom-form-switch .form-check-input {
  width: 2.5rem;
  height: 1.25rem;
  background-color: var(--border-color);
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23fff'/%3e%3c/svg%3e");
  background-position: left center;
  border-radius: 2em;
  border-color: var(--border-color);
  transition: background-position 0.15s ease-in-out;
}
.custom-form-switch .form-check-input:checked {
  background-position: right center;
  background-color: var(--accent-electric-violet);
  border-color: var(--accent-electric-violet);
}

/* Custom Category Selector */
.category-dropdown {
  position: relative;
}
.category-selector-container {
  position: absolute;
  bottom: 100%;
  left: 0;
  right: 0;
  z-index: 10;
  margin-bottom: 0.5rem; /* Gap between menu and trigger */
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  padding: 0.5rem;
  background-color: var(--primary-midnight-indigo);
  display: none; /* Hidden by default */
}
.category-list {
  max-height: 200px;
  overflow-y: auto;
}
.category-list-item {
  padding: 4px 0;
  border-bottom: 1px solid var(--border-color);
  cursor: pointer;
  transition: background-color 0.2s;
}
.category-list-item:last-child {
  border-bottom: none;
}
.category-list-item:hover {
  background-color: var(--neutral-base-light);
}
.category-list-item .form-check-label {
  margin-left: 0.5rem;
}
.category-list-item .form-check {
  pointer-events: none;
  margin: 0;
}
.category-select-display {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
}
.category-dropdown.open .category-selector-container {
  display: block;
}
.category-select-display svg {
  transition: transform 0.2s ease-in-out;
}
.category-dropdown.open .category-select-display svg {
  transform: rotate(180deg);
}

/* noUiSlider */
.range-slider-inputs .form-control {
  width: 80px;
  text-align: center;
  background-color: transparent;
  border-color: var(--border-color);
}
.range-slider-inputs input[type="number"]::-webkit-inner-spin-button,
.range-slider-inputs input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.range-slider-inputs input[type="number"] {
  -moz-appearance: textfield;
}

.noUi-target {
  background: var(--body-bg-color);
  border: 1px solid var(--border-color);
  border-radius: 0;
  box-shadow: none;
  height: 6px;
}
.noUi-connects {
  background: #fff;
}
.noUi-connect {
  background: var(--accent-electric-violet);
  height: 6px;
}
.noUi-handle {
  background: #000 !important;
  border: 4px solid var(--accent-electric-violet);
  border-radius: 50%;
  box-shadow: none;
  cursor: pointer;
  width: 16px !important;
  height: 16px !important;
  right: -11px !important;
  top: -6px !important;
}
.noUi-handle:after,
.noUi-handle:before {
  background: transparent !important;
}
.noUi-handle:focus {
  outline: none;
}
.noUi-tooltip {
  display: none;
}

/*
================================================================
| MODAL STYLES
================================================================
*/
.modal-content {
  background-color: var(--primary-midnight-indigo);
  border: 1px solid var(--border-color);
  border-radius: 0.75rem;
  padding: 1.5rem;
  color: var(--text-primary-color);
}
.modal-header,
.modal-footer {
  border: none;
}
.modal-body {
  padding-bottom: 0;
}
.modal-title {
  font-weight: 700;
  font-size: 1.75rem;
}

/*
================================================================
| BUILD PLAN FORM STYLES
================================================================
*/
.campaign-form .form-step {
  padding: 2rem 0;
  border-bottom: 1px solid var(--border-color);
}
.campaign-form .form-step:last-child {
  border: none;
}
.form-step-header {
  color: var(--accent-electric-violet);
  font-size: 1rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
}
.form-step-title {
  font-size: 1.375rem;
  font-weight: 500;
  margin-bottom: 2rem;
}
.cpm-options .form-check {
  display: flex;
  margin-right: 1.5rem;
}

/* Custom file input style */
input[type="file"].form-control {
  padding-right: 0;
}

input[type="file"].form-control::-webkit-file-upload-button {
  background: var(--accent-electric-violet);
  color: var(--neutral-base-light);
  border: none;
  border-radius: 0 0.375rem 0.375rem 0;
  padding: 0.375rem 1.25rem;
  cursor: pointer;
  transition: background 0.2s;
  float: right;
  margin-right: -10px;
}

input[type="file"].form-control::file-selector-button {
  background: var(--accent-electric-violet);
  color: var(--neutral-base-light);
  border: none;
  border-radius: 0 0.375rem 0.375rem 0;
  padding: 0.375rem 1.25rem;
  cursor: pointer;
  transition: background 0.2s;
  float: right;
  margin-right: -10px;
}

input[type="file"].form-control::-webkit-file-upload-button:hover,
input[type="file"].form-control::file-selector-button:hover {
  background: var(--accent-electric-violet);
}

/*
================================================================
| DETAILS PAGE STYLES
================================================================
*/
.descList {
  display: flex;
  border-bottom: 1px solid var(--border-color);
  padding: 0.5rem 0;
}
.descList:last-child {
  border-bottom: none;
}
.descList a {
  color: var(--accent-electric-violet);
}
.details-card {
  margin-bottom: 0rem;
}
.details-header-img {
  width: 100%;
  border-radius: 0.75rem;
  object-fit: cover;
}
.details-definition-list dt {
  color: var(--text-secondary-color);
  width: 150px;
  flex-shrink: 0;
}
.details-definition-list dd {
  margin-left: 1rem;
  margin-bottom: 0;
}
.stat-card {
  background-color: var(--neutral-base-light);
  border: 1px solid var(--border-color);
  padding: 1.25rem;
  border-radius: 0.5rem;
  text-align: center;
  width: 100%;
  word-break: break-word;
}
.stat-value {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary-color);
}
.stat-indicator {
  font-size: 1rem;
  font-weight: 700;
  color: var(--success-color);
}
.risk-indicator {
  display: inline-block;
  padding: 0.25rem 1rem;
  border-radius: 9999px;
  font-weight: 600;
  font-size: 0.8rem;
}
.risk-low {
  background-color: var(--success-color);
  color: var(--neutral-base-light);
}
.risk-medium {
  background-color: rgba(255, 193, 7, 0.2);
  color: #ffc107;
}
.risk-high {
  background-color: rgba(220, 53, 69, 0.2);
  color: #dc3545;
}

.chart-container {
  height: 300px;
  position: relative;
}
.resultSection {
  margin: 2rem 0;
}
.sectionTitle {
  margin-bottom: 20px;
  font-size: 2.25rem;
  font-weight: 600;
}
.subTitle {
  font-size: 1.25rem;
  color: var(--text-primary-color);
}
.resultItems {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.past-result-item {
  font-size: 1.25rem;
  font-weight: 400;
  background-color: var(--neutral-base-light);
  border: 1px solid var(--border-color);
  padding: 1rem 1.25rem;
  border-radius: 0.5rem;
  text-decoration: none;
  color: var(--text-primary-color);
  transition: background-color 0.2s;
  display: flex;
  flex-direction: column;
}
.past-result-item:hover {
  border-color: var(--accent-electric-violet);
}
.past-result-item .result-count {
  color: var(--accent-electric-violet);
  font-size: 1.125rem;
}
.navHeading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1rem;
}
.navItemList {
  list-style-type: none;
  margin: 0;
  padding: 0;
}
.navItemList li {
  margin-bottom: 5px;
  font-size: 1rem;
  font-weight: 500;
}
.navItemList li a {
  display: flex;
  align-items: center;
  padding: 12px 0 12px 12px;
  line-height: 1.25rem;
  border-left: 5px solid transparent;
  color: inherit;
  text-decoration: none;
}
.navItemList li.active a,
.navItemList li:hover a {
  color: var(--accent-electric-violet);
  border-color: var(--accent-electric-violet);
}
.navIcon {
  display: none;
}
.main-sidebar.collapsed .navIcon {
  display: inline-flex;
}
.main-sidebar.collapsed .navTxt {
  display: none;
}
.main-sidebar.collapsed .navItemList li {
  padding: 0.25rem 1rem;
  display: flex;
  justify-content: center;
}
.main-sidebar.collapsed .navItemList li a {
  padding: 2px;
  border: none;
}
.main-sidebar.collapsed .navItemList li.active a {
  background-color: var(--accent-electric-violet);
  color: var(--neutral-base-light);
  border-radius: 4px;
  padding: 4px 16px;
  display: flex;
  justify-content: center;
}
.main-sidebar.collapsed .user-profile {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-left: 0;
}
.errorFld {
  position: relative;
}
.errorFld .form-control {
  border-color: var(--danger-color);
}
.errMsg {
  position: absolute;
  top: 42px;
  color: var(--danger-color);
  font-size: 0.75rem;
  display: flex;
  align-items: center;
}
.errMsg span {
  width: 16px;
  height: 16px;
  border: 1px solid var(--danger-color);
  margin-right: 5px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pageHeader {
  margin-bottom: 1rem;
}
.backOption {
  color: var(--accent-electric-violet);
  text-decoration: none;
}
.tblControl {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}
.controlBtnWrap {
  display: flex;
  gap: 0.5rem;
}
.filterActive {
  padding: 6px;
  background-color: var(--danger-color);
  color: var(--neutral-base-light);
  border-radius: 20px;
  line-height: 1;
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  margin-left: 5px;
}
.dt-column-title {
  color: var(--text-primary-color);
  display: flex;
  justify-content: center;
}
.dt-scroll-head {
  background-color: #fff;
}
.table.table-bordered thead tr th {
  background-color: var(--neutral-base-light) !important;
}
.userOption {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--text-primary-color);
}
.userOption span {
  text-decoration: underline;
}
.userOption:hover span {
  text-decoration: none;
}
.data-table-container {
  margin-bottom: 2rem;
}
.mainFooter {
  text-align: center;
  padding: 30px 0 0;
  margin: auto 0 0;
}
.chatBtn {
  position: fixed;
  bottom: 20px;
  right: 20px;
  border: none;
  padding: 0;
  outline: none;
  cursor: pointer;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: var(--accent-electric-violet);
  color: var(--neutral-base-light);
}
.chatBtn:hover {
  background-color: var(--text-primary-color);
}
.multiSelect .dropdown-menu {
  max-height: 250px;
  width: 100%;
  overflow-y: auto;
  background-color: var(--neutral-base-light);
  padding: 1rem;
}
.multiSelect .dropdown-menu li {
  padding: 0.25rem 0;
}
.multiSelect .dropdown-menu li:not(:first-child) {
  border-bottom: 1px solid var(--border-color);
}
.multiSelect .dropdown-menu li:last-child {
  border: none;
}
.multiSelect .dropdown-menu label {
  display: block;
  padding: 5px 0;
  cursor: pointer;
}
.multiSelect .dropdown-menu input[type="checkbox"] {
  margin-right: 10px;
}
.multiSelect .form-check {
  margin: 0;
}
.search-box {
  padding-bottom: 0.5rem;
}
.search-box input {
  background-color: var(--primary-midnight-indigo);
  width: 100%;
  padding: 5px;
}
.statusMessage {
  background-color: var(--neutral-base-light);
  padding: 5px 40px 5px 10px;
  border-radius: 6px 0 0 6px;
  border-left: 5px solid var(--success-color);
  box-shadow: 0px 4px 10px 0px rgba(0, 0, 0, 0.15);
  position: fixed;
  top: 50px;
  right: 0;
  font-weight: 600;
}
.refreshError {
  border-color: var(--danger-color);
}
.chartBlkWrap {
  display: flex;
}
.leftBlk {
  flex: 0 0 33%;
  padding-right: 2rem;
  border-right: 1px solid var(--border-color);
}
.chartList {
  list-style-type: none;
  margin: 0;
  padding: 0;
}
.chartList li {
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-left: 24px;
  position: relative;
}
.chartList li::before {
  content: "";
  width: 4px;
  height: 4px;
  background-color: var(--text-primary-color);
  border-radius: 50%;
  position: absolute;
  left: 10px;
  top: 12px;
}
.chartBlk {
  flex: 1;
  padding-left: 2rem;
}
.chartBlkWrap .sectionHeading {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.backBlk {
  margin-bottom: 12px;
  font-size: 1.125rem;
  display: inline-block;
  max-width: 75px;
}

.backBlk a {
  text-decoration: none;
  display: flex;
  gap: 8px;
  align-items: center;
  color: var(--accent-electric-violet);
  font-weight: 500;
  width: 100%;
}

.backBlk a span {
  text-decoration: underline;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.backBlk a:hover {
  color: var(--text-primary-color);
}
.backBlk a:hover span {
  text-decoration: none;
}


/*
================================================================
| RESPONSIVENESS & MOBILE TOGGLE
================================================================
*/
.mobile-nav-toggle {
  display: none;
  background: none;
  border: none;
  padding: 0;
  color: var(--accent-electric-violet);
}
.mobile-nav-toggle svg {
  width: 30px;
  height: 30px;
}
@media (max-width: 992px) {
  /* .main-sidebar {
    position: fixed;
    height: 100%;
    left: -250px;
  }
  .main-sidebar.open {
    left: 0;
  } */
  .main-content {
    padding: 1.5rem;
  }
  .mobile-nav-toggle {
    display: block;
  }
  .sidebar-toggle-btn {
    display: none;
  }
  .offcanvas-close-btn {
    display: none;
  }
  .offcanvas-header,
  .offcanvas-body {
    padding-left: 1.5rem;
  }
  #detailsPanel.offcanvas.offcanvas-end {
    width: 100vw;
  }
}

/* ================================================
   SHOW DETAILS – REUSABLE PATTERNS
   ================================================ */

.cta-strip {
  position: static;
  box-shadow: none;
  border-left: 5px solid var(--accent-electric-violet);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 600;
}
.cta-strip .btn {
  margin-left: auto;
}

.cover-art {
  max-width: 120px;
  height: 120px;
  border-radius: 10px;
  display: block;
  margin: 0 auto;
  object-fit: cover;
}

.signal-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.5rem;
  border: 1px solid var(--border-color);
  border-radius: 9999px;
  font-size: 0.875rem;
  background: var(--neutral-base-light);
  color: var(--text-primary-color);
}
.chip--brand {
  border-color: var(--accent-electric-violet);
  color: var(--accent-electric-violet);
}
.chip--success {
  border-color: var(--success-color);
  color: var(--success-color);
}

.score-lg {
  font-size: 3rem;
  line-height: 1.1;
}

.score-md {
  font-size: 2rem !important;
  line-height: 1.1;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}
@media (max-width: 992px) {
  .kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 576px) {
  .kpi-grid {
    grid-template-columns: 1fr;
  }
}

.progress-compact {
  height: 8px;
  background: #eef0f4;
  border: 1px solid var(--border-color);
  border-radius: 999px;
  overflow: hidden;
}
.progress-compact > span {
  display: block;
  height: 100%;
  background: var(--accent-electric-violet);
  width: var(--progress, 0%);
}

.audience-ring {
  --size: 54px;
  width: var(--size);
  height: var(--size);
  aspect-ratio: 1 / 1;
  flex: 0 0 var(--size);
  border-radius: 50%;
  background: conic-gradient(
    var(--accent-electric-violet) 0 var(--slice, 58%),
    var(--success-color) var(--slice, 58%) 100%
  );
  position: relative;
}
.audience-ring::after {
  content: "";
  position: absolute;
  inset: 30%;
  background: var(--neutral-base-light);
  border-radius: 50%;
  border: 1px solid var(--border-color);
}

.brand-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.brand-pill {
  padding: 0.25rem 0.5rem;
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  background: var(--neutral-base-light);
  line-height: 1;
}

.stat-card--dashed {
  border-style: dashed;
}

details summary.sectionHeading {
  cursor: pointer;
  user-select: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.tabs {
  border-top: 1px solid var(--border-color);
  padding-top: 0.5rem;
  margin-top: 0.75rem;
  font-size: 0.875rem;
}
.tabs .tab {
  padding: 6px 8px;
  text-decoration: none;
  color: inherit;
  border-bottom: 2px solid transparent;
  font-weight: 600;
}
.tabs .tab.is-active {
  color: var(--accent-electric-violet);
  border-color: var(--accent-electric-violet);
}
.tabs .tab:not(.is-active) {
  color: var(--text-secondary-color);
}

.is-embed .main-content {
  margin-left: 0 !important;
}

.text-accent {
  color: var(--accent-electric-violet);
}

.confidence {
  font-size: 0.875rem;
  font-weight: 600;
}
.confidence--high {
  color: var(--success-color);
}
.confidence--medium {
  color: var(--warning-color);
}
.confidence--low {
  color: var(--danger-color);
}

.stat-card--accent-left {
  box-shadow: inset 6px 0 0 0 var(--accent-electric-violet);
}

/* details/summary control styled like pills, no default marker */
.meta-collapsible {
  display: flex;
  align-items: center;
  margin-left: 0;
}

.meta-collapsible > summary {
  cursor: pointer;
  list-style: none;
  display: flex; /* make summary a flex row */
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap; /* allow wrapping as needed */
  width: 100%;
}
.meta-collapsible > summary::-webkit-details-marker {
  display: none;
}

/* Extras hidden by default; appear inline when open */
.meta-extra {
  display: none;
}
.meta-collapsible[open] .meta-extra {
  display: inline-flex;
}

/* Toggle pills: "+N more" by default, "Show less" when open */
.meta-more {
  display: inline-flex;
}
.meta-less {
  display: none;
}
.meta-collapsible[open] .meta-more {
  display: none;
}
.meta-collapsible[open] .meta-less {
  display: inline-flex;
}

/* Push the toggle pill to the far right and keep it last across lines */
.meta-toggle {
  order: 999; /* ensure last among summary items */
  margin-left: auto; /* push to the end of its flex line */
  white-space: nowrap; /* keep pill intact */
}

/* Optional: dashed/ghost look for the toggle pill */
.chip--ghost {
  background: transparent;
  border-style: dashed;
  color: var(--text-secondary-color);
}

/* Details styled like a stat card with accent */
.details-card.stat-card {
  padding: 1rem 1.25rem;
} /* match your stat-card spacing */

/* Summary row */
.details-summary {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  margin: 0; /* avoid default summary margins */
}
.details-summary::-webkit-details-marker {
  display: none;
}

/* Chevron indicator on the right */
.details-summary::after {
  content: "";
  margin-left: auto; /* push to far right */
  width: 10px;
  height: 10px;
  border-right: 2px solid var(--text-primary-color);
  border-bottom: 2px solid var(--text-primary-color);
  transform: rotate(45deg);
  transition: transform 0.2s ease;
}
.details-card[open] .details-summary::after {
  transform: rotate(-135deg); /* flip when open */
}

/* Body spacing inside the details card */
.details-body {
  margin-top: 0.75rem;
}

/* Small score utility to replace inline font-size */
.score-md {
  font-size: 1.25rem;
}

/* Match card spacing between stacked details blocks */
.details-card {
  padding: 1rem 1.25rem;
} /* already used to align padding */
.details-card + .details-card {
  margin-top: 1rem;
} /* same as g-3 vertical gap */

/* Make the inside spacing consistent with other cards */
.details-body {
  margin-top: 1rem;
} /* was .75rem; align with card spacing */

/* Make the details offcanvas the intended width using the Bootstrap var */
#detailsPanel {
  --bs-offcanvas-width: 1150px;
}
@media (max-width: 992px) {
  #detailsPanel {
    --bs-offcanvas-width: 100vw;
  }
}

/* Neutralize the page shell when it's rendered inside the offcanvas */
#detailsPanel .main-content {
  margin-left: 0 !important; /* remove the sidebar offset */
  padding: 1rem 1.25rem; /* smaller padding feels better in panel */
  min-height: auto; /* avoid full-page min-height */
}

/* Optional: ignore the outer app wrapper’s flex layout inside the panel */
#detailsPanel .app-wrapper {
  display: contents;
}

/* Tame the panel’s internal padding just for the details panel (optional) */
#detailsPanel .offcanvas-body {
  padding: 1rem 1.25rem;
}

/* Two-line clamp without overlap + buffer line when collapsed */
.desc-clamp {
  position: relative;
  margin-top: 0.5rem; /* buffer above the rule */
}

/* Top border appears only when collapsed */
.desc-clamp:not([open]) {
  padding-top: 0.5rem; /* space below the rule */
}
.desc-clamp[open] {
  border-top: none;
  padding-top: 0;
}

/* Make summary a vertical stack: preview text, then the toggle line */
.desc-clamp > summary {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  list-style: none;
  cursor: pointer;
  margin: 0 0 0.5rem 0; /* space above the full text when open */
}
.desc-clamp > summary::-webkit-details-marker {
  display: none;
}

/* Clamped preview (visible when closed) */
.desc-preview {
  margin: 0;
  text-align: center;
  display: -webkit-box;
  -webkit-line-clamp: 2; /* number of lines to show */
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: anywhere; /* prevent long URLs from spilling */
}

/* Toggle line on its own row, right-aligned */
.desc-toggle {
  align-self: center;
  font-weight: 600;
  color: var(--accent-electric-violet);
  line-height: 1;
  margin: 16px 0;
}

/* Swap label text with CSS only */
.desc-clamp:not([open]) .desc-toggle::before {
  content: "...more";
}
.desc-clamp[open] .desc-toggle::before {
  content: "Show less";
}

/* Full text (only when open) */
.desc-full {
  display: none;
  margin: 0;
  text-align: center;
}
.desc-clamp[open] .desc-preview {
  display: none;
}
.desc-clamp[open] .desc-full {
  display: block;
}
.navigation-arrow,
.active > .page-link,
.page-link.active {
  background-color: var(--accent-electric-violet);
  border-color: var(--accent-electric-violet);
  color: var(--neutral-base-light);
}
.page-link {
  color: var(--accent-electric-violet);
}
.page-link:hover {
  color: var(--text-primary-color);
}
.page-link:focus {
  box-shadow: 0 0 0 0.25rem rgba(108, 79, 246, 0.3);
}
.active > .page-link:hover,
.page-link.active:hover {
  background-color: var(--text-primary-color);
  border-color: var(--text-primary-color);
  color: var(--neutral-base-light);
}
div.dataTables_wrapper div.dataTables_paginate {
  margin-top: 10px;
}
div.dataTables_scrollBody {
  border-left: 0 !important;
}
.pageHeading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}
.pageHeading h2 {
  font-size: 2rem;
  font-weight: 500;
  margin: 0 10px 0 0;
  text-align: center;
}
.pageHeading h2:last-child {
  margin: 0;
}
.smallContainer {
  max-width: 700px;
  min-width: 500px;
  margin: auto;
}
.smallContainer .pageHeading {
  justify-content: center;
}
.invoiceContainer {
  display: flex;
  gap: 30px;
}
.img-quadrant {
  position: relative;
  flex: 1;
  border: 1px solid #555;
  background: #555;
  height: 600px;
  overflow: auto;
  cursor: grab;
  user-select: none;
  overscroll-behavior: contain;
}
.img-quadrant.grabbing {
  cursor: grabbing;
}
.img-quadrant #invoiceContainer,
.img-quadrant object,
.img-quadrant iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}
.form-quadrant {
  flex: 0 0 33%;
}
.navigation-arrow {
  position: absolute;
  top: 0.5rem;
  padding: 12px 16px 16px;
  border-radius: 0.25rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  line-height: 1;
  z-index: 10;
}
.arrow-prev {
  left: 0.5rem;
}
.arrow-next {
  right: 0.5rem;
}
#mediaMonth {
  background-color: #fff !important;
  color: #000 !important;
}
/* center & full width Save button */
#saveBtn,
#rejectBtn {
  display: block;
  margin: 1rem 0;
  width: 100%;
}
.tableWrapper {
  height: calc(100vh - 240px);
  overflow: auto;
}
.haveTopControls .tableWrapper {
  height: calc(100vh - 300px);
}
.topControls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  gap: 16px;
}
.pageHeading .topControls {
  margin-left: auto;
}
.btnGroup,
.inputGroup {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.file-input {
  display: none;
}
.homeContWrap {
  display: flex;
  gap: 30px;
  align-items: flex-start;
}
.recentNewsBlk {
  flex: 0 0 33%;
}
.post-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
  list-style-type: none;
}
.post-grid li .post-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  border: 1px solid var(--bs-border-color);
  border-radius: 0.75rem;
  background: var(--bs-body-bg);
  text-decoration: none;
  color: inherit;
  box-shadow: var(--bs-box-shadow-sm);
  transition: border-color 0.15s ease, box-shadow 0.15s ease,
    transform 0.06s ease;
}
.post-grid li .post-card:hover {
  border-color: var(--accent-electric-violet, #7f00ff);
  box-shadow: var(--bs-box-shadow);
  transform: translateY(-1px);
}
.post-thumb {
  width: 100px;
  height: 100px;
  flex: 0 0 100px;
  object-fit: cover;
  border-radius: 0.5rem;
}
.post-title {
  font-weight: 600;
  line-height: 1.2;
  margin: 0 0 0.25rem;
}
.post-date {
  font-size: 0.825rem;
  color: var(--bs-secondary-color);
  margin-bottom: 0.25rem;
}

/* iFrame card */
.embed-card {
  flex: 1;
  border: 1px solid var(--bs-border-color);
  border-radius: 0.75rem;
  background: var(--bs-body-bg);
  box-shadow: var(--bs-box-shadow-sm);
  padding: 0.5rem;
  height: auto;
}
.embed-card iframe {
  width: 100%;
  height: 450px;
  border: 0;
  border-radius: 0.5rem;
  display: block;
}
.menuCard {
  display: flex;
  list-style-type: none;
  flex-wrap: wrap;
  gap: 20px;
  padding: 0;
  margin: 0;
}
.menuCard li {
  flex: 0 0 calc(33.33% - 14px);
  display: flex;
  flex-direction: column;
}
.menuCard li i {
  font-size: 3rem;
}
.menuCard li > a > svg {
  width: 40px;
  height: 40px;
  margin: 0 auto;
}
.menuCard > li > a {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
  gap: 8px;
  padding: 16px;
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  text-decoration: none;
  color: var(--text-primary-color);
  background-color: var(--neutral-base-light);
  box-shadow: 0 0 10px 0 rgba(51, 53, 64, 0.1);
  transition: border-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
  font-size: 1.25rem;
}
.menuCard > li > a:hover {
  border-color: var(--accent-electric-violet) !important;
  border-radius: 0.5rem;
  color: var(--accent-electric-violet);
  box-shadow: 0 4px 12px rgba(108, 79, 246, 0.2);
}
.noteTxt {
  padding-top: 10px;
  text-align: center;
}
.offcanvas .form-check .form-check-input,
.offcanvas .form-switch .form-check-input {
  margin-left: 0;
}
.sm-options {
  padding: 20px;
  background-color: var(--body-bg-color);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}
.sm-option {
  display: flex;
  gap: 5px;
  align-items: center;
}
.checkboxGroupWrap {
  display: flex;
  flex-wrap: wrap;
  list-style-type: none;
  padding: 0;
  margin: 0 0 10px;
  column-gap: 32px;
  row-gap: 16px;
}
.checkboxGroupWrap li {
  display: flex;
  gap: 8px;
  align-content: center;
}
.viewPic {
  width: 140px;
  height: 140px;
  object-fit: cover;
  border-radius: 6px;
  display: block;
  margin: 0 auto 10px;
}
.codeBlk {
  background-color: var(--body-bg-color);
  color: var(--text-primary-color);
  padding: 1rem;
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  max-height: 300px;
  overflow: auto;
  margin-top: 5px;
}
.accordionList {
  list-style-type: none;
  padding: 0;
  margin: 0;
}
.accordionList li:not(:last-child) {
  margin-bottom: 16px;
}
.accTitle {
  font-weight: 600;
  font-size: 1.25rem;
  cursor: pointer;
}

/* Justin Adds */

/* Results table: cap Show Name column at 350px */
#resultsTable th.show-name-col,
#resultsTable td.show-name-col {
  max-width: 350px !important;
  width: 350px !important;
}

/* Sponsors column chips: 1 line, ellipsis, max 100px */
#resultsTable td:nth-child(9) .chip {
  display: inline-block;       /* override inline-flex so ellipsis works */
  max-width: 100px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: middle;
  cursor: help;                /* visual cue there's more text */
}

/* --- Show Name (col 2): cap width, allow nice wrap/clamp --- */
#resultsTable th.show-name-col,
#resultsTable td.show-name-col {
  max-width: 350px;                 /* cap, but don't force */
}

#resultsTable td.show-name-col .userOption {  /* keep layout tidy */
  align-items: flex-start;
}

#resultsTable td.show-name-col .fw-semibold.text-truncate {
  /* two-line clamp for the show title */
  white-space: normal !important;    /* override Bootstrap truncate */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: anywhere;           /* long tokens won’t stretch column */
}

#resultsTable td.show-name-col .text-muted.small.text-truncate {
  /* keep the “Podcast/YouTube” line single-line with ellipsis */
  white-space: nowrap !important;
}

/* --- Sponsors (col 8): chips trim to 100px with ellipsis --- */
#resultsTable td:nth-child(9) .chip {
  display: inline-block;             /* needed for ellipsis */
  max-width: 100px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: middle;
  cursor: help;                      /* hint there’s a tooltip */
}

/* ---------- Show name (col 2): cap width + 2-line clamp ---------- */
#resultsTable th.show-name-col,
#resultsTable td.show-name-col { max-width: 350px; }

#resultsTable td.show-name-col .fw-semibold.text-truncate {
  white-space: normal !important;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: anywhere;
}

/* ---------- Sponsors (col 9): tidy chips with ellipsis ---------- */
#resultsTable td:nth-child(9) .chip {
  display: inline-block;
  max-width: 100px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: help; /* tooltip hint */
}

/* ---------- Description (col 4): keep it from getting skinny ---------- */
/* Target the inner <div> so it wins even when DT injects widths on <th> */
#resultsTable td:nth-child(4) > div {
  display: block;
  min-width: 260px;     /* tweak to taste (240–320px are common) */
  max-width: 560px;     /* optional cap; remove if you want unlimited */
  white-space: normal;  /* allow wrapping */
  text-align: left;     /* nicer than centered paragraphs */
  overflow-wrap: anywhere;
}

/* Brand Safety chip colors */
.chip.bs-minimal { background:#adb5bd; color:#fff; }  /* grey */
.chip.bs-low     { background:#198754; color:#fff; }  /* green */
.chip.bs-medium  { background:#ffc107; color:#212529; } /* yellow */
.chip.bs-high    { background:#dc3545; color:#fff; }  /* red */

.bg-primary,
.text-bg-primary {
  background-color: var(--accent-electric-violet) !important;
  color: #fff !important;
}

.color-cell { display: flex; align-items: center; gap: 10px; }
.color-swatch {
  width: 30px; height: 30px;
  border-radius: 8px;           /* rounded edges */
  border: 1px solid var(--border-color);
  box-shadow: 0 0 4px rgba(0,0,0,0.06);
  flex: 0 0 30px;
}
.color-code { font-variant-numeric: tabular-nums; }

/* ============================================================
   PLAN SECTIONS / ADVERTISER PLAN VIEW
   Matches app chrome (cards, DataTables wrapper, sidebar, etc.)
   ============================================================ */

/* Outer accordion card */
.planSection {
  background-color: var(--primary-midnight-indigo);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  box-shadow: 0 0 10px 0 rgba(51, 53, 64, 0.1);
  margin-bottom: 1rem;
  overflow: hidden; /* keep header corners clean */
}

/* Clickable header row */
.planSection-header {
  display: flex;
  align-items: center;
  width: 100%;
  background-color: var(--primary-midnight-indigo);
  color: var(--accent-electric-violet);
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.25rem;
  padding: 0.75rem 1rem;
  border: 0;
  text-align: left;
  cursor: pointer;
  gap: 0.5rem;
}

/* Remove default Bootstrap .btn look when we use <button class="btn planSection-header"> */
.planSection-header.btn {
  background: none;
  border: none;
  box-shadow: none;
  text-decoration: none;
  color: var(--accent-electric-violet);
  justify-content: flex-start;
  border-radius: 0; /* outer .planSection already rounded */
  padding: 0.75rem 1rem;
}
.planSection-header.btn:focus,
.planSection-header.btn:hover {
  color: var(--text-primary-color);
  box-shadow: none;
  text-decoration: none;
}

/* Text block on the left side of the header */
.planSection-title {
  flex: 1 1 auto;
}

/* Chevron on the right side of the header */
.planSection-chevron {
  width: 10px;
  height: 10px;
  border-right: 2px solid var(--text-primary-color);
  border-bottom: 2px solid var(--text-primary-color);
  transform: rotate(45deg);
  transition: transform 0.2s ease;
}
.planSection-header[aria-expanded="true"] .planSection-chevron {
  transform: rotate(-135deg);
}

/* Body region (collapsible content area) */
.planSection-body {
  border-top: 1px solid var(--border-color);
  padding: 1rem;
  background-color: var(--primary-midnight-indigo);
}

/*
 Tweak DataTables chrome inside a planSection so we don't get
 double borders / double shadows (outer card already has them).
*/
.planSection-body .dataTables_wrapper {
  background-color: var(--primary-midnight-indigo);
  border: 0;
  box-shadow: none;
  padding: 0;
  border-radius: 0;
}

/* ============================================================
   ACTION BUTTON VARIANTS (Approve / Decline / Violet CTA)
   These extend our button system with square icon buttons etc.
   ============================================================ */

/* Approve: green square button */
.btn-approve-square.btn {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;

  --bs-btn-color: #fff;
  --bs-btn-bg: #28a745;
  --bs-btn-border-color: #28a745;

  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: #218838;
  --bs-btn-hover-border-color: #1e7e34;

  --bs-btn-active-color: #fff;
  --bs-btn-active-bg: #1e7e34;
  --bs-btn-active-border-color: #1c7430;

  --bs-btn-disabled-color: #fff;
  --bs-btn-disabled-bg: #28a745;
  --bs-btn-disabled-border-color: #28a745;

  --bs-btn-focus-shadow-rgb: 40,167,69;
}

/* Decline: red square button */
.btn-decline-square.btn {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;

  --bs-btn-color: #fff;
  --bs-btn-bg: #dc3545;
  --bs-btn-border-color: #dc3545;

  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: #c82333;
  --bs-btn-hover-border-color: #bd2130;

  --bs-btn-active-color: #fff;
  --bs-btn-active-bg: #bd2130;
  --bs-btn-active-border-color: #b21f2d;

  --bs-btn-disabled-color: #fff;
  --bs-btn-disabled-bg: #dc3545;
  --bs-btn-disabled-border-color: #dc3545;

  --bs-btn-focus-shadow-rgb: 220,53,69;
}

.btn-approve-square i,
.btn-decline-square i {
  font-size: 22px;
  line-height: 1;
}

/* Violet call-to-action button used in comment modal, etc. */
.btn-violet.btn {
  --bs-btn-color: #fff;
  --bs-btn-bg: var(--accent-electric-violet);
  --bs-btn-border-color: var(--accent-electric-violet);

  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: var(--text-primary-color);
  --bs-btn-hover-border-color: var(--text-primary-color);

  --bs-btn-active-color: #fff;
  --bs-btn-active-bg: var(--text-primary-color);
  --bs-btn-active-border-color: var(--text-primary-color);

  --bs-btn-focus-shadow-rgb: 108,79,246;
}

/* Tighten the full-width 'Comment' button in the action column */
.planSection table .btn.w-100 {
  font-weight: 600;
  font-size: 0.8rem;
  line-height: 1.2;
  border-radius: 8px;
}

/* ============================================================
   PLAN EDITOR PAGE
   Handsontable chrome + Column Config offcanvas
   ============================================================ */

/* Make Handsontable fill the card nicely */
#hot {
  min-height: 400px;
}

/* Handsontable base look:
   - respect your border color
   - headers look like our table headers (light bg)
   - cells look like card bg
*/
.handsontable .wtHider table {
  border-color: var(--border-color);
}

.handsontable th,
.handsontable td {
  border-color: var(--border-color) !important;
  color: var(--text-primary-color);
  font-size: 0.9rem;
}

.handsontable th {
  background-color: var(--neutral-base-light);
  font-weight: 500;
  white-space: nowrap;
}

.handsontable td {
  background-color: var(--primary-midnight-indigo);
}

/* selection / highlight colors tuned to violet */
.handsontable .currentRow,
.handsontable .currentCol {
  background-color: rgba(108, 79, 246, 0.08) !important;
}
.handsontable .ht__highlight,
.handsontable td.area {
  background-color: rgba(108, 79, 246, 0.16) !important;
}
.handsontable .wtBorder.current {
  border-color: var(--accent-electric-violet) !important;
}

/* ------------------------------------------------------------
   Column Config Offcanvas UI
   - draggable list item styling
   - footer buttons, etc.
   ------------------------------------------------------------ */

.colEditorList {
  list-style-type: none;
  margin: 0;
  padding: 0;
}
.colEditorList li {
  background-color: var(--neutral-base-light);
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  padding: 0.5rem 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
  cursor: grab;
  box-shadow: 0 0 10px 0 rgba(51, 53, 64, 0.05);
}
.colEditorList li.dragging {
  opacity: 0.6;
}
.dragHandle {
  flex: 0 0 auto;
  color: var(--accent-electric-violet);
  font-weight: 600;
  font-size: 1rem;
  cursor: grab;
  line-height: 1;
  user-select: none;
}
.colLabelWrap {
  flex: 1 1 auto;
  min-width: 0;
}
.colLabelWrap .mainLabel {
  font-weight: 600;
  color: var(--text-primary-color);
  line-height: 1.2;
  font-size: 0.9rem;
  word-break: break-word;
}
.colLabelWrap .subLabel {
  font-size: 0.75rem;
  color: var(--text-secondary-color);
  line-height: 1.2;
  word-break: break-word;
}
.colVisibleToggle {
  flex: 0 0 auto;
}

/* offcanvas footer bar is already styled globally as .offcanvas-footer-custom,
   just ensuring buttons have some minimum tap target */
.offcanvas-footer-custom .btn {
  justify-content: center; 
  text-align: center;     
}
/* ============================================================
   Column Config Cards (Plan Editor offcanvas)
   ============================================================ */

.colEditorList {
  list-style-type: none;
  margin: 0;
  padding: 0;
}

/* Card shell for each column */
.colEditorItem {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;

  /* tighter vertical rhythm like your mock */
  padding: 0.75rem 0.75rem 0.75rem 0.75rem;
  margin-bottom: 0.75rem;

  background-color: var(--neutral-base-light);
  border: 1px solid var(--border-color);
  border-radius: 0.75rem;
  box-shadow: 0 0 10px 0 rgba(51, 53, 64, 0.08);

  cursor: grab;
  overflow: hidden; /* so the violet accent can sit underneath with rounded corners */
}

/* Violet accent strip on the left:
   - full card height
   - inherits the same rounded corners so it looks “poured into” the card
*/
.colEditorItem::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;

  width: 6px; /* a little thicker, like your pacing card */
  background-color: var(--accent-electric-violet);

  border-top-left-radius: 0.75rem;
  border-bottom-left-radius: 0.75rem;
}

/* Active/visible state:
   - NO glow ring
   - just promote the border color to violet
*/
.colEditorItem.is-active {
  border-color: var(--accent-electric-violet);
  box-shadow: 0 0 10px 0 rgba(51, 53, 64, 0.08); /* same subtle shadow, no halo */
}

/* When dragging:
   - slight opacity
   - subtle lift shadow (not neon)
*/
.colEditorItem.dragging {
  opacity: 0.6;
  cursor: grabbing;
  box-shadow: 0 8px 16px rgba(0,0,0,0.2);
}

/* Drag handle (⋮⋮) */
.dragHandle {
  flex: 0 0 auto;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1;
  color: var(--accent-electric-violet);
  cursor: inherit;
  user-select: none;
  display: flex;
  align-items: center;
  padding-top: 0.1rem;
}

/* Column label stack */
.colLabelWrap {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.colLabelWrap .mainLabel {
  font-weight: 600;
  color: var(--text-primary-color);
  line-height: 1.25;
  font-size: 0.95rem;
  word-break: break-word;
}
.colLabelWrap .subLabel {
  font-size: 0.8rem;
  color: var(--text-secondary-color);
  line-height: 1.2;
  word-break: break-word;
  display: flex;
  flex-wrap: wrap;
  column-gap: .5rem;
}

/* Toggle on the far right */
.colVisibleToggle {
  flex: 0 0 auto;
  display: flex;
  align-items: flex-start;
  margin-left: auto;
}
.colVisibleToggle .form-check {
  margin: 0;
  padding: 0;
}
.colVisibleToggle .form-check-input {
  transform: scale(.9);
  transform-origin: top right;
}

/* Drag handle (⋮⋮) now becomes just a vertical dots icon area on the far left */
.dragHandle {
  flex: 0 0 auto;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1;
  color: var(--accent-electric-violet);
  cursor: inherit; /* grabs with parent */
  user-select: none;
  display: flex;
  align-items: center;
  padding-top: 0.1rem;
}

/* Column label stack */
.colLabelWrap {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  /* match card body typography vibe */
}
.colLabelWrap .mainLabel {
  font-weight: 600;
  color: var(--text-primary-color);
  line-height: 1.25;
  font-size: 0.95rem;
  word-break: break-word;
}
.colLabelWrap .subLabel {
  font-size: 0.8rem;
  color: var(--text-secondary-color);
  line-height: 1.2;
  word-break: break-word;
  display: flex;
  flex-wrap: wrap;
  column-gap: .5rem;
}

/* Toggle on the far right */
.colVisibleToggle {
  flex: 0 0 auto;
  display: flex;
  align-items: flex-start;
  margin-left: auto;
}

/* Make the form-switch align nicely without extra margin */
.colVisibleToggle .form-check {
  margin: 0;
  padding: 0;
}

/* Shrink the BS switch just a touch so it doesn’t dominate */
.colVisibleToggle .form-check-input {
  transform: scale(.9);
  transform-origin: top right;
}

.plan-action-col .btn {
  border-radius: .4rem;
  line-height: 1;
  font-size: .8rem;
}
.plan-action-col .btn .bi {
  font-size: 1rem;
  line-height: 1;
}

/* narrow control column */
.plan-action-col {
  width: 56px;
  min-width: 56px;
  text-align: center;
  vertical-align: middle;
}

/* wraps the whole control stack */
.status-widget {
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* the little card that groups all status moves */
.status-card {
  background-color: #fff;
  border: 1px solid rgba(0,0,0,.1);
  border-radius: .5rem;
  padding: .5rem;
  min-width: 48px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.btn-status-wide {
  line-height: 1.1;
  font-size: .7rem;
  padding: 0 .4rem;
  min-height: 2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-width: 1px;
  border-radius: .4rem;
  width: 100%;
  white-space: nowrap;
}

.btn-status-square {
  line-height: 1.1;
  font-size: .7rem;
  padding: 0 .4rem;
  min-height: 2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-width: 1px;
  border-radius: .4rem;
  width: 100%;
  white-space: nowrap;
}

.btn-status-square i,
.btn-status-wide i {
  font-size: .9rem;
  line-height: 1;
}


/* delete button under the card */
.btn-delete {
  width: 2rem;
  height: 2rem;
  padding: 0;
  border-radius: .5rem;
  line-height: 1;
}

/* highlight the CURRENT status for this row */
.btn-status-current {
  box-shadow: 0 0 0 2px rgba(99,102,241,.4); /* subtle indigo glow */
  font-weight: 600;
}

/* optional: tighten the gap between icon and label text */
.status-label {
  font-size: .7rem;
  line-height: 1.1;
}

.status-card .bottom-row .btn-status-square {
  min-width: 2rem;
  padding-left: .4rem;
  padding-right: .4rem;
}

.status-card .bottom-row i {
  margin-right: 0; /* no extra gap next to just-the-icon buttons */
  font-size: 1rem;
  line-height: 1;
}

.wideContainer {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto 2rem;
}

.wideContainer .blockContent {
  overflow-x: auto;
}

/* Scrollable preview for Vendor Meta column in Import Preview */
.vendorMetaCell {
  max-height: 5.5em;          /* ~4 lines at 0.9rem-ish line-height */
  overflow-y: auto;
  overflow-x: hidden;
  line-height: 1.3;
  font-size: 0.9rem;
  white-space: normal;        /* allow wrapping */
  word-break: break-word;     /* break long tokens */
  scrollbar-width: thin;      /* Firefox */
}

/* optional: thinner scrollbar in webkit, matches rest of app vibe */
.vendorMetaCell::-webkit-scrollbar {
  width: 4px;
}
.vendorMetaCell::-webkit-scrollbar-track {
  background: var(--text-secondary-color);
  border-radius: 6px;
}
.vendorMetaCell::-webkit-scrollbar-thumb {
  background: var(--text-primary-color);
  border-radius: 6px;
}
.vendorMetaCell::-webkit-scrollbar-thumb:hover {
  background: var(--accent-electric-violet);
}

  #vendor_suggest .list-group-item { cursor:pointer; }
  #vendor_suggest .list-group-item.active { background:#6C4FF6; color:#fff; }
  

/* ============================
   TOP-RIGHT USER CLUSTER
   ============================ */
.topbar-user-cluster {
  position: fixed;
  top: 20px;                     /* aligns visually with sidebar offsets */
  right: 32px;                   /* mirrors .main-sidebar left:32px */
  z-index: 1060;                 /* above cards/sidebar */
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Generic square icon button (envelope) */
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background-color: var(--primary-midnight-indigo);
  border: 1px solid var(--border-color);
  box-shadow: 0 0 10px 0 rgba(51, 53, 64, 0.1);
  cursor: pointer;
  text-decoration: none;
  color: var(--text-primary-color);
  transition: border-color 0.2s ease, transform 0.06s ease, box-shadow 0.2s ease;
}
.icon-btn:hover {
  border-color: var(--accent-electric-violet);
  transform: translateY(-1px);
}

/* Avatar link */
.user-avatar-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-primary-color);
}
/* Avatar container */
.user-avatar {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;                
  background: var(--neutral-base-light);
  box-shadow: 0 0 10px 0 rgba(51, 53, 64, 0.08);
  border: 0;                    
}

.user-avatar img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  border-radius: 50%;
}

.user-avatar::after {
  content: "";
  position: absolute;
  inset: 0;                        
  border: 2px solid var(--accent-electric-violet);
  border-radius: 50%;
  pointer-events: none;          
  box-sizing: border-box;       
}

.user-display-name {
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 992px) {
  .user-display-name { display: none; }
}

/* Circle variant */
.icon-btn--round {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  padding: 0;
}

/* Electric Violet background + white icon */
.icon-btn--violet {
  background-color: var(--accent-electric-violet);
  color: #fff;                          /* makes the SVG (currentColor) white */
  border: 2px solid var(--accent-electric-violet);
  box-shadow: 0 0 10px rgba(108, 79, 246, 0.25);
}

.icon-btn--violet:hover,
.icon-btn--violet:focus-visible {
  filter: brightness(1.04);
  box-shadow: 0 0 14px rgba(108, 79, 246, 0.35);
  outline: none;
}
/* Circle variant */
.icon-btn--round {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  padding: 0;
}

/* Electric Violet background + white icon */
.icon-btn--violet {
  background-color: var(--accent-electric-violet);
  color: #fff;                          /* makes the SVG (currentColor) white */
  border: 2px solid var(--accent-electric-violet);
  box-shadow: 0 0 10px rgba(108, 79, 246, 0.25);
}

.icon-btn--violet:hover,
.icon-btn--violet:focus-visible {
  filter: brightness(1.04);
  box-shadow: 0 0 14px rgba(108, 79, 246, 0.35);
  outline: none;
}

/* Horizontal button-tabs inside the inbox offcanvas */
#inboxPanel .inbox-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
}
#inboxPanel .inbox-tabs .tab-btn {
  flex: 1 1 0;
  border-radius: 12px;
  height: 44px;
}

/* Simple pane switcher */
#inboxPanel .inbox-tab-pane { display: none; }
#inboxPanel .inbox-tab-pane.active { display: block; }

/* --- Topbar avatar card (match sidebar chrome) --- */
.topbar-user-cluster{
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 6px 10px;
  background-color: var(--primary-midnight-indigo);
  border: 1px solid var(--border-color);
  border-radius: 20px;                 /* matches sidebar */
  box-shadow: 0 0 10px 0 rgba(51,53,64,0.10);  /* matches sidebar */
}

/* keep the internals exactly as-is, just tidy spacing/consistency */
.topbar-user-cluster .user-display-name{
  font-weight: 600;
  white-space: nowrap;
}

.topbar-user-cluster .icon-btn{
  line-height: 1;
}

.topbar-user-cluster .user-avatar{
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
  border: 1px solid var(--border-color); /* same hairline as sidebar avatars */
  display: inline-flex;
}
.topbar-user-cluster .user-avatar img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

:root { --topbar-offset: 15px; }  /* tweak to taste */

.main-content {
  /* keep your existing padding, but lift the top start by ~40px */
  padding-top: calc(2rem + var(--topbar-offset));
}

.app-card--audiolytics .app-card-link--audiolytics {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;          
}

.app-card--audiolytics .app-card-logo-fill {
  display: block;
  width: 100%;                
  height: auto;             
  max-height: 110px;        
  object-fit: contain;       
}

/* Audiolytics score ring – separate from show tab ring */
.audiolytics-ring {
  --audiolytics-ring-size: 176px;
  --audiolytics-ring-thickness: 16px;
  --audiolytics-ring-primary: var(--color-electric-violet, #7F63FF);
  --audiolytics-ring-track: #ECECF4;

  position: relative;
  width: var(--audiolytics-ring-size);
  height: var(--audiolytics-ring-size);
  border-radius: 50%;
  background: conic-gradient(
    var(--audiolytics-ring-primary) 0deg calc(var(--slice, 0) * 3.6deg),
    var(--audiolytics-ring-track) 0deg
  );
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Hollow center */
.audiolytics-ring::before {
  content: "";
  position: absolute;
  inset: var(--audiolytics-ring-thickness);
  border-radius: 50%;
  background: #ffffff;
}

/* Keep text on top of the ring */
.audiolytics-ring > .score-lg,
.audiolytics-ring > .small {
  position: relative;
}

/* 3C tiles – consistent size & centered content */
.audiolytics-3c-card {
  min-width: 96px;
  min-height: 72px;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.audiolytics-ring .ring-text {
  position: relative;
  z-index: 2;
  line-height: 1.1;
  text-align: center;
}
 
