/* inspiration taken from http://spirare.js.org Coincidence? I think not!!!1!~1!~` */

.box
{
    float: left;
    position: relative;
    width: 20%;
    padding-bottom: 20%; /* cmon, couldn't I just use height: 20%? then I wouldn't need ALL of this.*/
}

.boxBig
{
    float: left;
    position: relative;
    width: 40%;
    padding-bottom: 20%;
}

.boxHuge
{
    float: left;
    position: relative;
    width: 60%;
    padding-bottom: 20%;
}

.childBox
{
    float: left;
    position: relative;
    width: 50%;
    padding-bottom: 50%;
}
/* temp */
/*.childBox .boxInner
{
    background-color: #00f;
}
.childBox .boxInner:hover
{
    background-color: #0f0;
}*/

.disablePadding
{
    padding: 0 !important;
}

.boxInner
{
    position: absolute;
    left: 5px;
    right: 5px;
    top: 5px;
    bottom: 5px;
    overflow: hidden;
    padding: 5px;
}

.boxInner > .title
{
    color: #fff;
    position: absolute;
    top: 0;
    left: 5px;
    font-size: 3.8em;
    transition: text-shadow 0.09s ease-in;
}
.childBox > .boxInner > .title
{
    font-size: 1.8em;
    word-break: break-all;
}

.boxInner:hover > .title
{
    text-shadow: 0 0 15px #000;
}

.boxInner .tileImage
{
    height: 100%;
}

.boxInner > .titleBox
{
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    margin-bottom: calc(-3em - 20px); /* TODO: Make height-dependent instead of hard value */
    background: rgba(0, 0, 0, 0.5);
    
    color: #fff;
    padding: 10px;
    text-align: center;
    font-weight: bold;

    transition: margin-bottom 0.3s ease-out;
}

.childBox .titleBox
{
    padding: 5px;
    margin-bottom: calc(-3em - 10px);
}

/*.boxInner .showoffTitle
{
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    margin-top: -2.6em;
    
    color: #08008C;
    font-weight: bold;
    font-size: 2.5em;
    text-align: center;
    text-shadow: -2px -2px rgba(255, 0, 0, 0.8);
    padding-top: 0.1em;
    
    background: linear-gradient(0deg, transparent, rgba(0, 0, 0, 0.2));
    
    transition: margin-top 0.2s ease-out;
}

.boxInner .showoffDescription
{
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    margin-bottom: -1.4em;
    
    color: #fff;
    font-size: 1.3em;
    text-align: center;
    line-height: 0.9em;
    padding-bottom: 0.5em;
    
    background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.5));
    
    transition: margin-bottom 0.2s ease-out;
}*/

.boxInner:hover > .titleBox/*, .boxInner:hover > .showoffTitle, .boxInner:hover > .showoffDescription*/
{
    margin: 0;
}

.boxLight > .boxInner
{
    background-color: rgba(113, 113, 113, 0.42);
}

.boxDisable > .boxInner
{
    background-color: transparent;
    padding: 0;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
}

.boxDisable > .boxInner > .titleBox
{
    display: none;
}

/****************
grid themes
****************/
.gridTheme0
{
    background-color: #A52A2A;
}
.gridTheme1
{
    background-color: #3B7B33;
}
.gridTheme2
{
    background-color: #810DFD;
}
.groupTile
{
    background-color: rgba(74, 27, 70, 0.62);
}

/* TODO: media breakpoints for larger tiles, check if size and stuff is correct */

/****************
media breakpoints
****************/
@media only screen and (max-width : 520px) {
  /* Smartphone view: 1 tile */
  .box {
    width: 100%;
    padding-bottom: 100%;
  }

  .boxBig {
    width: 100%;
    padding-bottom: 200%;
  }

  .boxHuge {
    width: 100%;
    padding-bottom: 300%;
  }
}


@media only screen and (max-width : 850px) and (min-width : 521px) {
  /* Tablet view: 2 tiles */
  .box {
    width: 50%;
    padding-bottom: 50%;
  }

  .boxBig {
    width: 100%;
    padding-bottom: 70%;
  }

  .boxHuge {
    width: 100%;
    padding-bottom: 100%;
  }
}

@media only screen and (min-width : 600px) and (max-width: 850px) {
  .boxBig {
    padding-bottom: 50%;
  }
}

@media only screen and (max-width : 1150px) and (min-width : 851px) {
  /* Small desktop / ipad view: 3 tiles */
  .box {
    width: 33.3%;
    padding-bottom: 33.3%;
  }

  .boxBig {
    width: 66.6%;
    padding-bottom: 33.3%;
  }

  .boxHuge {
    width: 100%;
    padding-bottom: 33.3%;
  }
}

@media only screen and (max-width : 1490px) and (min-width : 1151px) {
  /* Medium desktop: 4 tiles */
  .box {
    width: 25%;
    padding-bottom: 25%;
  }

  .boxBig {
    width: 50%;
    padding-bottom: 25%;
  }

  .boxHuge {
    width: 75%;
    padding-bottom: 25%;
  }
}

/* ... Default 5 tiles ... */

@media only screen and (min-width: 2560px) {
  /* Big monitors! Moar tiles! 6 of 'em! */
  .box {
    width: 16.6%;
    padding-bottom: 16.6%;
  }

  .boxBig {
    width: 33.2%;
    padding-bottom: 16.6%;
  }

  .boxHuge {
    width: 49.8%;
    padding-bottom: 16.6%;
  }
}