.lightbox {
  border: none;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  padding: 0.2rem;
  margin: auto;
  background: transparent;

  /* Initial state - hidden */
  opacity: 0;
  transition: opacity 0.4s ease;
  display: none;

  color: white;

  turbo-frame {
    width: 100%;
    height: 100%;
    flex-direction: column;
    display: flex;
  }

  a {
    color: inherit;
  }

  ._close-button {
    position: absolute;
    top: 0.3rem;
    right: 0.3rem;
    font-size: 19px;
    color: black;
    border: 1px solid white;
    background: white;
    font-weight: bold;
    display: flex;
    border-radius: 100%;
    justify-content: center;
    align-items: center;
    width: 30px;
    height: 30px;
  }

  header {
    flex-shrink: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.2rem 1rem;
    color: white;
    border-bottom: 1px solid white;

    ._title {
      font-weight: bold;
    }

    ._meta {
      color: rba(1,1,1,0.6);
    }
  }

  main {
    flex: 1;
    display: flex;
    overflow: hidden;
    justify-content: center;

    mux-player, iframe {
      width: 100%;
      height: 100%;
    }

    img {
      max-height: 100%;
      max-width: 100%;
    }
  }
}

.lightbox.show {
  opacity: 1;
  display: flex;
}

.lightbox::backdrop {
  background: rgba(0,0,0,0);
  transition: background 0.3s ease;
}

.lightbox.show::backdrop {
  background: rgba(0,0,0,0.9);
}
