/**
 * WooCommerce Academy — feedback charts + table shortcodes
 * Ported from polished homepage reference (no section titles).
 */

.wc-academy-feedback-charts,
.wc-academy-feedback-table,
.wc-academy-feedback-charts *,
.wc-academy-feedback-table * {
  box-sizing: border-box;
}

.wc-academy-feedback-charts,
.wc-academy-feedback-table {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  color: var(--wwise-text, #484b50);
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.7;
}

.wc-academy-feedback-table {
  max-width: none !important;
  width: 100% !important;
}

.wc-academy-feedback-table .ninja_table_wrapper,
.wc-academy-feedback-table .feedback-table-shell {
  width: 100% !important;
  max-width: none !important;
}

.wc-academy-feedback-charts {
  padding: 0;
}

.wc-academy-feedback-table {
  padding: 0;
}

.wc-academy-feedback-notice {
  margin: 0;
  padding: 0.85rem 1rem;
  border: 1px solid #d4d4d5;
  border-radius: 0.28571429rem;
  background: #f9fafb;
  color: #484b50;
}

/**
 * WWISE ISO e-Learning — Brags & Nags + Virtual Enrollees Feedback
 * Polished recreation matching https://wwise-iso-e-learning.com/
 */

.wc-academy-feedback-charts,
.wc-academy-feedback-table {
  --wwise-blue: #283c92;
  --wwise-blue-mid: #326ca9;
  --wwise-text: #484b50;
  --wwise-green: #29c218;
  --wwise-red: #e11313;
  --wwise-bar-magnificent: #1f8843;
  --wwise-bar-splendid: #57b849;
  --wwise-bar-neutral: #c2c1c0;
  --wwise-bar-poor: #db0000;
  --wwise-ring-bar: #283c92;
  --wwise-ring-track: #f68b22;
  --wwise-icon: #ffc107;
  --wwise-table-border: #d4d4d5;
  --wwise-table-header-bg: #f9fafb;
  --wwise-table-stripe: #fafafa;
  --wwise-search-btn: #2185d0;
  --font-body: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  --font-heading: "Source Sans Pro", Helvetica, Arial, Lucida, sans-serif;
}

/* Charts / table shortcodes */


.bandn-dashboard {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.25rem 1.5rem;
  align-items: start;
}

.bandn-col {
  min-width: 0;
}

.bandn-col--bars {
  padding-top: 0.35rem;
}

.ring-caption,
.wc-academy-feedback-charts .ring-caption,
.bandn-col--bars .ring-caption {
  margin: 0.35rem 0 0 !important;
  color: var(--wwise-text, #484b50) !important;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif !important;
  font-size: 15px !important;
  font-weight: 500 !important;
  line-height: 1.4 !important;
  letter-spacing: normal !important;
  text-transform: none !important;
  text-align: center !important;
}

/* Expectations bars — synced with feedback "Met needs & expectations" */

.expectations-bars {
  display: grid;
  gap: 0.5rem;
}

.expectation-bar {
  display: grid;
  grid-template-columns: 7rem minmax(0, 1fr) 2.5rem;
  align-items: center;
  gap: 0.65rem;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  text-align: left;
  font: inherit;
}

.expectation-bar:focus-visible {
  outline: 2px solid var(--wwise-blue-mid);
  outline-offset: 3px;
  border-radius: 8px;
}

.expectation-bar__label {
  color: #31407a;
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.2;
  text-align: right;
  letter-spacing: 0.01em;
}

.expectation-bar__track {
  position: relative;
  display: block;
  width: 100%;
  height: 22px;
  border-radius: 999px;
  background: rgb(40 60 146 / 6%);
}

.expectation-bar__fill {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  height: 14px;
  min-width: 14px;
  max-width: 100%;
  border-radius: 999px;
  transition: width 0.35s ease;
}

.expectation-bar__value {
  color: #31407a;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.expectation-bar--excellent .expectation-bar__fill { background: var(--wwise-bar-magnificent); }
.expectation-bar--very-good .expectation-bar__fill { background: var(--wwise-bar-splendid); }
.expectation-bar--good .expectation-bar__fill { background: #326ca9; }
.expectation-bar--satisfactory .expectation-bar__fill { background: #b0b5ba; }
.expectation-bar--poor .expectation-bar__fill { background: var(--wwise-bar-poor); }

.expectation-bar:hover .expectation-bar__track {
  background: rgb(40 60 146 / 10%);
}

.expectation-bar.is-active .expectation-bar__label {
  color: var(--wwise-blue);
}

.expectation-bar.is-active .expectation-bar__track {
  box-shadow: inset 0 0 0 1.5px rgb(40 60 146 / 35%);
  background: rgb(40 60 146 / 10%);
}

/* Circular rings (easyPieChart) */

.homeCircs .box {
  width: 100%;
}

.homeCircs .box .chart {
  position: relative;
  width: 100%;
  height: 180px;
  text-align: center;
}

.homeCircs .chart-text {
  color: var(--wwise-blue-mid);
  font-size: 18px;
  font-weight: 500;
  line-height: 1.5;
}

.homeCircs .box canvas {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: auto;
}

.homeCircs .chart-svg {
  position: relative;
  height: 60%;
  max-width: 180px;
  margin: auto;
}

.homeCircs .chart-svg svg {
  height: 57px;
  position: absolute;
  top: 65%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.cSVG-1 .a,
.cSVG-2 .a,
.cSVG-3 .a {
  fill: var(--wwise-icon);
}

/* ---------- Virtual Enrollees Feedback ---------- */

.ninja_table_wrapper {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.feedback-table-shell {
  width: 100%;
  border: 1px solid rgb(44 56 128 / 12%);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 10px 28px rgb(40 60 146 / 6%);
  overflow: hidden;
}

.feedback-toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 0.85rem 1.25rem;
  padding: 1rem 1.1rem;
  border-bottom: 1px solid rgb(44 56 128 / 8%);
  background: linear-gradient(180deg, #fbfcfe 0%, #fff 100%);
}

.feedback-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.55rem 0.65rem;
  flex: 1 1 auto;
  min-width: 0;
}

.feedback-toolbar__right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: flex-end;
  gap: 0.35rem;
  flex: 0 0 auto;
  margin-left: auto;
}

.feedback-result-count {
  color: #6b7280;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
}

.feedback-filter {
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
  min-width: 0;
}

.feedback-filter__label {
  padding-left: 0.15rem;
  color: #6b7280;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.feedback-filter select {
  min-width: 148px;
  max-width: 210px;
  height: 2.45rem;
  padding: 0 2rem 0 0.85rem;
  border: 1px solid rgb(44 56 128 / 16%);
  border-radius: 999px;
  background-color: #fff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23283c92' d='M1.1 1.2 6 6.1l4.9-4.9 1.1 1.1L6 8.3.0 2.3z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.85rem center;
  background-size: 10px 7px;
  color: #1f2937;
  font: inherit;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.2;
  appearance: none;
  cursor: pointer;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.feedback-filter select:hover {
  border-color: rgb(40 60 146 / 28%);
}

.feedback-filter select:focus {
  border-color: var(--wwise-blue-mid);
  box-shadow: 0 0 0 3px rgb(50 108 169 / 14%);
}

.feedback-filter select.is-active {
  border-color: var(--wwise-blue);
  background-color: rgb(40 60 146 / 4%);
  color: var(--wwise-blue);
}

.feedback-clear-filters {
  height: 2.45rem;
  padding: 0 1rem;
  border: 1px solid rgb(40 60 146 / 18%);
  border-radius: 999px;
  background: #fff;
  color: var(--wwise-blue);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.feedback-clear-filters:hover {
  background: rgb(40 60 146 / 6%);
  border-color: rgb(40 60 146 / 30%);
}

.feedback-clear-filters[hidden] {
  display: none !important;
}

.feedback-search {
  display: flex;
  align-items: stretch;
  max-width: 280px;
  width: 100%;
  border: 1px solid rgb(44 56 128 / 16%);
  border-radius: 999px;
  background: #fff;
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.feedback-search:focus-within {
  border-color: var(--wwise-blue-mid);
  box-shadow: 0 0 0 3px rgb(50 108 169 / 14%);
}

.feedback-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  padding: 0.65rem 1rem;
  font: inherit;
  font-size: 14px;
  color: #1f2937;
  background: transparent;
  outline: none;
}

.feedback-search input::placeholder {
  color: #9aa3b2;
}

.feedback-search button {
  border: 0;
  width: 44px;
  margin: 3px;
  border-radius: 999px;
  background: var(--wwise-blue);
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s ease;
}

.feedback-search button:hover {
  background: var(--wwise-blue-mid);
}

.feedback-search svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

.js-wcaf-table {
  width: 100% !important;
  min-width: 0 !important;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
  font-family: var(--font-body);
  font-size: 14.5px;
  color: #2d3340;
}

.js-wcaf-table thead th {
  background: var(--wwise-blue) !important;
  background-color: #283c92 !important;
  color: #ffffff !important;
  font-size: 12.5px !important;
  font-weight: 700 !important;
  line-height: 1.35 !important;
  letter-spacing: 0.01em;
  text-align: left !important;
  padding: 0.95rem 1rem !important;
  border-bottom: none !important;
  vertical-align: middle;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.15s ease;
}

.wc-academy-feedback-table .js-wcaf-table thead th,
.wc-academy-feedback-table .js-wcaf-table thead th a,
.wc-academy-feedback-table .js-wcaf-table thead th span {
  color: #ffffff !important;
}

.js-wcaf-table thead th:hover {
  background: #222f78 !important;
  background-color: #222f78 !important;
  color: #ffffff !important;
}

.js-wcaf-table thead th .sort-icon {
  display: inline-block;
  margin-left: 0.3rem;
  opacity: 0.75;
  font-size: 0.85em;
  color: #ffffff !important;
}

.js-wcaf-table thead th.is-sorted-asc .sort-icon,
.js-wcaf-table thead th.is-sorted-desc .sort-icon {
  opacity: 1;
  color: #ffc107 !important;
}

.js-wcaf-table tbody td {
  padding: 1rem;
  border-bottom: 1px solid rgb(44 56 128 / 8%);
  vertical-align: top;
  font-weight: 500;
  line-height: 1.5;
  word-wrap: break-word;
  background: #fff;
  transition: background-color 0.15s ease;
}

.js-wcaf-table tbody tr.feedback-data-row.is-alt td {
  background: #f8fafc;
}

.js-wcaf-table tbody tr.feedback-data-row:hover td {
  background: #eef3fa;
}

.js-wcaf-table .col-name {
  width: 15%;
}

.js-wcaf-table .col-course {
  width: 18%;
}

.js-wcaf-table .col-expectations {
  width: 16%;
}

.js-wcaf-table .col-comment {
  width: 24%;
}

.js-wcaf-table .col-recommend {
  width: 13%;
}

.js-wcaf-table .col-more {
  width: 14%;
}

.cell-name {
  display: inline;
  font-weight: 700;
  color: var(--wwise-blue);
}

.cell-course {
  color: #3b4559;
  font-weight: 600;
}

.cell-muted {
  color: #6b7280;
  font-weight: 500;
}

.cell-empty {
  color: #c0c4cc;
}

.rating-badge {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
}

.rating-badge--excellent {
  background: rgb(31 136 67 / 12%);
  color: #1f8843;
}

.rating-badge--very-good {
  background: rgb(87 184 73 / 14%);
  color: #3d9a3a;
}

.rating-badge--good {
  background: rgb(50 108 169 / 12%);
  color: #326ca9;
}

.rating-badge--satisfactory {
  background: rgb(194 193 192 / 35%);
  color: #6b7280;
}

.rating-badge--poor {
  background: rgb(219 0 0 / 10%);
  color: #c62828;
}

.rating-badge--neutral {
  background: rgb(40 60 146 / 8%);
  color: var(--wwise-blue);
}

.row-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.35rem;
  height: 1.35rem;
  margin-right: 0.5rem;
  border: 1px solid rgb(44 56 128 / 22%);
  border-radius: 6px;
  background: #fff;
  color: var(--wwise-blue);
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  vertical-align: middle;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.row-toggle:hover {
  border-color: var(--wwise-blue);
  background: rgb(40 60 146 / 6%);
}

.row-toggle[aria-expanded="true"] {
  background: var(--wwise-blue);
  border-color: var(--wwise-blue);
  color: #fff;
}

.feedback-detail-row td {
  background: #f4f7fb !important;
  padding: 0 1rem 1.15rem !important;
  border-bottom: 1px solid rgb(44 56 128 / 10%);
}

.feedback-detail-row[hidden] {
  display: none;
}

.feedback-detail-panel {
  margin-top: 0.15rem;
  padding: 1rem 1.1rem;
  border: 1px solid rgb(44 56 128 / 10%);
  border-radius: 10px;
  background: #fff;
}

.feedback-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem 1.35rem;
  margin: 0;
  font-size: 13.5px;
}

.feedback-detail-grid > div {
  min-width: 0;
}

.feedback-detail-grid dt {
  margin: 0 0 0.35rem;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--wwise-blue-mid);
}

.feedback-detail-grid dd {
  margin: 0;
  color: #3b4559;
}

.feedback-pagination {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 0.35rem;
  padding: 0.95rem 1.1rem;
  border-top: 1px solid rgb(44 56 128 / 8%);
  background: #fbfcfe;
  list-style: none;
  margin: 0;
}

/* Divi/theme list bullets on ul/li — kill hard */
.wc-academy-feedback-table .feedback-pagination,
.wc-academy-feedback-table .feedback-pagination li {
  list-style: none !important;
  list-style-type: none !important;
  margin: 0;
  padding-left: 0;
  padding-inline-start: 0;
}

.wc-academy-feedback-table .feedback-pagination li {
  display: flex;
  margin: 0;
  padding: 0;
}

.wc-academy-feedback-table .feedback-pagination li::marker {
  content: none;
  display: none;
  font-size: 0;
}

.wc-academy-feedback-table .feedback-pagination li::before,
.wc-academy-feedback-table .feedback-pagination li::after {
  content: none !important;
  display: none !important;
  width: 0 !important;
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  background: none !important;
  border: 0 !important;
}

.feedback-pagination button {
  min-width: 2.25rem;
  height: 2.25rem;
  padding: 0 0.65rem;
  border: 1px solid rgb(44 56 128 / 14%);
  border-radius: 8px;
  background: #fff;
  color: var(--wwise-blue);
  font: inherit;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.feedback-pagination button:hover:not(:disabled):not(.is-active) {
  background: rgb(40 60 146 / 6%);
  border-color: rgb(40 60 146 / 28%);
}

.feedback-pagination button.is-active {
  background: var(--wwise-blue);
  border-color: var(--wwise-blue);
  color: #fff;
}

.feedback-pagination button:disabled {
  opacity: 0.35;
  cursor: default;
}

.feedback-empty {
  padding: 2rem 1.5rem;
  text-align: center;
  color: #8b93a1;
  font-weight: 500;
}

/* ---------- Responsive ---------- */

@media (max-width: 1100px) {
  .feedback-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .feedback-toolbar__right {
    width: 100%;
    margin-left: 0;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
  }

  .feedback-search {
    max-width: 320px;
    width: 100%;
  }
}

@media (max-width: 980px) {
  .bandn-dashboard {
    grid-template-columns: 1fr 1fr;
    gap: 1.75rem 1.25rem;
  }

  .bandn-col--bars {
    grid-column: 1 / -1;
  }
}

@media (max-width: 640px) {
      .bandn-dashboard {
    grid-template-columns: 1fr;
  }

  .feedback-detail-grid {
    grid-template-columns: 1fr;
  }

  .feedback-toolbar {
    align-items: stretch;
  }

  .feedback-filters {
    width: 100%;
  }

  .feedback-filter {
    flex: 1 1 140px;
  }

  .feedback-filter select {
    max-width: none;
    width: 100%;
  }

  .feedback-toolbar__right {
    flex-direction: column;
    align-items: stretch;
  }

  .feedback-search {
    max-width: none;
    width: 100%;
  }
}
