/* Office ideas: every photo of every office tour, by space and look. Colors, type and radii are the theme's tokens. */

.ol-ideas {
  padding-top: 8px;
  padding-bottom: 72px;
}

.ol-ideas__head {
  max-width: 760px;
  margin: 16px 0 28px;
}

.ol-ideas__title {
  margin: 0 0 10px;
  color: var(--ol-text);
  font-size: 40px;
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -.022em;
}

.ol-ideas__lead {
  margin: 0;
  color: var(--ol-text-2);
  font-size: 19px;
  line-height: 1.45;
  letter-spacing: -.012em;
}

/* Chips: spaces, then looks. On a phone they scroll sideways instead of wrapping into a block. */
.ol-chips {
  display: flex;
  gap: 8px;
  margin: 0 -15px;
  padding: 0 15px 2px;
  overflow-x: auto;
  scrollbar-width: none;
}

.ol-chips::-webkit-scrollbar {
  display: none;
}

.ol-chips--looks {
  margin-top: 16px;
}

/* Where the spaces fit one row, they stay put: a chip cut off at the edge looks like a mistake there, and a mouse can't swipe */
@media (min-width: 1080px) {
  .ol-chips {
    flex-wrap: wrap;
    margin-right: 0;
    margin-left: 0;
    padding: 0;
    overflow: visible;
  }
}

.ol-chip,
.ol-look {
  display: inline-flex;
  flex: none;
  align-items: center;
  height: 36px;
  padding: 0 16px;
  border-radius: var(--ol-radius-pill);
  background: var(--ol-surface);
  box-shadow: inset 0 0 0 1px var(--ol-separator);
  color: var(--ol-text);
  font: 500 15px var(--ol-font);
  letter-spacing: -.01em;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color .2s var(--ol-ease), color .2s var(--ol-ease);
}

.ol-chip:hover,
.ol-look:hover {
  background: var(--ol-fill-2);
  color: var(--ol-text);
}

.ol-chip.is-on {
  background: var(--ol-text);
  box-shadow: none;
  color: #fff;
}

.ol-chip.is-empty {
  opacity: .4;
  pointer-events: none;
}

.ol-look {
  height: 32px;
  padding: 0 14px;
  background: none;
  color: var(--ol-text-2);
  font-size: 14px;
}

.ol-look.is-on,
.ol-look.is-on:hover {
  background: var(--ol-accent-tint);
  box-shadow: inset 0 0 0 1px var(--ol-accent);
  color: var(--ol-accent);
}

/* Grid: photos keep their own proportions, like a mood board. Columns of CSS until ideas.js takes over. */
.ol-grid {
  columns: 4 220px;
  column-gap: 16px;
  margin-top: 28px;
  transition: opacity .2s var(--ol-ease);
}

.ol-grid.is-columns {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  columns: auto;
}

.ol-grid.is-loading {
  opacity: .4;
}

.ol-grid__col {
  flex: 1 1 0;
  min-width: 0;
}

.ol-tile {
  position: relative;
  overflow: hidden;
  margin: 0 0 16px;
  border-radius: var(--ol-radius);
  background: var(--ol-fill-2);
  break-inside: avoid;
  /* Own layer, so the scaled photo stays inside the rounded corners */
  transform: translateZ(0);
}

.ol-tile__link {
  display: block;
  cursor: zoom-in;
}

.ol-tile img {
  display: block;
  width: 100%;
  height: auto;
  transition: transform .6s var(--ol-ease-out);
}

.ol-tile__link::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 55%, rgba(0, 0, 0, .5) 100%);
  opacity: 0;
  transition: opacity .3s var(--ol-ease);
  pointer-events: none;
}

.ol-tile__meta {
  position: absolute;
  z-index: 1;
  right: 14px;
  bottom: 12px;
  left: 14px;
  color: rgba(255, 255, 255, .85);
  font-size: 13px;
  line-height: 1.35;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity .3s var(--ol-ease), transform .3s var(--ol-ease-out);
}

.ol-tile__meta b {
  display: block;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
}

.ol-save {
  position: absolute;
  z-index: 2;
  top: 12px;
  right: 12px;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, .28);
  box-shadow: inset 0 0 0 .5px rgba(255, 255, 255, .3);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  color: #fff;
  opacity: 0;
  cursor: pointer;
  transition: opacity .2s var(--ol-ease), background-color .2s var(--ol-ease);
}

.ol-save svg,
.ol-save-btn svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linejoin: round;
}

.ol-save.is-on svg,
.ol-save-btn.is-on svg {
  fill: currentColor;
}

.ol-tile:hover .ol-tile__link::after,
.ol-tile:hover .ol-tile__meta,
.ol-tile:hover .ol-save,
.ol-save:focus-visible,
.ol-save.is-on {
  opacity: 1;
}

.ol-tile:hover .ol-tile__meta {
  transform: none;
}

.ol-tile:hover img {
  transform: scale(1.03);
}

.ol-ideas__empty {
  margin: 40px 0;
  color: var(--ol-text-2);
  font-size: 17px;
}

/* Below the grid: where the next photos load; a small spinner while they do */
.ol-ideas__more {
  display: grid;
  place-items: center;
  height: 40px;
}

.ol-ideas__more.is-loading::before {
  content: '';
  width: 20px;
  height: 20px;
  border: 2px solid var(--ol-fill-2);
  border-top-color: var(--ol-text-3);
  border-radius: 50%;
  animation: ol-spin .8s linear infinite;
}

@keyframes ol-spin {
  to {
    transform: rotate(360deg);
  }
}

/* --- Lightbox ------------------------------------------------------------------------------------- */

.ol-lb-open {
  overflow: hidden;
}

.ol-lb {
  position: fixed;
  inset: 0;
  z-index: 100002;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  background: #111113;
  opacity: 0;
  visibility: hidden;
  transition: opacity .25s var(--ol-ease), visibility 0s .25s;
}

/* Visible at once, so the close button can take focus; hidden only once it has faded out */
.ol-lb.is-open {
  opacity: 1;
  visibility: visible;
  transition: opacity .25s var(--ol-ease);
}

/* Signing in to save a photo, and the note after it, come over the photo */
.ol-lb-open .ola-sheet {
  z-index: 100003;
}

.ol-lb-open .ola-toast {
  z-index: 100004;
}

.ol-lb__stage {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 0;
  padding: 40px 72px;
}

/* As large as the stage allows, whatever the size of the file shown so far */
.ol-lb__img {
  width: min(100%, calc((100vh - 80px) * var(--r, 1.5)));
  height: auto;
  aspect-ratio: var(--r, 1.5);
  object-fit: cover;
  border-radius: var(--ol-radius);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .5);
}

.ol-lb__nav,
.ol-lb__close {
  position: absolute;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .12);
  color: #fff;
  font: 300 30px/1 var(--ol-font);
  cursor: pointer;
  transition: background-color .2s var(--ol-ease);
}

.ol-lb__nav:hover,
.ol-lb__close:hover {
  background: rgba(255, 255, 255, .22);
}

.ol-lb__nav {
  top: 50%;
  margin-top: -22px;
  padding-bottom: 4px;
}

.ol-lb__nav--prev {
  left: 16px;
}

.ol-lb__nav--next {
  right: 16px;
}

.ol-lb__close {
  top: 16px;
  left: 16px;
  font-size: 26px;
}

.ol-lb__panel {
  overflow-y: auto;
  padding: 36px 28px;
  background: var(--ol-surface);
}

.ol-lb__space {
  margin: 0 0 8px;
  color: var(--ol-accent);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -.005em;
}

.ol-lb__title {
  margin: 0 0 10px;
  color: var(--ol-text);
  font-size: 24px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -.018em;
}

.ol-lb__meta {
  margin: 0 0 14px;
  color: var(--ol-text-2);
  font-size: 15px;
  line-height: 1.5;
}

.ol-lb__looks {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 22px;
}

.ol-lb__looks span {
  padding: 4px 10px;
  border-radius: var(--ol-radius-pill);
  background: var(--ol-fill);
  color: var(--ol-text-2);
  font-size: 13px;
}

.ol-lb__actions {
  display: flex;
  gap: 8px;
  margin: 0 0 32px;
}

.ol-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 40px;
  padding: 0 18px;
  border: 0;
  border-radius: var(--ol-radius-pill);
  background: var(--ol-fill);
  color: var(--ol-text);
  font: 600 15px var(--ol-font);
  letter-spacing: -.01em;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color .2s var(--ol-ease), color .2s var(--ol-ease);
}

.ol-btn:hover {
  background: var(--ol-fill-2);
  color: var(--ol-text);
}

.ol-btn--primary,
.ol-btn--primary:hover {
  flex: 1;
  background: var(--ol-accent);
  color: #fff;
}

.ol-btn--primary:hover {
  background: var(--ol-accent-hover);
}

.ol-save-btn.is-on,
.ol-save-btn.is-on:hover {
  background: var(--ol-accent-tint);
  color: var(--ol-accent);
}

.ol-lb__more {
  margin: 0 0 12px;
  color: var(--ol-text);
  font-size: 15px;
  font-weight: 600;
}

.ol-lb__like {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.ol-lb__like button {
  overflow: hidden;
  padding: 0;
  border: 0;
  border-radius: var(--ol-radius-sm);
  background: var(--ol-fill-2);
  aspect-ratio: 4 / 3;
  cursor: pointer;
}

.ol-lb__like img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s var(--ol-ease-out);
}

.ol-lb__like button:hover img {
  transform: scale(1.04);
}

/* Phones and tablets: the lightbox stacks the photo over its details */
@media (max-width: 900px) {
  .ol-lb {
    display: block;
    overflow-y: auto;
  }

  .ol-lb__stage {
    display: block;
    padding: 72px 16px 20px;
  }

  .ol-lb__img {
    display: block;
    width: 100%;
  }

  .ol-lb__nav {
    top: 16px;
    margin: 0;
  }

  .ol-lb__nav--prev {
    right: 68px;
    left: auto;
  }

  /* Above the photo's shadow, which would otherwise fall on it */
  .ol-lb__panel {
    position: relative;
    min-height: 50vh;
    padding: 28px 20px 40px;
    border-radius: 20px 20px 0 0;
  }
}

@media (max-width: 600px) {
  .ol-ideas__title {
    font-size: 30px;
  }

  .ol-ideas__lead {
    font-size: 17px;
  }

  .ol-grid {
    columns: 2;
    column-gap: 10px;
  }

  .ol-grid.is-columns {
    gap: 10px;
  }

  .ol-tile {
    margin-bottom: 10px;
    border-radius: var(--ol-radius-sm);
  }

  .ol-tile__meta {
    display: none;
  }
}
