 


/*-- tshirt design --*/


:root{
  --trans-dur: 0.3s
}


.noto-serif-scg-vf {
  font-family: "Noto Serif", serif;
  font-optical-sizing: auto;
}

.nunito-sans-scg-vf {
  font-family: "Nunito Sans", sans-serif;
  font-optical-sizing: auto;
}

.font-italic {
    font-style: italic;
}

#mobile-header{
  display:none;
}

main{
  display: grid;
  grid-template-columns: 24fr 1fr;
  grid-template-rows: auto;
  /* width: 130vh; */
  column-gap: 4px;
  margin-inline: auto;
  height: 100vh;
  flex: 1;
  overflow: hidden;
  max-width: 150vh;
}

#design-wrap{
  max-width: 100%;
  display: grid;
  grid-template-columns: 20fr 1fr 20fr;
  overflow: hidden;
}

#design-gap{
  background-color: var(--design-cont-bg);
  z-index: 99;
}

/* welcome overlay */

.welcome-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.welcome-content {
  background: var(--background);
  color: var(--text);
  padding: 2rem;
  border-radius: 8px;
  max-width: 500px;
  width: 90%;
  position: relative;
}

.welcome-content h2 {
  margin-bottom: 1rem;
}

.welcome-content ul {
  margin: 1.5rem 0;
  padding-left: 1.5rem;
}

.welcome-content li {
  margin: 0.5rem 0;
  list-style: none;
}

.welcome-buttons {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 1.5rem;
}

.primary-button {
  background: var(--primary-color);
  /* color: white; */
  padding: 0.75rem 1.5rem;
  border-radius: 4px;
  border: none;
  cursor: pointer;
}

.secondary-button {
  padding: 0.75rem 1.5rem;
}

/*======== left side of page ==========*/

#preview-container{
  position: relative;
  overflow: visible;
  width: 100%;
}

#fabric-name{
  position:absolute;
  top: 0;
  text-align: center;
  z-index: 1000;
  width: 100%;
  background-color: hsla(0,0%,100%, 0.5);
  color: black;
  opacity: 0.5;
}


#preview-window{
  width:100%;
  pointer-events: none;
  aspect-ratio: 1750/1600;
}

#preview-size-wrap{
  position: relative;
  color: #888;
}

#preview-area{
  position: relative;
  width:100%;
  left:0%;
  aspect-ratio: 1750/1600;
  pointer-events: none;
  overflow: hidden;
}

#tshirt-preview{
  z-index: 3;
  width: 100%;
  height: 100%;
  left: 0;
  top: 0;
  overflow: visible;
}

#print-area{
  opacity: 0.96;
  position: absolute;
  top: 25.8%;
  left: 31.1%;
  width: 37.8%;
  height: 47%;
  z-index: 4;
  margin:0;
  padding:0;
  pointer-events: none;
  transition: opacity 0.2s ease-out;
}

#image-canvas{
  position: absolute;
  width: 100%;
  aspect-ratio: 1;
  height: 97%;
  left: 0;
  top: 0;
  cursor: default;
  z-index: 6;
  pointer-events: all;
  transition:
    left var(--trans-dur),
    top var(--trans-dur),
    width var(--trans-dur),
    height var(--trans-dur);
}

#text-container{
  opacity: 0.5;
  position: absolute;
  width: 99.2%;
  left: 0.4%;
  top: 50%;
  text-align: center;
  z-index: 4;
  color:#ccc;
  padding: 0;
  /* margin: auto; */
  white-space: pre-wrap;
  line-height: 1.1;
  transition:
    top var(--trans-dur),
    opacity var(--trans-dur);
}

#text-measure-container{
  line-height: 1;
  width: 100%;
  position:absolute;
  left:-9999px;
  white-space: normal;

}

#qr-container {
  opacity: 0;
  position: absolute;
  top: 90%;
  left: 36.2%;
  width: 27.59%;
  height: 24.24%;
  z-index: 999;
  /* transition:
    top var(--trans-dur); */
}

#qr-container canvas {
  position: absolute;
  width: 100%;
  height: 100%;
  left: 0;
  top: 0;
  z-index: 999;
}

#qr-container img{
  width: 100%;
  height: 100%;
  z-index: 999;
}

#limited-series-container{
  opacity: 0;
  position: absolute;
  width: 100%;
  left: 0%;
  top: 96%;
  padding-top: 1%;
  text-align: center;
  z-index: 4;
  color:#ccc;
  font-family: "Anek Bangla", sans-serif;
  font-size: 8px;
  white-space: nowrap;
  overflow: hidden;
  line-height: 1;
  margin:0;
  font-variation-settings: "wdth" 120;
  transition:
    top var(--trans-dur),
    opacity var(--trans-dur);
}

/*========== right side of page ===========*/

#design-container{
  z-index: 1;
  max-height: 100%;
  width: 100%;
  padding-top: 0.5rem;
  background-color: var(--design-cont-bg);
}

#ui-container{
  position: relative;
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 150px);
  overflow-y: scroll;
  min-height: 100%;
  width: 100%;
}

#top-buttons{
  position: sticky;
  background-color: var(--background);
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 100;
  display: flex;
  justify-content: flex-end;
}

.menu{
  & button{
    padding:4px;
    margin: 0 0 3px 0;
    font-size: 0.8rem;
  }
}

.menu-item-inactive{
  pointer-events: none;
  opacity: 0.5;
}

#sub-menu{
  justify-content: center;
  padding-top: 2px;
  gap: 8px;
}

#forms-wrap{
  flex: 1;
  padding-top: 1rem;
  background-color: var(--content-bg);
  border-left: 1px solid var(--content-outline);
  border-right: 1px solid var(--content-outline);
}

.form-sub-header{
  font-size: 0.8rem;
  padding: 0 0.5rem 0.5rem 0.5rem;
  grid-column: span 2;
}

#design-name-wrap{
  display: grid;
  grid-template-columns: 3fr 6fr;
  & .label{
    text-align: right;
  }
}

/*---- color palette ------*/

#palette-wrap{
  /* display: grid;
  grid-template-columns: ;
  align-items: center; */
  width:90%;
  margin: 10px auto; 
}

#palette-header{
  margin-top: 0.5rem;
  margin-bottom: 10px;
  font-size: 1.1rem;
}

.fabric-info {
  display: flex;
  justify-content: center;
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  background: var(--lighter-content-bg);
  border-bottom: 1px solid var(--content-outline);
  margin-bottom: 0.5rem;
}
/* .fabric-info span {
  display: inline-flex;
  gap: 0.25rem;
} */

#swatch-grid {
  display: grid;
  grid-template-columns: repeat( 3, 22% 6% 5% );
  gap: 0;
  /* width:92%; */
  margin: 0;
  /* padding: 10px; */
  border-radius: var(--ui-radius);
  & inputwrap{
    text-align: center;
  }
  & input{
    opacity: 0.7;
    margin-top: 6px;
  }
}

#swatch-grid .name.primary {
  background-color: var(--btn-selected-bg);
  color: var(--input-text); 
}
.crown-in-btn{
  font-size: 1.3rem;
  opacity: 0;
}
.name-btn {
  all: unset;                     /* strip default button styles */
  cursor: pointer;
  margin: 0.3rem 0 0.1rem 0.1rem;
  padding-left: 0.2rem;
  font: inherit;
  border-top-left-radius: 24px;
  border-bottom-left-radius: 24px;
  font-size: 0.8rem;
  line-height: 0.8rem;
  white-space: nowrap;
  text-align: right;
  overflow: hidden;
}
.name-btn:hover {
  background-color: hsla(0,0%,0%,0.05);
}

.swatch {
  position: relative;
  width: 100%;
  padding-bottom: 100%;
  border-radius: 4px;
  cursor: pointer;
  border-radius: 50%;
  background-color: #272727;
}

.swatch.dont-use{
  cursor: default;
  background-color: transparent;
}

.fab-swatch{
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.color-dot{
  /* position: absolute; */
  top: 30%;
  left: 30%;
  /* transform: translate(-50%, -50%); */
  height: 40%;
  aspect-ratio: 1;
  max-width: 20px;
  max-height: 20px;
  pointer-events: none;
  border-radius: 50%;
  background-color: transparent;
}

/* input styles */

input[type=text]{
  max-width: none;
  width: 80%;
}

textarea{
  max-width: 80%;
}

input[type=range]{
  z-index: 99;
  border-radius: 0;
  width: 90%;
  margin-top: 0;
  opacity: 0.8;
}

input[type=number]{
  width: 30%;
  text-align: center !important;
}

input[type=range][class=pal-range] {
  writing-mode: vertical-lr;
  direction: rtl;
  vertical-align: middle;
  height: 90%;
}

/* fabric color selection */

#fab-col-swatch{
  width: 10%;
  margin: 3px;
  border-radius: 3px;
}

/* selected items box, used for included fabrics */

.selected-items-box{
  display: flex;
  flex-wrap: wrap;
  outline:1px solid var(--ui-outline);
  width: 90%;
  background-color: var(--input-bg);
  padding: 2px;
  margin: 8px auto;
  border-radius: 1.2rem;
  & .item{
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    height: 1.1rem;
    outline:1px solid var(--content-outline);
    /* background-color: var(--content-bg); */
    border-radius: 10px;
    margin: 0.1rem;
  }

  & .add-swatch, .remove{
    width: 1.1rem;
    height: 1.1rem;
    border-radius: 50%;
    margin: 0;
    border-color: transparent;
  }
  .remove{
    cursor: pointer;
    color:#a26565;
  }
  & .add-color-name{
    font-size: 0.9rem;
    color:#313132;
    margin: 0 6px;
  }
}

/* fabric picker at right */
#fabric-picker{
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  & .fab-swatch{
    display: flex;
    align-items: center;
    justify-content: space-evenly;
    /* height: 3.125%; */
    cursor: pointer;
  }
  & .fab-check{
    opacity: 0;
  }
  & .fab-dot{
    width: 8px;
    height: 8px;
    background-color: transparent;
    border-radius: 50%;
  }
  & .fab-crown{
    font-size: 1.3rem;
    opacity: 0;
  }
}

/* design title */

#design-title-wrap{
  display: flex;
  padding: 4px 24px;
  border-left: 1px solid var(--content-outline);
  border-right: 1px solid var(--content-outline);
  background-color: var(--content-bg);
}


/*----- image gallery ---------*/

/* image tag buttons */

#level1-tags, #level2-tags{
  margin-top: 12px;
}

.level1-tag{
  font-size: 0.8rem;
  background-color: #2e2e2e;
  border: 1px solid #bbb;
  border-radius: 0.5rem;
  color: #D9D9D9;
  cursor: pointer;
  line-height: 0.8rem;
  margin: 1px;
  padding: 7px;
}
.level1-tag.liked{
  color: red;
}

.tag-lev1-active{
  background-color: #575757;
  color: white
}

/*---- image library thumbnails ----*/

.library-thumbnail{
  border-radius: 12px;
  overflow: hidden;
  background-color: var(--current-fabric);
  transition: background-color 0.5s ease;
}

.library-thumbnail img{
  width: 100%;
  cursor: pointer;
  aspect-ratio: 1;
  animation: fadeIn 0.5s ease forwards;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.img_caption_label{
  margin-top: -3px;
  font-size: 0.8rem;
  background-color: var(--img-caption-bg);
}
.img_caption{
  font-size: 0.9rem;
  background-color: var(--img-caption-bg);
  padding-bottom: 2px;
  margin-bottom: 2px;
}

/* icons at bottom */

.img-tmb-info{
  display: flex;
  justify-content: space-evenly;
  gap: 2px;
  margin-bottom: 4px;
  user-select: none; 
  & div{
    flex: 1 1 0;
    background-color: var(--img-caption-bg);
  }
}

.rec_dark{
  color:#272727;
}

.transparent{
  background: url("/static/img/checkered.b5368f083ae4.png");
  background-size: contain;
  width: 32%;
  aspect-ratio: 1;
  border-radius: 50%;
  margin: 10% 30%;
  opacity: 0.7;
}

.colorize{
  background: url("/static/img/colorize.5941d26afc11.png");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  width: 60%;
  height: 100%;
  margin: auto;
}

.rec_fab{
  width: 60%;
  height: 100%;
  margin: auto;
}

.rec_any{
  background: url("/static/img/rec-col-any.05142a99f627.png");
  background-repeat: no-repeat;
  background-size: contain;
  background-position: center;
}

.rec_dark{
  background: url("/static/img/rec-col-dark.3de3e78ad7ad.png");
  background-repeat: no-repeat;
  background-size: contain;
  background-position: center;
}

.rec_light{
  background: url("/static/img/rec-col-light.7409a3ca82a4.png");
  background-repeat: no-repeat;
  background-size: contain;
  background-position: center;
}

.img_cost{
  padding-top: 3px;
}

.heart-icon {
  color: gray;
  cursor: pointer;
}
.heart-icon.liked {
  color: red;
}

/*----- designs list -----*/

.design-form-header{
  margin-top: 0.8rem;
}
.design-form-sub-header{
  font-size: 0.8rem;
  margin-top: 0.4rem;
}

#image-gallery, #designs-list{
  max-width: 100%;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(45%, 1fr));
  gap: 10px;
  padding: 10px 10px 500px 10px;
  margin: 1rem 0;
}

.design-thumbnail {
  max-width: 100%;
  padding: 0.3rem;
  position: relative;
  border-radius: 16px;
  border: 1px solid transparent;
  cursor: pointer;
  & .thumbnail-image-container {
    position: relative;
    aspect-ratio: 0.9;
  }
  & img{
    max-width: 100%;
    border-radius: 12px;
  }
  & .thumbnail-info {
    font-size: 0.9rem;
  }
  & p {
    text-align: center;
    padding: 0;
  }
  & .thumbnail-actions {
    display: flex;
    justify-content: center;
  }
  & button {
    margin: 4px;
    padding: 4px;
  }
}

.tn-selected{
  background-color: var(--design-tn-sel-bg);
}

.design-thumbnail:hover {
  border: 1px solid hsla( from var(--text) h s l / 0.5);
}

.action-buttons {
  display: none;
  position: absolute;
  top: 8px;
  right: 8px;
  flex-direction: column;
  gap: 8px;
}

.design-thumbnail:hover .action-buttons {
  display: flex;
}

.action-buttons button {
  padding: 4px;
  background: rgba(0, 0, 0, 0.7);
  border: none;
  border-radius: 4px;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s;
}

.action-buttons button:hover {
  background: rgba(0, 0, 0, 0.9);
}

.action-buttons .delete-btn:hover {
  background: rgba(220, 38, 38, 0.9);
}


/* upload thumbnail list */

/* .upload-thumbnail{ */
.upload-thumbnail{
  max-width: 90%;
  margin: 1rem auto;
  & .thumbnail-image-container{
    max-width: 80%;
    max-height: 80vw;
    margin: auto;
    cursor: pointer;
  }
  & img{
    max-width: 100%;
    max-height: 80vw;
  }

}


/* text ui */

#text-input{
  width: 50%;
  height:3rem;
  text-align: center;
}

/* qr-ui */

#qr-text{
  max-width: 100%;
  font-size: 1.1rem;
  margin-top: 0.5rem;
}

/* Saturation and Lightness Sliders - Matching Pickr Monolith Theme */

.scg-sl-sliders {
  margin-top: 0.5rem;
}

.scg-sl-picker {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.scg-sl-slider {
  position: relative;
  height: 16px;
  display: flex;
  align-items: center;
}

.scg-sl-slider-track {
  position: relative;
  width: 100%;
  height: 8px;
  border-radius: 50rem;
  cursor: pointer;
  overflow: visible;
}

/* Saturation gradient - will be updated dynamically with current hue */
.saturation-track {
  background: linear-gradient(to right, 
    hsl(0, 0%, 50%), 
    hsl(0, 100%, 50%)
  );
}

/* Lightness gradient - from black to white */
.lightness-track {
  background: linear-gradient(to right, 
    hsl(0, 0%, 0%), 
    hsl(0, 0%, 50%), 
    hsl(0, 0%, 100%)
  );
}

.scg-sl-slider-picker {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 16px;
  height: 16px;
  margin-left: -8px;
  margin-top: -8px;
  border: 2px solid #fff;
  border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.3), 0 2px 4px rgba(0, 0, 0, 0.3);
  cursor: grab;
  transition: transform 0.1s ease;
  z-index: 2;
}

.scg-sl-slider-picker:hover {
  transform: scale(1.1);
}

.scg-sl-slider-picker.dragging {
  cursor: grabbing;
  transform: scale(0.95);
}

/* Match Pickr's monolith theme spacing */
.pcr-selection .scg-sl-sliders {
  margin-top: 0.75rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .scg-sl-slider {
    height: 20px;
  }
  
  .scg-sl-slider-picker {
    width: 20px;
    height: 20px;
    margin-left: -10px;
    margin-top: -10px;
  }
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .scg-sl-slider {
    height: 20px;
  }
  
  .scg-sl-slider-picker {
    width: 20px;
    height: 20px;
    margin-left: -10px;
    margin-top: -10px;
  }
}

/*===== mobile =====*/

@media ( max-width: 700px) {

  #site-header {
    display: none;
    & .toggle-button{
      display: none;
    }
  }

  .page-wrap {
    /* padding-bottom: 1.5rem; */
    & footer{
      display: none;
    }
  }

  #design-gap{
    display: none;
  }

  main{
    grid-template-columns: 15fr;
    width: 100%;
    height: auto;
    overflow: visible;
    position: relative;
  }
  #design-wrap{
    grid-template-columns: 1fr;
    width: 100%;
  }

#tshirt-preview{
  position: absolute;
  z-index: 1;
}

#preview-container{
  width: 100%;
  position: relative;
  top: 0;
  background: var(--background);
  display: flex;
  flex-direction: column;
  left: 0;
  pointer-events: none;
}

#preview-size-wrap{
  position: absolute;
  top: 46vh;
  width: 100%;
  pointer-events: all;
}
#mobile-header {
  z-index: 99;
  pointer-events: all;
  flex: 0 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-left: 0.5rem;
  position: relative;
  background-color: hsla(0,0%,0%, 0.4);
  
  & .logo {
      width: 140px;
      height: 13px;
      opacity: 0.8;
    }
    .navbar-links{
      left: 0;
    }
    & .mobile-header-widgets{
      display:flex;
    }
    & .auth-icon{
      stroke: hsla(0,0%,100%, 0.6)
    }
    & .cart-widget{
      top: 7px;
    }
    & .cart-icon{
      stroke: hsla(0,0%,100%, 0.8)
    }
    & .auth-name{
      color: hsla(0,0%,100%, 0.6)
    }
  }

.toggle-button{
  display: none;
}

.design-toggle-button {
  display: flex;
  right: 0.5rem;    
  opacity: 0.6;
}

#design-container{
  width: 100%;
  pointer-events: none;
  top: 50vh;
  height: 50vh;
  position: absolute;
  pointer-events: none;
}

.menu{
  z-index: 99;
  width: 100%;
  position: absolute;
  pointer-events: all;
}

#sub-menu{
  top: 0;
  position: relative;
  width: 100%;
}
#ui-container {
  /* position: relative; */
  top: 28px;
  z-index: 100;
  width: 100%;
  pointer-events: all;
  padding-bottom: 100px;
  max-height: 40vh;
}
#forms-wrap{
  max-width: 100%;
  padding-bottom: 200px;
}
.form-section{
  width: 100%;
  margin: 0;
  padding: 0;
}
.form-header{
  padding: 0.5rem 0;
}
.form-field{
  /* grid-template-columns: auto auto; */
  padding: 1rem;
  & .left{
    font-size: 0.9rem;
  }
}

  input[type=number]{
    width: 6rem;
  }
  #fabric-picker {
    display: none;
    z-index: 999;
    position: fixed;
    bottom: 0;
    top: 0;
    right: 0;
    width: 6.666%;
  }

  #preview-window {
    flex: 1;
    pointer-events: none;
  }

  #preview-size-wrap .label{
    display: none;
  }

  #top-buttons{
    display:none;
    position: relative;
  }
}

/* color picker */

#color-picker-container {
  margin: 1rem 0;
  padding: 1rem;
  background: var(--lighter-content-bg);
  border-radius: 4px;
}

.pickr {
  width: 100%;
}

.pickr .pcr-button {
  width: 100%;
  height: 40px;
  border-radius: 4px;
}

.pcr-app {
  background: var(--content-bg);
  border-radius: 4px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.pcr-app[data-theme=monolith] {
  width: 90%;
  margin: auto;
}
.pcr-app[data-theme=monolith] .pcr-color-palette{
    height: 12em !important;
}

.pcr-app.monolith .pcr-interaction .pcr-result {
  background: var(--lighter-content-bg);
  color: var(--text-color);
}

.pcr-app.monolith .pcr-interaction .pcr-save {
  background: var(--accent-color);
}

.color-msg{
  font-size: 0.9rem;
  padding: 0.5rem;
}
