/* Beverly Films view toggle: grid/list mode for production archives */
.bf-view-switch {
  position: fixed;
  top: calc(var(--header-height, 7rem) + 1.6rem);
  left: max(2rem, env(safe-area-inset-left));
  z-index: 80;
  display: flex;
  align-items: stretch;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(0, 0, 0, 0.38);
  backdrop-filter: blur(14px);
}

html:not(.bf-work-list-mode) .card-production-video,
html:not(.bf-work-list-mode) .card-production-main-video {
  pointer-events: none !important;
}

body:not(.wp-admin) .loader,
body:not(.wp-admin) .loader-bg {
  background-color: #071c2c !important;
}

html:not(.bf-work-list-mode) body:not(.wp-admin) .slider .card-production.bf-has-hover-video:hover .card-production-video,
html:not(.bf-work-list-mode) body:not(.wp-admin) .slider .card-production.bf-has-hover-video:hover .card-production-main-video,
html:not(.bf-work-list-mode) body:not(.wp-admin) .slider .card-production.bf-has-hover-video:focus-visible .card-production-video,
html:not(.bf-work-list-mode) body:not(.wp-admin) .slider .card-production.bf-has-hover-video:focus-visible .card-production-main-video {
  opacity: 1 !important;
}

html:not(.bf-work-list-mode) body:not(.wp-admin) .slider .card-production.bf-has-hover-video:hover .card-production-inner,
html:not(.bf-work-list-mode) body:not(.wp-admin) .slider .card-production.bf-has-hover-video:focus-visible .card-production-inner {
  opacity: 0 !important;
}

.bf-view-switch button {
  width: 4.8rem;
  height: 4.8rem;
  display: grid;
  place-items: center;
  border: 0;
  border-right: 1px solid rgba(255, 255, 255, 0.14);
  background: transparent;
  color: rgba(255, 255, 255, 0.72);
  cursor: pointer;
  transition: background 0.24s ease, color 0.24s ease;
}

.bf-view-switch button:last-child {
  border-right: 0;
}

.bf-view-switch button[aria-pressed="true"] {
  background: #f1eee7;
  color: #111;
}

.bf-view-switch-icon {
  position: relative;
  width: 1.25rem;
  height: 1.25rem;
  display: block;
}

.bf-view-switch-icon-grid {
  background:
    linear-gradient(currentColor 0 0) 0 0 / 0.28rem 0.28rem,
    linear-gradient(currentColor 0 0) 50% 0 / 0.28rem 0.28rem,
    linear-gradient(currentColor 0 0) 100% 0 / 0.28rem 0.28rem,
    linear-gradient(currentColor 0 0) 0 50% / 0.28rem 0.28rem,
    linear-gradient(currentColor 0 0) 50% 50% / 0.28rem 0.28rem,
    linear-gradient(currentColor 0 0) 100% 50% / 0.28rem 0.28rem,
    linear-gradient(currentColor 0 0) 0 100% / 0.28rem 0.28rem,
    linear-gradient(currentColor 0 0) 50% 100% / 0.28rem 0.28rem,
    linear-gradient(currentColor 0 0) 100% 100% / 0.28rem 0.28rem;
  background-repeat: no-repeat;
}

.bf-view-switch-icon-list::before,
.bf-view-switch-icon-list::after,
.bf-view-switch-icon-list span {
  content: "";
  position: absolute;
  left: 0.18rem;
  right: 0.18rem;
  height: 0.16rem;
  background: currentColor;
}

.bf-view-switch-icon-list::before {
  top: 0.28rem;
}

.bf-view-switch-icon-list span {
  top: 0.56rem;
}

.bf-view-switch-icon-list::after {
  top: 0.84rem;
}

.bf-header-logo-img {
  display: block;
  width: 6.8rem;
  height: auto;
  max-width: none;
}

body:not(.wp-admin) .header-logo-wrapper {
  width: 7.8rem !important;
  min-width: 7.8rem;
}

.header-logo,
.header-logo-mobile {
  width: 6.8rem;
}

.header-logo-mobile,
.header-logo-mobile .bf-header-logo-img {
  width: 5.2rem;
}

@media (min-width: 1200px) {
  body:not(.wp-admin) .header-logo-wrapper {
    width: 8.4rem !important;
    min-width: 8.4rem;
  }
}

.bf-work-list {
  display: none;
  min-height: 100vh;
  padding: 10.5rem clamp(2rem, 4vw, 5rem) 6rem;
  background: transparent;
  color: #f2f0eb;
  font-family: var(--font-sans, "Helvetica Neue", Arial, sans-serif);
}

.bf-work-list-inner {
  width: min(100%, 118rem);
  margin: 0 auto;
}

.bf-work-list-head {
  display: grid;
  grid-template-columns: 7rem minmax(0, 1.4fr) minmax(0, 1fr) minmax(9rem, 16rem) 2rem;
  align-items: center;
  padding-bottom: 2.4rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  font-family: var(--font-mono, monospace);
  font-size: 1rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
}

.bf-work-row {
  position: relative;
  display: grid;
  grid-template-columns: 7rem minmax(0, 1.4fr) minmax(0, 1fr) minmax(9rem, 16rem) 2rem;
  align-items: center;
  min-height: 8.2rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  color: inherit;
  text-decoration: none;
}

.bf-work-row-index,
.bf-work-row-kind,
.bf-work-row-arrow {
  font-family: var(--font-mono, monospace);
  font-size: 1rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.42);
  transition: color 0.24s ease;
}

.bf-work-row-title {
  padding-right: 2rem;
  font-size: clamp(2.4rem, 4vw, 5.2rem);
  font-weight: 500;
  line-height: 1.02;
  letter-spacing: 0;
  color: #f2f0eb;
  transition: color 0.24s ease;
}

.bf-work-row-cast {
  font-size: clamp(1.4rem, 2vw, 1.8rem);
  font-weight: 400;
  color: rgba(255, 255, 255, 0.6);
  padding-right: 2rem;
  transition: color 0.24s ease;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bf-work-row:hover .bf-work-row-title,
.bf-work-row:hover .bf-work-row-index,
.bf-work-row:hover .bf-work-row-kind,
.bf-work-row:hover .bf-work-row-cast,
.bf-work-row:hover .bf-work-row-arrow {
  color: #d36a3c;
}

.bf-work-preview {
  position: fixed;
  right: clamp(2rem, 3vw, 4rem);
  top: 31vh;
  z-index: 84;
  width: min(36vw, 46rem);
  aspect-ratio: 16 / 9;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: #000;
  opacity: 0;
  transform: translateY(1rem);
  pointer-events: none;
  transition: opacity 0.24s ease, transform 0.24s ease;
  overflow: hidden;
}

/* Category-specific overrides for vertical posters (Films & In-Development) */
body[data-bf-work-category="films"] .bf-work-preview,
body[data-bf-work-category="in-development"] .bf-work-preview {
  top: calc(var(--header-height, 7rem) + 2rem);
  height: min(64vh, 50rem);
  width: auto; /* Let aspect ratio define the width */
  aspect-ratio: 3 / 4; /* Exact vertical aspect ratio for 3:4 movie posters! */
}

body[data-bf-work-category="films"] .bf-work-preview img,
body[data-bf-work-category="films"] .bf-work-preview video,
body[data-bf-work-category="in-development"] .bf-work-preview img,
body[data-bf-work-category="in-development"] .bf-work-preview video {
  object-fit: contain; /* Ensures 100% of the poster artwork and text is fully visible */
}

.bf-work-preview img,
.bf-work-preview video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.bf-work-row:hover .bf-work-preview {
  opacity: 1;
  transform: translateY(0);
}

html.bf-work-list-mode,
html.bf-work-list-mode body {
  height: auto !important;
  overflow: auto !important;
}

html.bf-work-list-mode .archive-taxonomy > .slider,
html.bf-work-list-mode .archive-taxonomy > .grid-layout {
  display: none !important;
}

html.bf-work-list-mode .bf-work-list {
  display: block;
}

html.bf-work-list-mode .cursor {
  display: none !important;
}

html.bf-work-list-mode .loader {
  display: none !important;
}

@media (max-width: 1023px) {
  body:not(.wp-admin) .header-logo-wrapper {
    width: 6rem !important;
    min-width: 6rem;
  }

  .bf-view-switch {
    top: calc(var(--header-height, 5.8rem) + 1rem);
    left: 1rem;
  }

  .bf-view-switch button {
    width: 4.2rem;
    height: 4.2rem;
  }

  .bf-work-list {
    padding: 11.8rem 1.4rem 5rem;
  }

  .bf-work-list-head {
    font-size: 0.9rem;
    grid-template-columns: 4.8rem minmax(0, 1fr) 2rem !important;
  }
  
  .bf-work-list-head span:nth-child(3),
  .bf-work-list-head span:nth-child(4) {
    display: none !important;
  }

  .bf-work-row {
    grid-template-columns: 4.8rem minmax(0, 1fr) 2rem;
    min-height: 7.2rem;
  }

  .bf-work-row-kind,
  .bf-work-row-cast {
    display: none !important;
  }

  .bf-work-row-title {
    font-size: clamp(2.1rem, 9vw, 4rem);
    padding-right: 1rem;
  }

  .bf-work-preview {
    display: none;
  }
}
