html {
  box-sizing: border-box;
  font-family: "Montserrat";
  font-size: 16px;
}

*, *::before, *::after {
    box-sizing: inherit;
}

body {
  position: fixed;
  margin: 0;
  width: 100%;
  height: 100%;
  font-size: 1em;
}

a {
    text-decoration: none;
}
  
div {
  padding: 0px;
}

h2 {
    margin-top: 0;
    margin-bottom: 0.0rem;
    display: flex;
}

input {
  outline: none;
  border: none;
  margin: 0;
  padding: 0;
  min-width: 60px;
  width: 100%;
  font-family: inherit;
  font-size: inherit;
}

select {
  border: none;
  height: 25px;
}

.no-wrap {
  white-space: nowrap;
}

.blur {
    filter: blur(5px);
    transition: filter 0.3s ease; /* Smooth transition */
}

.align-right {
  text-align: right;
}

.non-selectable {
  user-select: none;
}

/* Style the tab */
.tab {
  border: 1px solid #ccc;
  background-color: #f1f1f1;
  position: relative;
  box-shadow: 0px 6px 6px rgba(0, 0, 0, 0.5);

}

/* Style the buttons inside the tab */
.tab button {
  background-color: inherit;
  float: left;
  border: none;
  outline: none;
  cursor: pointer;
  padding: 10px 12px;
  transition: 0.3s;
  font-size: 1.1em;
}

/* Change background color of buttons on hover */
.tab button:hover {
  background-color: #ddd;
}

/* Create an active/current tablink class */
.tab button.active {
  background-color: #ccc;
}

/* Style the tab content */
.tabcontent {
  display: none;
  padding: 6px 12px;
  border: 1px solid #ccc;
  border-top: none;
  height: 100%;
  overflow-y: scroll;
}

/* used to store invisible html content */
.templates {
  display: none;
}

.gray {
  background-color: #ccc;
}

.red {
  background-color: red;
}

.green {
  background-color: green;
  width: auto;
  height: auto;
}

.blue {
  background-color: blue;
}

.border {
  border: 1px solid black;
}

.ml5 {
  margin-left: 5px;
}

.ml10 {
  margin-left: 10px;
}

.ml20 {
  margin-left: 20px;
}

.mr5 {
  margin-right: 10px;
}

.mr10 {
  margin-right: 10px;
}

.mr20 {
  margin-right: 20px;
}

.catalog-btn {
    position: absolute;
}

.catalog-btn, .cart-panel-btn, .cart-action-btn {
  display: flex;
  width: min-content;
  align-items: center;
}

.cart-panel-btn {
    visibility: hidden;
}

/*
custom tooltip
.cart-action-btn::before {
    position: absolute;
    content: 'asd';
    height: 50px;
    width: 50px;
    background-color: black;
    transform: translateX(-50%) translateY(-100%);
}
*/

.catalog {
  position: absolute;
  display: grid;
  grid-template-columns: 1fr;
  /*grid-template-rows: min-content 1fr min-content;*/
  top: 50px;
  bottom: 0;
  width: max-content;
  max-width: 50vw;
  background-color: #aaa;
  box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.5);
  animation-duration: 0.5s;
  animation-fill-mode: forwards;
  border-radius: 3px;
  z-index: 999;
  padding: 10px;
  overflow-y: scroll;
}

.catalog .items {
    display: grid;
    grid-template-columns: 1fr;
    row-gap: 10px;
}

.catalog .catalogItem {
    display: grid;
    grid-template-columns: min-content 1fr;
    column-gap: 10px;
    align-items: center;
    user-select: none;
}

.catalog .catalogItem:hover {
    background-color: #bbb;
}  

.slide-in-animation {
  animation-name: slideInAnimation;
}

.slide-out-animation {
  animation-name: slideOutAnimation;
}

@keyframes slideInAnimation {
  0% { left: -60vw; }
  100% { left: 0; }
}

@keyframes slideOutAnimation {
  0% { left: 0 }
  100% { left: -60vw; }
}

.grid-main {
  display: grid;
  height: 100vh;
  grid-template-columns: 1.5fr 1fr;
  grid-template-rows: 1fr min-content;
}

.grid-main-header, .grid-main-footer {
    grid-column: 1 / 3;
    grid-row: 2 / 3;
  position: relative;
  display: grid;
  grid-column: span 2;
}

.unity-designer {
    grid-column: 1 / 2;
    grid-row: 1 / 2;
    width: 100%;
    height: 100%;
    background-color: gray;
    overflow: hidden;
}

.user-interface {
    grid-column: 2 / 3;
    grid-row: 1 / 2;
    height: auto;
    overflow: hidden;
    display: grid;
    grid-template-rows: auto 1fr;
}

.justify-center {
  justify-content: center;
}

.justify-space-between {
  justify-content: space-between;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 10px;
  row-gap: 10px;
  align-items: center;
}

.grid-3 {
  display: grid;
  grid-template-columns: auto 1fr auto;
  row-gap: 0px;
  align-items: center;
}

.grid-1 {
  display: grid;
  grid-template-columns: auto;
  max-width: max-content;
  width: auto;
}

.grid-1-2 {
  display: grid;
  grid-template-columns: auto;
  grid-template-rows: auto auto;
  row-gap: 5px;
  max-width: max-content;
  width: auto;

  /*margin-right: 5px;*/
}

.grid-4-1 {
  display: grid;
  grid-template-columns: repeat(4, auto);
  column-gap: 5px;
  max-width: max-content;
  width: auto;
}

.grid-6-1 {
  display: grid;
  grid-template-columns: repeat(6, auto);
  column-gap: 5px;
  max-width: max-content;
  width: auto;
  height: auto;
}

img.thumbnail {
  width: 3.6rem;
  height: 3.6rem;
  border: 1px solid black;
}

.flex {
  display: flex;
}

.flex-center {
  display: flex;
  align-items: center;
}

.gap05rem {
    gap: 0.5rem;
}

.pad3 {
  padding: 3px;
}

.pad10 {
  padding: 10px;
}

.pad05em {
    padding: 0.5em;
  }

.pad05rem {
    padding: 0.5rem;
}
    
.pad1em {
    padding: 1em;
}

.pad1rem {
    padding: 1rem;
}

.add-slot-btn, .trash-btn {
  padding-top: 5px;
  border-radius: 3px;
  border: none;
  background: none;
  color: black;
}

.add-slot-btn:hover, .trash-btn:hover {
  background-color: black;
  color: white;
  cursor: pointer;
}

.add-slot-btn {
  margin-left: 5px;
  margin-bottom: 5px;
}

/* cabName group */

.cabinetName {
    display: grid;
    grid-template-columns: 1fr;
    row-gap: 0.5em;
  background-color: #ccc;
  margin-top: 10px;
  padding: 10px;
  border-radius: 5px;
}

.cabinetName .card-1 {
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
}

.cabinetName input {
  padding: 3px;
}

/* dimensions group */
.dimensions {
    display: grid;
    grid-template-columns: 1fr;
    row-gap: 0.5em;
  background-color: #ccc;
  padding: 10px;
  margin-top: 10px;
  overflow: hidden;
  border-radius: 5px;
}

.dimensions .content {
  display: grid;
  grid-template-columns: 1fr;
  row-gap: 10px;
  align-items: center;
}

.dimensions .card-3 {
  display: grid;
  grid-template-columns: repeat(3, min-content);
  column-gap: 10px;
  align-items: center;
  background: #aaa;
  padding: 5px;
}

.dimensions .flex-wrap {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    background: #aaa;
    padding: 5px;
  }
 

.dimensions .card-6 {
  display: grid;
  grid-template-columns: auto 1fr auto 1fr auto 1fr;
  column-gap: 10px;
  align-items: center;
  background: #aaa;
  padding: 5px;
}

.dimensions .card-9 {
  display: grid;
  grid-template-columns: repeat(9, min-content);
  column-gap: 10px;
  align-items: center;
  background: #aaa;
  padding: 5px;
}

.dimensions span {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.dimensions input {
  padding: 3px;
}

/* decor group */
#material {
  height: 100%;
  overflow-y: scroll;
}

.decor {
  background-color: #ccc;
  margin-top: 10px;
  padding: 10px;
  border-radius: 5px;
}

.decor .content {
  height: 100%;
}

.decor .card-2 {
  display: grid;
  grid-template-columns: min-content 1fr;
  column-gap: 5px;
  row-gap: 5px;
  align-items: center;
  background: #aaa;
  padding: 5px;
}

.decor .card-3 {
  display: grid;
  grid-template-columns: 3.6rem 1fr min-content; /*3.6 rem is the same as the thumbnail width/height */
  column-gap: 5px;
  row-gap: 5px;
  align-items: center;
  background: #aaa;
  padding: 5px;
}

.outer-container {
    background-color: #aaa;
    overflow: hidden;
}

.duplung-btn {
    cursor: pointer;
}

#configuration {
  height: 100%;
  overflow-y: scroll;
}

/* zones group */
.zone-title {
  background-color: #aaa !important;
  border-radius: 5px 5px 0px 0px;
  padding: 8px;
  font-size: 0.8em;
  font-weight: bold;
  display: inline;
}

.zone-title2 {
  background-color: #aaa !important;
  border-radius: 5px;
  padding: 8px;
  font-size: 0.8em;
  font-weight: bold;
  display: inline;
}

.zones {
    display: grid;
    grid-template-columns: 1fr;
    row-gap: 1em;
  background-color: #ccc;
  margin-top: 10px;
  padding: 10px;
  border-radius: 5px;
}

.zones.hidden {
  display: none;
}

.zones .content {
  display: grid;
  grid-template-columns: 1fr;
  row-gap: 10px;
  align-items: center;
}

.zones span {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.zones label {
  padding: 3px;
}

.zones input {
  padding: 3px;
}

.zones .card-3 {
  display: grid;
  grid-template-columns: 40% 1fr min-content;
  column-gap: 5px;
  align-items: center;
}

.zones .card-2 {
  display: grid;
  grid-template-columns: 40% 1fr;
  column-gap: 5px;
  row-gap: 5px;
  align-items: center;
  background: #aaa;
  padding: 5px;
}

.zones .card-3-2 {
  display: grid;
  grid-template-columns: 40% 1fr min-content;
  row-gap: 5px;
  column-gap: 5px;
  align-items: center;
}

.zones .card-2-2 {
  display: grid;
  grid-template-columns: 40% 1fr;
  row-gap: 5px;
  column-gap: 5px;
  align-items: center;
  background: #aaa;
  padding: 5px;
}

.zones .span2 {
  grid-column: span 2;
}

.zones .input-and-unit {
  display: grid;
  grid-template-columns: 1fr min-content;
  column-gap: 5px;
  align-items: center;
}

.zones .grid-3 {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
}

.zones .grid-2 {
  display: grid;
  grid-template-columns: min-content 1fr;
  align-items: center;
}

/* cart section */

/* mobile device cart panel is not visible on desktop */
.cart-panel-mobile {
  display: none;
}

.cart-panel {
  position: absolute;
  left: 0;
  right: 0;
  background-color: #aaa;
  height: 25vh;
  --inverseCartPanelHeight: calc(-25vh + 30px);

  max-height: 80vh;

  animation-duration: 0.5s;
  animation-fill-mode: forwards;

  display: grid;
  grid-template-rows: auto 1fr;

  animation-name: cartPanelSlideOutAnim;
}

.cart-panel-slide-in {
  animation-name: cartPanelSlideInAnim;
  box-shadow: 0px -6px 6px rgba(0, 0, 0, 0.5);
}

.cart-panel-slide-out {
    animation-name: cartPanelSlideOutAnim;
}

@keyframes cartPanelSlideInAnim {
  0% { bottom: var(--inverseCartPanelHeight); }
  100% { bottom: 0; }
}

@keyframes cartPanelSlideOutAnim {
  0% { bottom: 0; }
  100% { bottom: var(--inverseCartPanelHeight); }
}

.cart-panel .title {
  display: grid;
  grid-template-columns: 1fr min-content;
  align-items: center;
}

.cart-panel .content {
  height: auto;
  overflow-y: scroll;
}

.cart-panel .content .table {
  display: grid;
  grid-template-columns: 1fr 2fr 1fr 1fr 1fr 1fr 1fr;
  grid-template-rows: min-content;
  row-gap: 1px;
}

.cart-panel .content .table h3 {
  margin: 0;
  padding: 5px 0 5px 0;
  text-transform: uppercase;
  background-color: #ccc;
  width: 100%;
}

.cart-panel .content .table span {
  background-color: #ccc;
}

.cart-panel .content .table div ul li {
  background-color: #ccc;
}

.cart-panel .content .table div {
  background-color: #ccc;
}

.cart-panel .content .table label.disabled {
  opacity: 0.25;
  cursor: not-allowed;
}

/* have this at the very end because of cascading */
.hidden {
  display: none !important;
}

#debug {
    position: absolute;
    top: 0;
    right: 0;
    background-color: white;
    padding: 5px;
    z-index: 999;
    font-size:x-small;
}

.fake-cart-header {
    display: none;
}

/*@media (max-width: 1200px) {*/
@media screen and (orientation: portrait) {

    body {
        position: unset;
        font-size: 1em;
    }

    .grid-main {
        display: block;
    }

    .unity-designer {
        width: 100%;
        height: 50vh;
    }

    .user-interface {
        width: 100%;
        height: auto;
        overflow: visible;
        position: relative;
    }

    .grid-main-footer {
        display: block;
        height: auto;
        position: relative;
        background-color: yellow;
    }

    .tab {
        position: sticky;
        top: 0;
        left: 0;
    }
    .tab button {
        font-size: 0.8em;
    }

    img.thumbnail {
        width: 40px;
        height: 40px;
    }

    .cart-panel, .cart-panel-btn {
        display: none;
    }

    .cart-panel-mobile {
        display: grid;
        grid-template-columns: 1fr;
        row-gap: 1em;
        background-color: #aaa;
    }

    .cart-panel-mobile .content .list {
        display: grid;
        grid-template-columns: 1fr;
        background-color: #aaa;
        column-gap: 1rem;
        row-gap: 0.4em;
    }


    .cart-panel-mobile .content .table {
        display: grid;
        grid-template-columns: min-content 1fr;
        background-color: #aaa;
        column-gap: 1rem;
        row-gap: 0.4em;
    }

    .cart-panel-mobile .content .list {
        display: grid;
        grid-template-columns: 1fr;
        background-color: #aaa;
        column-gap: 1rem;
        row-gap: 0.4em;
    }

    .cart-panel-mobile .content .list .card-2 { 
        display: grid;
        grid-template-columns: min-content 1fr;
        background-color: #999;
        column-gap: 1rem;
        row-gap: 0.4em;
        padding: 0.5em;
    }

    .cart-panel-mobile .summary {
        display: grid;
        grid-template-columns: 1fr;
        background-color: #aaa;
        column-gap: 1rem;
        row-gap: 0.4em;
    }

    .cart-header {
        display: none;
        position: sticky;
        bottom: 0;
        background-color: yellow;
    }

    .cart-panel-mobile .title {
        overflow: visible;
    }

    .cart-panel .content {
        overflow: visible;
    }

    /*
    .grid-main-footer {
        position: sticky;
        bottom: 0;
    }*/


    #configuration {
        overflow: visible;
    }

    #material {
        overflow: visible;
    }


    .dimensions .flex-wrap {
        display: flex;
        flex-wrap: wrap;
        justify-content: flex-start;
        background: #aaa;
        padding: 5px;
      }
    



}
