:root {
  --blockbooster-admin--primary: #5253f9;
  --blockbooster-admin--primary-accent: #e1e7ff;
  --blockbooster-admin--primary-box-shadow: 0 2px 5px 0 #4b3efa2a;
  --blockbooster-admin--muted: #62748e;
  --blockbooster-admin--muted-accent: #d1dae6;
  --blockbooster-admin--light: #fff;
  --blockbooster-admin--heading: #141822;
  --blockbooster-admin--heading-accent: #1418222a;
  --blockbooster-admin--border: #eaeef4;

  --blockbooster-admin--success: #0eb188;
  --blockbooster-admin--success-accent: #e1f6f3;
}

.blockbooster-display-none {
  display: none !important;
}
.blockbooster-disabled {
  opacity: 0.6;
  pointer-events: none;
  cursor: not-allowed;
}
#blockbooster-admin-spinner {
  visibility: visible !important;
  margin: 0 !important;
}

.blockbooster-helper-links {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;

  & .helper-link {
    margin: 0;
    padding: 0;

    & a {
      display: flex;
      align-items: center;
      gap: 4px;
      color: var(--blockbooster-admin--muted);
    }

    &.upsell-link a {
      color: var(--blockbooster-admin--primary);
    }
  }
}

/* Admin Welcome Notice */
#blockbooster-welcome-notice {
  padding-top: 0;
  padding-bottom: 0;
  overflow: hidden;
  padding-right: 20px;

  & p {
    margin: 0;
    font-size: 16px;
  }

  & .highlighted-text {
    color: var(--blockbooster-admin--primary);
  }

  & .brand-logo {
    display: inline-block;
    margin: 0;
  }

  & .content-holder {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 0;
  }
  & .notice-heading {
    font-size: 28px;
    font-weight: 600;
    line-height: 1.3;
    margin: -4px 0 12px;
  }
  & .notices {
    display: flex;
    width: 60%;
    gap: 16px;
  }
  & .notice-buttons {
    margin: 12px 0;
  }
  & .notice-button {
    padding: 0;
    margin: 0;
    border: none;
    outline: none;
    border-radius: 12px;
    cursor: pointer;
    background-color: transparent;

    & a {
      display: inline-block;
      padding: 12px 26px;
      border-radius: 12px;
      color: var(--blockbooster-admin--light);
      background-color: var(--blockbooster-admin--primary);
      text-decoration: none;

      &:hover {
        background-color: var(--blockbooster-admin--heading);
      }
    }
  }
  & .notice-button.notice-button-secondary a {
    margin-left: 10px;
    background-color: transparent;
    color: var(--blockbooster-admin--heading);
    border: 1px solid var(--blockbooster-admin--border);

    &:hover {
      background-color: var(--blockbooster-admin--heading);
      color: var(--blockbooster-admin--light);
      border-color: var(--blockbooster-admin--heading-accent);
    }
  }
  & .notice-button.has-spinner {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: center;
  }

  & .notice-image {
    flex: 1;
    margin: 0;
    max-height: 200px;

    & img {
      width: 100%;
      height: auto;
      object-fit: cover;
      border-radius: 16px;
    }
  }
}

/* Admin Dashboard */
#wpcontent:has(#blockbooster-dashboard) {
  padding-left: 0;
  background-color: var(--blockbooster-admin--light);

  & #wpbody-content {
    background-color: var(--blockbooster-admin--light);
  }
}
.blockbooster-spacer {
  margin: 44px 0;

  &.sm {
    margin: 16px 0;
  }
  &.md {
    margin: 26px 0;
  }
  &.xs {
    margin: 6px 0;
  }
}

#blockbooster-admin-header,
#blockbooster-admin-header .nav-bar,
#blockbooster-admin-header .brand-wrapper,
#blockbooster-admin-header .nav-menu,
#blockbooster-admin-header .upsell-btn a {
  display: flex;
  align-items: center;
}
#blockbooster-admin-header {
  margin-bottom: 26px;
  justify-content: space-between;
  gap: 26px;
  box-shadow: var(--blockbooster-admin--primary-box-shadow);
  background-color: var(--blockbooster-admin--light);
  padding: 0 26px;
  position: sticky;
  top: 32px;
  z-index: 20;

  & ul {
    list-style: none;
  }
  & figure,
  & ul,
  & li {
    margin: 0;
    padding: 0;
  }

  & .brand-wrapper {
    gap: 10px;
  }
  & .brand-logo {
    max-width: 36px;
    max-height: 36px;

    & img {
      width: 100%;
      height: 100%;
    }
  }
  & .brand-title {
    margin: 0;
    font-weight: 600;
    font-size: 18px;
  }

  & .nav-bar {
    gap: 20px;
  }

  & .nav-menu {
    color: #1d2c5d;
    font-size: 16px;
    font-weight: 500;

    & .nav-menu-item {
      padding: 26px 10px;
    }
    & .nav-menu-item.is-active {
      color: var(--blockbooster-admin--primary);
      cursor: default;
    }
    & .nav-menu-item:not(.is-active) {
      cursor: pointer;
    }
  }

  & .upsell-btn {
    padding: 0;
    border: none;
    outline: none;
    background: linear-gradient(90deg, #4c3efa 21%, #ffb600 100%);
    border-radius: 10px;

    &:hover {
      transform: scale(1.04);
      transition: transform 0.28s ease;
    }

    & a {
      padding: 14px 26px;
      gap: 4px;
      text-decoration: none;
      color: var(--blockbooster-admin--light);
    }
  }
}

#blockbooster-dashboard {
  padding: 0 26px 26px;
  max-width: 1180px;
  margin: 0 auto;
  font-weight: 300;
  background-color: var(--blockbooster-admin--light);

  & p {
    font-size: 16px;
  }

  & figure,
  & ul,
  & li {
    margin: 0;
    padding: 0;
  }
  & img {
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
  }
  & h3 {
    font-size: 16px;
    font-weight: 500;
  }

  & .text-align-center {
    text-align: center;
  }

  & .tab-content:not(.is-active) {
    display: none;
  }

  & .section {
    background-color: #f7fafe;
    padding: 30px 26px;
    border: 1px solid #f2f5fd;
    border-radius: 20px;
    color: var(--blockbooster-admin--muted);
  }
  & .section-title,
  & .sidebar-title {
    margin: 0;
  }
  & .section-title {
    font-size: 24px;
    letter-spacing: -1px;
    font-weight: 600;
    line-height: 1.2;

    &.has-icon {
      display: flex;
      align-items: center;
      gap: 12px;
    }

    & .section-icon {
      background-color: var(--blockbooster-admin--primary);
      display: inline-flex;
      width: 34px;
      height: 34px;
      border-radius: 100px;
      justify-content: center;
      align-items: center;
    }
  }

  & .section-pill {
    width: fit-content;
    padding: 4px 12px;
    border-radius: 100px;
    background-color: var(--blockbooster-admin--primary-accent);
    color: var(--blockbooster-admin--primary);
    font-size: 12px;
    margin: 0 0 6px;
    font-weight: 400;
  }

  & .buttons-group {
    display: flex;
    gap: 10px;
    font-weight: 500;
    font-size: 14px;

    &.has-spacing {
      margin: 16px 0;
    }

    &:has(.is-full-width) {
      flex-wrap: wrap;
    }
  }
  & .btn {
    padding: 0;
    border: none;
    outline: none;
    background-color: transparent;

    & a {
      padding: 12px 36px;
      display: inline-block;
      border-radius: 12px;
      cursor: pointer;
      text-decoration: none;
    }

    &:hover {
      transform: translateY(-5px);
      transition: transform 0.28s ease;
    }

    &.has-spinner {
      display: flex;
      align-items: center;
      gap: 10px;
      flex-wrap: wrap;
    }
    &.has-icon a {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 4px;
    }
    &.is-full-width,
    &.is-full-width a {
      width: 100%;
      max-width: 100%;
      box-sizing: border-box;
    }
  }
  & .btn-primary a {
    background-color: var(--blockbooster-admin--primary);
    color: var(--blockbooster-admin--light);

    &:hover {
      background-color: var(--blockbooster-admin--heading);
      color: var(--blockbooster-admin--light);
    }
  }
  & .btn-secondary a {
    background-color: transparent;
    color: var(--blockbooster-admin--primary);
    border: 1px solid var(--blockbooster-admin--primary);

    &:hover {
      background-color: var(--blockbooster-admin--heading);
      color: var(--blockbooster-admin--light);
      border-color: var(--blockbooster-admin--heading);
    }
  }
  & .btn-success a {
    background-color: #dcf9e5;
    color: #0e9254;
  }
  & .upsell-btn {
    padding: 0;
    border: none;
    outline: none;
    background: linear-gradient(90deg, #4c3efa 21%, #ffb600 100%);
    border-radius: 10px;

    & a {
      padding: 14px 26px;
      gap: 4px;
      text-decoration: none;
      color: var(--blockbooster-admin--light);
    }
  }

  & .icon-list .list-item {
    display: flex;
    align-items: center;
    gap: 4px;

    &:not(:first-child) {
      margin-top: 10px;
    }

    & .icon-wrap {
      display: flex;
    }
  }

  & .stars {
    text-align: center;

    & img {
      width: auto;
      height: 16px;
    }
  }

  & .accordion-item {
    border: 1px solid var(--blockbooster-admin--border);
    border-radius: 16px;
    margin-bottom: 16px;
    overflow: hidden;
  }
  & .accordion-item.active {
    & h3,
    & svg {
      color: var(--blockbooster-admin--primary);
    }
  }
  & .accordion-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 26px;
    cursor: pointer;
    color: var(--blockbooster-admin--heading);

    & h3 {
      margin: 0;
      font-size: 16px;
      font-weight: 500;
    }
  }
  & .chevron {
    display: flex;
    transition: transform 0.25s ease;
    justify-content: center;
    align-items: center;
    & svg {
      height: 12px;
    }
  }
  & .accordion-item.active {
    background-color: var(--blockbooster-admin--light);
  }
  & .accordion-item.active .chevron {
    transform: rotate(180deg);
    transform-origin: center;
  }
  & .accordion-body {
    max-height: 0;
    overflow: hidden;
    padding: 0 24px 0;
    transition:
      max-height 0.3s cubic-bezier(0.22, 1, 0.36, 1),
      padding 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  }
  & .accordion-item.active .accordion-body {
    max-height: 300px; /* adjust if answers are longer */
    padding: 0 24px 22px;
    transition:
      max-height 0.5s ease,
      padding 0.2s ease-in;
  }
  & .accordion-body p {
    margin: 0;
  }

  & .cols-wrapper {
    display: flex;
    gap: 16px;
  }
  & .col-item:first-child {
    flex: 3;
  }
  & .col-item:last-child {
    flex: 1;

    & .is-sticky {
      height: fit-content;
      position: sticky;
      top: 106px;
    }
  }

  & .cols-grid {
    display: grid;
    gap: 16px;

    &.cols-2 {
      grid-template-columns: repeat(2, 1fr);
    }
    &.cols-3 {
      grid-template-columns: repeat(3, 1fr);
    }
    &.cols-4 {
      grid-template-columns: repeat(4, 1fr);
    }
  }

  & .info-text {
    padding: 8px 16px;
    border-radius: 5px;

    &.tone-success {
      background-color: var(--blockbooster-admin--success-accent);
      color: var(--blockbooster-admin--success);
    }
  }
  & .info-text.has-icon {
    display: flex;
    align-items: center;
    gap: 6px;

    & .icon {
      display: flex;
      justify-content: center;
      align-items: center;
    }
  }

  /* Banner */
  & .blockbooster-banner {
    padding: 26px;
    border: 1px solid var(--blockbooster-admin--border);
    border-radius: 20px;
    display: flex;
    gap: 16px;
    color: var(--blockbooster-admin--muted-accent);

    & p {
      margin: 0;
    }

    & .banner-image {
      margin: 0;
      display: flex;
    }
    & .inner-wrap {
      display: flex;
      flex-direction: column;
      justify-content: center;
    }
    & .banner-heading {
      margin-top: 0;
      font-size: 36px;
      font-weight: 500;
      line-height: 1.2;
      color: var(--blockbooster-admin--heading);

      & mark {
        background-color: transparent;
        color: var(--blockbooster-admin--primary);
      }
    }
    & .getting-started-timeline {
      display: flex;
      align-items: center;
      gap: 6px;
      color: #62748e;
      font-weight: 500;
      font-size: 16px;

      & .separator {
        background-color: #e1e7fb;
        height: 1px;
        min-width: 30px;
      }
      & .counter {
        display: inline-flex;
        align-items: center;
        width: 22px;
        height: 22px;
        justify-content: center;
        margin-right: 4px;
        border: 1px solid var(--blockbooster-admin--border);
        border-radius: 100px;
      }

      & .timeline-item.complete {
        color: var(--blockbooster-admin--primary);
      }
      & .timeline-item.complete .counter {
        background-color: var(--blockbooster-admin--primary);
        color: var(--blockbooster-admin--light);
        border-color: var(--blockbooster-admin--primary);
      }
    }
    & .btn {
      text-align: left;
    }
  }

  /* Getting Started */
  & .plugin-card-layout {
    padding: 20px;
    border: 1px solid var(--blockbooster-admin--border);
    border-radius: 10px;
    box-shadow: var(--blockbooster-admin--primary-box-shadow);
    background-color: var(--blockbooster-admin--light);
  }
  & .plugin-logo {
    width: 36px;
    height: 36px;
    & img {
      width: 100%;
      height: 100%;
    }
  }

  /* Starter sites */
  & #starter-sites .starter-sites-collection .template-item {
    box-shadow: var(--blockbooster-admin--primary-box-shadow);
    background-color: var(--blockbooster-admin--light);
    border-radius: 12px;
    width: fit-content;
  }
  & #starter-sites .starter-sites-collection .template-title {
    padding: 0 20px;
  }

  /* Upsell */
  & #upsell {
    background: linear-gradient(98deg, #e6eaff 0%, #e3e0ff 100%);
  }
  & #upsell .cols-wrapper {
    height: fit-content;
    margin: auto 0;
  }
  & #upsell .features-section {
    background-color: #121b28;
    color: #e9e8fb;
  }
  & #upsell .icon-list-item {
    display: flex;
    gap: 6px;
    align-items: center;
  }
  & #upsell .icon-list .list-icon {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 16px;
    height: 16px;
    border-radius: 100px;
    background-color: #212b3a;
  }

  /* Free vs Pro */
  & #free-vs-pro .comparison-table {
    width: 100%;
    border-collapse: collapse;
    background-color: var(--blockbooster-admin--light);
  }
  & #free-vs-pro .comparison-table thead {
    background-color: var(--blockbooster-admin--primary-accent);
    color: var(--blockbooster-admin--heading);
  }
  & #free-vs-pro .comparison-table th,
  & #free-vs-pro .comparison-table td {
    padding: 18px 24px;
    text-align: left;
    vertical-align: middle;
    border-bottom: 1px solid var(--blockbooster-admin--border);
    font-size: 16px;
    line-height: 1.4;
  }
  & #free-vs-pro .comparison-table th:first-child {
    width: 60%;
  }

  /* Sidebar */
  & #sidebar .sidebar-title {
    margin-bottom: 16px;
    font-weight: 400;
    letter-spacing: -1px;
    font-size: 16px;

    &.has-icon {
      display: flex;
      gap: 4px;
      align-items: center;
    }
  }
  & #sidebar .sidebar-icon {
    display: inline-flex;
    margin-right: 2px;

    & svg {
      width: 16px;
      height: 16px;
    }
  }
  #sidebar .sidebar-section {
    padding: 26px;
    border: 1px solid var(--blockbooster-admin--border);
    border-radius: 20px;
    box-shadow: 0 4px 34px 0 #4b3efa1e;
  }
  #sidebar .sidebar-upsell-section {
    background-color: #121b28;
    color: #e9e8fb;
    padding: 26px;
    border-radius: 20px;

    & .sidebar-title {
      color: var(--blockbooster-admin--light);
    }

    & .sidebar-upsell-btn {
      background-color: #ffb600;
      border-radius: 12px;

      & a {
        text-decoration: none;
        color: #121b28;
      }

      &:hover {
        background-color: var(--blockbooster-admin--light);
      }
    }
  }

  & .blockbooster-helper-links {
    justify-content: center;
  }
  & .blockbooster-helper-links .upsell-btn {
    background: transparent;
  }
  & .blockbooster-helper-links .upsell-btn a {
    background-color: #ffb600;
    color: #121b28;
  }
}

@media (width <= 1024px) {
  #blockbooster-dashboard .cols-wrapper {
    flex-wrap: wrap;
  }
  #blockbooster-dashboard .cols-grid.cols-3 {
    grid-template-columns: repeat(2, 1fr);
  }
  #blockbooster-dashboard .cols-grid.cols-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (width <= 767px) {
  #blockbooster-dashboard .cols-grid.cols-2 {
    grid-template-columns: repeat(1, 1fr);
  }
  #blockbooster-dashboard .cols-grid.cols-3 {
    grid-template-columns: repeat(1, 1fr);
  }
  #blockbooster-dashboard .cols-grid.cols-4 {
    grid-template-columns: repeat(1, 1fr);
  }
}
