/* Tutor and WordPress account surfaces within Barcotics pages. */
/* Our site header already occupies normal document space. Tutor's scroll-driven
   overlay padding otherwise grows the page while its scrollbar is dragged. */
body.bc-site :is(.tutor-dashboard-layout, .tutor-account-page-wrapper).tutor-has-site-shell {
  padding-top: 0;
}

html:has(.tutor-profile-settings-section) {
  scroll-behavior: auto;
}

@media (min-width: 768px) {
  body.bc-site .tutor-has-site-shell .tutor-profile-settings-section.bc-settings-header-docked::before {
    content: '';
    display: block;
    height: var(--bc-settings-bar-height);
  }

  body.bc-site .tutor-has-site-shell .tutor-profile-header.bc-settings-header-fixed {
    position: fixed;
    top: var(--bc-settings-bar-top);
    left: 0;
    right: 0;
    z-index: 10;
  }

  body.bc-site .tutor-has-site-shell .tutor-profile-settings-tab.tutor-tabs-nav {
    top: var(--bc-settings-tabs-top, calc(var(--tutor-site-header-offset, 0px) + 93px));
  }

  body.bc-site .tutor-has-site-shell .bc-settings-tabs-docked {
    padding-left: var(--bc-settings-tabs-space);
  }

  body.bc-site .tutor-has-site-shell .tutor-profile-settings-tab.tutor-tabs-nav.bc-settings-tabs-fixed {
    position: fixed;
    left: var(--bc-settings-tabs-left);
    width: var(--bc-settings-tabs-width);
    z-index: 9;
  }

  body.bc-site .tutor-has-site-shell .tutor-profile-settings-tab.tutor-tabs-nav.bc-settings-tabs-over-footer {
    visibility: hidden;
    pointer-events: none;
  }
}

body.bc-site .tutor-account-avatar-wrapper {
  margin-bottom: -120px;
  transform: translateY(-120px);
}

body.bc-site .tutor-account-section .tutor-account-avatar-wrapper .tutor-account-avatar {
  width: 240px;
  height: 240px;
}

body.bc-site .tutor-account-section .tutor-account-avatar .tutor-avatar-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (max-width: 760px) {
  body.bc-site .tutor-account-avatar-wrapper {
    margin-bottom: -92px;
    transform: translateY(-92px);
  }

  body.bc-site .tutor-account-section .tutor-account-avatar-wrapper .tutor-account-avatar {
    width: 184px;
    height: 184px;
  }

}

.bc-tutor {
  color: var(--bc-text, #f4f6fb);
}

.bc-tutor h1,
.bc-tutor h2,
.bc-tutor h3 {
  color: var(--bc-text, #f4f6fb);
}

.bc-tutor a:not(.bc-button):not(.tutor-btn) {
  color: var(--bc-cyan, #4ae1f2);
  text-decoration-color: currentColor;
  text-underline-offset: .2em;
}

.bc-tutor a:focus-visible,
.bc-tutor button:focus-visible,
.bc-tutor input:focus-visible,
.bc-tutor select:focus-visible,
.bc-tutor textarea:focus-visible {
  outline: 3px solid var(--bc-magenta, #ed53da);
  outline-offset: 3px;
}

.bc-learning-intro h1 {
  max-width: 12ch;
}

.bc-learning-lede {
  max-width: 64ch;
  color: var(--bc-muted, #9aa8bb);
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  line-height: 1.65;
}

.bc-learning-path {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-top: clamp(2rem, 4vw, 4rem);
}

.bc-learning-path-item,
.bc-learning-empty,
.bc-account-panel {
  background: var(--bc-panel, #111720);
  border: 1px solid var(--bc-border, #26303b);
  padding: clamp(1.25rem, 3vw, 2rem);
}

.bc-learning-path-item {
  border-top: 2px solid var(--bc-cyan, #4ae1f2);
}

.bc-learning-path-item:nth-child(2) {
  border-top-color: var(--bc-magenta, #ed53da);
}

.bc-learning-step {
  display: block;
  margin-bottom: 2rem;
  color: var(--bc-cyan, #4ae1f2);
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .14em;
}

.bc-learning-path-item:nth-child(2) .bc-learning-step {
  color: var(--bc-magenta, #ed53da);
}

.bc-learning-path-item h2 {
  margin: 0 0 .75rem;
  font-size: clamp(1.15rem, 2vw, 1.5rem);
}

.bc-learning-path-item p,
.bc-learning-empty p,
.bc-account-panel p,
.bc-join-intro,
.bc-account-secondary {
  color: var(--bc-muted, #9aa8bb);
  line-height: 1.65;
}

.bc-learning-courses {
  border-top: 1px solid var(--bc-border, #26303b);
}

.bc-learning-empty {
  max-width: 46rem;
  margin-top: 1.5rem;
}

.bc-learning-empty h3 {
  margin-top: 0;
}

.bc-learning-admin-note {
  border-left: 2px solid var(--bc-magenta, #ed53da);
  margin: 1.5rem 0 0;
  padding-left: 1rem;
}

.bc-account-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  margin-top: -.5rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--bc-border, #26303b);
  font-size: .875rem;
  font-weight: 600;
}

.bc-account-panel {
  max-width: 38rem;
  margin-top: 2rem;
}

.bc-account-secondary {
  margin-top: 1.25rem;
}

.bc-tutor-surface {
  --tutor-color-primary: #4ae1f2;
  --tutor-color-primary-hover: #76eaf5;
  --tutor-color-secondary: #ed53da;
  --tutor-color-text-primary: #f4f6fb;
  --tutor-color-text-secondary: #c4cedb;
  --tutor-color-text-hints: #9aa8bb;
  --tutor-color-border: #344251;
  --tutor-color-gray-10: #080b10;
  --tutor-color-gray-20: #111720;
  --tutor-color-gray-30: #19222d;
  --tutor-color-gray-40: #26303b;
  color: var(--bc-text, #f4f6fb);
  margin-top: 2rem;
}

/* Tutor 4 renders assigned dashboard pages with its own root template. */
body.bc-site :is(.tutor-dashboard-layout, .tutor-account-page-wrapper, .tutor-dashboard-isolated-page-wrapper, .tutor-page-wrap, .tutor-wrap-parent),
.bc-tutor-surface {
  --tutor-surface-base: var(--bc-bg, #080b10);
  --tutor-surface-l1: var(--bc-panel, #111720);
  --tutor-surface-l1-hover: #19232e;
  --tutor-surface-l2: #1b2632;
  --tutor-surface-l2-hover: #263543;
  --tutor-surface-l3: #18222d;
  --tutor-surface-sidebar-l1: #0c1118;
  --tutor-text-primary: var(--bc-text, #f4f6fb);
  --tutor-text-secondary: #c9d3df;
  --tutor-text-subdued: #a9b7c9;
  --tutor-text-disabled: #8392a5;
  --tutor-text-brand: var(--bc-cyan, #4ae1f2);
  --tutor-text-brand-hover: #8ceef7;
  --tutor-icon-idle: #c9d3df;
  --tutor-icon-secondary: #a9b7c9;
  --tutor-icon-brand: var(--bc-cyan, #4ae1f2);
  --tutor-button-primary: var(--bc-cyan, #4ae1f2);
  --tutor-button-primary-hover: #8ceef7;
  --tutor-button-primary-focused: var(--bc-cyan, #4ae1f2);
  --tutor-button-secondary: #263543;
  --tutor-button-secondary-hover: #34485a;
  --tutor-border-idle: #344251;
  --tutor-border-idle2: #405064;
  --tutor-border-hover: #62758a;
  --tutor-tab-sidebar-l2: #111720;
  --tutor-tab-sidebar-l2-hover: #1b2632;
  --tutor-tab-sidebar-l2-active: #233445;
  --tutor-tab-sidebar-l4-hover: #1b2632;
  --tutor-tab-sidebar-l4-active: #233445;
  color: var(--bc-text, #f4f6fb);
}

body.bc-site :is(.tutor-dashboard-layout, .tutor-account-page-wrapper, .tutor-dashboard-isolated-page-wrapper, .tutor-page-wrap, .tutor-wrap-parent) :is(.tutor-btn-primary, .tutor-btn-primary:hover, .tutor-btn-primary:focus-visible),
body.bc-site :is(.tutor-dashboard-layout, .tutor-account-page-wrapper, .tutor-dashboard-isolated-page-wrapper, .tutor-page-wrap, .tutor-wrap-parent) .tutor-btn-primary svg:not([class]) {
  color: #081018;
}

body.bc-site :is(.tutor-dashboard-layout, .tutor-account-page-wrapper, .tutor-dashboard-isolated-page-wrapper, .tutor-page-wrap, .tutor-wrap-parent) :is(a, button, input, select, textarea):focus-visible {
  outline: 3px solid var(--bc-magenta, #ed53da);
  outline-offset: 3px;
}

.bc-tutor-surface .tutor-card,
.bc-tutor-surface .tutor-dashboard,
.bc-tutor-surface .tutor-dashboard-left-menu,
.bc-tutor-surface .tutor-dashboard-content,
.bc-tutor-surface .tutor-course-card,
.bc-tutor-surface .tutor-course-loop {
  background-color: var(--bc-panel, #111720);
  border-color: var(--bc-border, #26303b);
  color: var(--bc-text, #f4f6fb);
}

.bc-tutor-surface :is(.tutor-color-black, .tutor-color-dark),
.bc-tutor-surface :is(.tutor-course-name, .tutor-course-title, .tutor-dashboard-header-username, .tutor-dashboard-menu-item-text) {
  color: var(--bc-text, #f4f6fb);
}

.bc-tutor-surface :is(.tutor-color-muted, .tutor-color-gray, .tutor-course-description, .tutor-meta) {
  color: var(--bc-muted, #9aa8bb);
}

.bc-tutor-surface :is(.tutor-form-control, .tutor-input, .tutor-form-select, select, textarea, input[type="text"], input[type="email"], input[type="password"]) {
  background-color: var(--bc-bg, #080b10);
  border: 1px solid #53657a;
  color: var(--bc-text, #f4f6fb);
}

.bc-tutor-surface :is(input, textarea)::placeholder {
  color: #aebacc;
  opacity: 1;
}

.bc-tutor-surface label,
.bc-wp-login label {
  color: var(--bc-text, #f4f6fb);
}

.bc-tutor-surface .tutor-btn-primary,
.bc-wp-login input[type="submit"] {
  background: var(--bc-cyan, #4ae1f2);
  border-color: var(--bc-cyan, #4ae1f2);
  color: #081018;
  font-weight: 700;
}

.bc-tutor-surface .tutor-btn-primary:hover,
.bc-wp-login input[type="submit"]:hover {
  background: #85edf6;
  border-color: #85edf6;
  color: #081018;
}

.bc-wp-login form p {
  margin: 0 0 1rem;
}

.bc-wp-login :is(input[type="text"], input[type="password"]) {
  display: block;
  width: min(100%, 30rem);
  margin-top: .35rem;
  padding: .7rem .85rem;
  border: 1px solid #53657a;
  background: var(--bc-bg, #080b10);
  color: var(--bc-text, #f4f6fb);
}

.bc-wp-login input[type="submit"] {
  cursor: pointer;
  min-height: 2.75rem;
  padding: .6rem 1.25rem;
}

body.bc-site .tutor-dashboard-layout .tutor-dashboard-header-user-avatar,
body.bc-site .tutor-dashboard-layout .tutor-dashboard-header-user-avatar .tutor-avatar {
  width: 64px;
  height: 64px;
}

body.bc-site .tutor-dashboard-layout .tutor-dashboard-header-user-avatar .tutor-avatar-image {
  width: 100%;
  height: 100%;
}

@media (max-width: 760px) {
  .bc-learning-path {
    grid-template-columns: 1fr;
  }

  .bc-learning-step {
    margin-bottom: 1rem;
  }

  .bc-tutor-surface {
    overflow-wrap: anywhere;
  }
}

@media (max-width: 767px) {
  body.bc-site .tutor-dashboard-layout .tutor-dashboard-header-user-avatar,
  body.bc-site .tutor-dashboard-layout .tutor-dashboard-header-user-avatar .tutor-avatar {
    width: 52px;
    height: 52px;
    display: flex;
  }

  body.bc-site .tutor-dashboard-layout .tutor-dashboard-header-user-avatar > svg {
    display: none;
  }

  /* Tutor's full-screen user drawer is inside a sticky header stacking context.
     Lift that context above our site header and Tutor's fixed bottom nav only
     while Alpine marks the user menu trigger active. */
  body.bc-site .tutor-dashboard-layout .tutor-dashboard-header:has(.tutor-dashboard-header-user-avatar.active) {
    z-index: 1001;
  }

  body.bc-site .tutor-dashboard-layout:has(.tutor-dashboard-header-user-avatar.active) .tutor-dashboard-nav-mobile {
    pointer-events: none;
  }

  body.bc-site .tutor-dashboard-layout .tutor-dashboard-header-user-popover {
    scroll-padding-bottom: max(2rem, env(safe-area-inset-bottom));
  }
}
