/*
 * This is a manifest file that'll be compiled into application.css, which will include all the files
 * listed below.
 *
 * Any CSS (and SCSS, if configured) file within this directory, lib/assets/stylesheets, or any plugin's
 * vendor/assets/stylesheets directory can be referenced here using a relative path.
 *
 * You're free to add application-wide styles to this file and they'll appear at the bottom of the
 * compiled file so the styles you add here take precedence over styles defined in any other CSS
 * files in this directory. Styles in this file should be added after the last require_* statement.
 * It is generally better to create a new file per style scope.
 *
 *= require_tree .
 *= require_self
 */

 *, *:before, *:after{
  box-sizing: border-box;
 }


 html, body{
  margin: 0;
  padding: 0;
 }

 button, .btn {
  display: inline-block;
  border: 2px solid cornflowerblue;
  background: cornflowerblue;
  padding: 0.5rem 1rem;
  color: white;
  margin: 0.5rem 0;
  text-decoration: none;
  text-transform: uppercase;
  font-weight: bold;

  &:hover{
    background: white;
    color: cornflowerblue;
  }
 }

table{
  width: 100%;
  border-collapse: collapse;
  margin: 0.5rem 0;

  & thead tr{
    border-bottom: 2px solid black;
  }

  & tbody tr:nth-child(2n){
    background: #eee;
  }

  & th, & td{
    padding: 1rem;
    text-align: left;
  }

  & th{
    background: black;
    color: white;
  }

  
}

.input{
  & label{
    display: block;
    font-weight: bold;
  }

  & input:not([type=file]) {
    width: 100%;
    border: 2px solid #eee;
    padding: 0.5rem 0.75rem;
  }
}

.scene-form{
  display: grid;
  grid-template-columns: 1fr 400px;
  height: 100%
}

.scene-options{
  background: #ddd;
  padding: 1rem;
}

.scene-preview{
  background: black;
  position: relative;
}

.layer-fields {
  padding: 0.5rem;
  border-bottom: 1px solid black;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;

  .file{
    input{
      display: none;
    }
    label{
      display: block;
      background: cornflowerblue;
      color: white;
      padding: 0.5rem 0.75rem;
      cursor: pointer;
      border: 2px solid cornflowerblue;

      &:hover{
        background: white;
        color: cornflowerblue;
      }
    }
  }
  
}

.scene-preview--layer{
  position: absolute;
  top: 0;
  left: 0;
  inset: 0;

  background-position: center;
  background-size: contain;
  background-repeat: no-repeat;
  overflow: hidden;
  & video{
    height: 100%;
    filter: chroma(color=#0000ff);
  }
}

.shift-stack{
  font-size: 1.5rem;
  font-weight: bold;
  display: grid;

  .shift-up, .shift-down{
    font-weight: bold;
    padding: 0.5rem 0.75rem;
    cursor: pointer;
    &:hover{
      background-color: #ccc;
    }
  }
}


.scenes-grid{
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1rem;
  padding: 0.5rem;
}

.scene-box{
  background: #eee;
  border: 1px solid black;
  display: grid;
}

.scene-preview{
  min-height: 200px;
  background: black;
}

.scene-buttons{
  padding: 1rem;
}

.viewer-background{
  background: black;
}

.viewer{
  background: black;
  position: fixed;
  inset: 0;
  height: 100%;
  width: 100%;
  overflow: hidden;
  opacity: 0;
  transition: opacity 2.5s ease-in-out;
}

.viewer.show{
  opacity: 1;
}

.view-scene-layer{
  position: absolute;
  height: 100%;
  width: 100%;
  inset: 0;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  & video{
    width: 100%;
  }
}

