html, body {
    height: 100%;
    -webkit-text-size-adjust: 100%;

}
body {
    margin: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f2f2f2;
}


.main-content {
    display: flex;
    height: 100vh; 
    overflow: hidden;
}

.main-container{
    /* overflow: hidden; */
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;   
    min-width: 0
}

.main-content body,
.main-content html {
    overflow: hidden;
}

#canvas-wrapper {
    position: relative;
    z-index: 1;
    overflow: hidden;
    width: 100%;
    height: 100dvh; 
    z-index: 1;
    /* background: #c4c4c4; */
    border-radius: 8px;
    /* overflow: hidden; */
    /* display: flex; */
    padding: 40px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    /* min-height: 0;
    min-width: 0; */
}


canvas {
    max-width: 100%;
    max-height: 100%;
    display: block;
    margin-bottom: 10px;
    /* border: 1px solid #ccc; */
    position: relative;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    cursor: grab;
}


#canvas:active {
    cursor: grabbing;
}


#drag-3d-preview {
    display: none;
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    border-radius: 8px;
    cursor: none;
    transition: transform 20ms linear;
    will-change: transform;
    image-rendering: auto; 
    border: none;
    top: 0;
    left: 0;
    transform: translate(0, 0);
}


#user-option {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: clamp(0.85rem, 1.5vw, 1rem);
    color: #666;
    font-style: italic;
    user-select: none;
    flex-shrink: 1;  /* Allow it to shrink */
}

#upload-nav-bar span {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: clamp(0.8rem, 1.2vw, 0.9rem);
    /* color: #666; */
    font-style: italic;
    user-select: none;
    /* white-space: nowrap; */
    white-space: normal;     /* KEY CHANGE */
    flex-shrink: 1;          /* allow shrinking */
    min-width: 0;  
}
#upload-nav-bar .btn-primary {
    font-size: clamp(0.8rem, 1vw, 15px);
    padding: 4px 8px;
    white-space: nowrap;
    flex-shrink: 0;
  
}

#title {
    text-align: center;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 3rem;       
    font-weight: 700;
    color: #2c3e50;          
    margin-bottom: 1rem;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.1); 
    letter-spacing: 2px;      
    user-select: none; 
    margin-top: 0px;      
}

/* START OF SLAB THUMBNAILS */
/* TOP SECTION */
.logo-img {
    /* max-width: 60%; */
    display: none;
    max-width: clamp(50%, 60%, 70%);  
    height: auto;
}
.logo-img2 {
    /* max-width: 60%; */
    max-width: clamp(50%, 60%, 70%);  
    height: auto;
}
/* Do not Display for noe*/
.top-section-options{
    display: flex;
    justify-content: space-around;
    display: none;
}

.top-section-options button{
    padding: clamp(0.4em, 0.6vw, 0.7em);
    background-color: white;
    border: 1px solid;
    border-radius: 5px;
    cursor: pointer;
    font-size: clamp(0.75rem, 0.85vw, 0.9rem);
    max-width: 100% ;
}
.top-section-options button:hover {
    background-color: rgb(233, 233, 233);
}

/* END TOP SECTION */
.thumbnails {
    min-width: 250px !important;
    width: clamp(250px, 25vw, 360px);
    /* max-width: 10rem !important; */
    height: 100vh !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    background: #ffffff;
    border-right: 1px solid #e0e0e0;
    flex-shrink: 0 !important;
    position: relative;
}

#slab-thumbnails {
    display: flex !important;
    flex-direction: column !important;
    padding: 16px !important;
    gap: 16px !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

/* EACH CARD WRAPPER */
.slab-card-wrapper {
    width: 100% !important;
    display: block !important;
    flex-shrink: 0 !important;
}

.slab-card {
    position: relative;
    display: flex;
    width: 100% !important;
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    /* gap: 2em; */
    gap: clamp(0.5em, 1.5vw, 2em);
    overflow: hidden;
    cursor: pointer;
    transition: box-shadow 0.2s, transform 0.2s;
    box-sizing: border-box;
}

.slab-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.12);
}

.slab-thumbnail {
  position: relative;
  max-width: 50%;
  height: 10em;
  overflow: hidden;
  background: #f2f2f2;
  border-radius: 10px;
}

.slab-img{
  width: 100%;
  /* height: 100%; */
  height: clamp(7em, 100%, 100%);
  /* height: auto; */
  overflow: hidden;
  object-fit: cover;
  display: block;
}

.slab-info {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  flex: 1;
}

.brand {
  font-size: clamp(0.65rem, 0.7vw, 0.75rem);
  color: #777;
  font-weight: 500;
}

.name {
  font-size: clamp(0.8rem, 0.9vw, 0.95rem);
  font-weight: 600;
  color: #222;
  line-height: 1.2;
}

.size {
  font-size: clamp(0.65rem, 0.7vw, 0.75rem);
  color: #666;
}

.apply-btn {
  align-self: flex-start;
  /* padding: 6px 12px;
  font-size: 0.75rem; */
  padding: clamp(4px, 0.5vw, 6px) clamp(8px, 1vw, 12px);
  font-size: clamp(0.65rem, 0.7vw, 0.75rem);
  color: #666;
  background: white;
  cursor: pointer;
  border: none;
}

.apply-btn:hover {
  color: rgb(71, 71, 71);
}

#user-slabs-container{
    width: 80%;
    overflow: hidden;
    display: none; /* Temporary */
}
#user-generated-thumbnails {
    display: flex;
    /* flex-wrap: wrap; */
    /* justify-content: center; */
    gap: 10px;
    overflow-x: hidden;
    padding: 10px;
    box-sizing: border-box;
    border: 1px solid #ccc;
}

.user-generated-slabs {
    /* width: 100px; */
    cursor: pointer;
    border: 2px solid #ccc;
    text-align: center;
    background: #f9f9f9;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    transition: box-shadow 0.3s ease, transform 0.3s ease;
    border-radius: 10px;
}


.user-generated-slabs img {
    max-width: 100%;
    /* height: 100%; */
    height: 100%;
    /* min-height: 100%; */
    border-radius: 10px;
    object-fit: cover;
}

.user-generated-slabs:hover {
  box-shadow: 0 8px 20px rgba(0,0,0,0.25);
  transform: translateY(-1px);
}

/* END OF SLAB THUMBNAILS*/

#chat-container {
    position: fixed;
    bottom: 20px;
    right: 10px;
    max-width: 400px;
    min-width: 20px;
    margin-left: 10px 10px;
    border: 1px solid #ccc;
    padding: 10px;
    font-family: Arial, sans-serif;
    min-height: 30vh;
    display: flex;
    flex-direction: column;
    justify-content: flex-end; 
    max-height: 55vh;    
    overflow-x: hidden;
    z-index: 1000; 
    background-color: #f2f2f2;
    display: none;
}

#chat-messages {
    flex-grow: 1;
    max-height: 30vh;
    border: 1px solid #ddd; 
    padding: 10px;
    background: #f9f9f9;
    overflow-y: auto;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

#chat-form {
    margin-top: 10px;
    display: flex;
}

#chat-input {
    flex-grow: 1;
    padding: 8px;
    font-size: 16px;
}

#submit {
    margin-left: 5px;
    background-color: #2c3e50;      
    color: #ecf0f1;                  /* Light gray text */
    font-weight: 600;
    font-size: 1rem;
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    box-shadow: 0 4px 8px rgba(44, 62, 80, 0.4);
    cursor: pointer;
    transition: background-color 0.3s ease, box-shadow 0.3s ease, transform 0.15s ease;
    user-select: none;
    letter-spacing: 0.04em;
}

#chat-toggle {
    position: absolute;
    top: 1px;
    left: 5px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 20px;
    z-index: 1100;
}


#user-generated-slabs {
    display: grid;
    flex-direction: column;
    grid-template-columns: repeat(auto-fill,100px);
    max-height: calc(120px *5 + 80px);
    min-width: 200px;
    overflow-x: hidden;
    overflow-x: hidden;
    gap: 10px;
    padding: 10px;
    border: 1px solid #ccc;
}

.disclaimer-text {
  max-height: 0;           /* hidden */
  overflow: hidden;        /* hide content */
  opacity: 0;              /* fade out */
  transition: all 0.3s ease-in-out;
  font-style: italic;
  font-family: sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: #111;
  margin-top: 15px;
  padding: 0 10px;         /* start with no padding */
  background-color: #f9f9f9;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  /* position: absolute; */
  z-index: 20;
  max-width: 50%;
  /* Center on screen */
  position: fixed;
  top: 50%;
  left: 55%;
  transform: translate(-50%, -50%); /* perfectly center */
  /* display: none; */
}

/* Close button */
.disclaimer-close-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  background: #000;
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  cursor: pointer;
  font-size: 18px;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}

.disclaimer-close-btn:hover {
  background: #444;
}

/* When visible */
.disclaimer-text.visible {
  max-height: 1000px;      /* enough to show content */
  opacity: 1;
  padding: 10px;           /* restore padding */
}
.remove-slab-btn {
  position: absolute;
  top: 4px;
  right: 4px;
  background: rgba(255, 255, 255, 0.9);
  border: none;
  color: #b00020;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  padding: 0;
  width: 18px;
  height: 18px;
  line-height: 18px;
  text-align: center;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
  display: none;
  transition: background-color 0.3s ease, color 0.3s ease;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  user-select: none;
}

.user-generated-slabs {
  position: relative; /* necessary for absolute positioning of button */
}

.user-generated-slabs:hover .remove-slab-btn {
  display: flex;
  align-items: center;
  justify-content: center;
}

.remove-slab-btn:hover {
  background-color: #b00020;
  color: white;
  box-shadow: 0 0 8px #b00020;
}


#upload-label {
    font-size: 20px;
    cursor: pointer;
    padding: 4px 8px;
    user-select: none;
    transition: transform 0.2s ease;
}

#upload-label:hover {
    transform: scale(1.2);
}

#slab-thumbnails {
    display: flex;
    flex-direction: row;
}

.transform {
  position: absolute;
  top: 4px;
  right: 4px;
  background: rgba(255, 255, 255, 0.9);
  border: none;
  color: black;
  font-weight: 700;
  font-size: 10px;
  cursor: pointer;
  padding: 2px 10px;
  width: 50px;
  height: 18px;
  line-height: 18px;
  text-align: center;
  border-radius: 10%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
  display: none;
  transition: background-color 0.3s ease, color 0.3s ease;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  user-select: none;
}

.slab-thumbnail {
  position: relative; /* necessary for absolute positioning of button */
}

.slab-thumbnail:hover .transform {
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.transform:hover {
  background-color: #34495e;
  color: white;
  box-shadow: 0 0 8px #59738d;
}

.loader {
  border: 6px solid #f3f3f3;
  border-top: 6px solid #3498db;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  animation: spin 0.8s linear infinite;
  margin: auto;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.btn-primary {
    /* background-color: #2c3e50;  */
    color: #ecf0f1;   
    font-weight: 400;
    background-color: #000000;
    /* font-family: "Jost", sans-serif; */
    font-style: italic;
    font-size: clamp(7px, 0.65vw, 15px);
    /* padding: 10px 20px; */
    padding: clamp(2px, 0.3vw, 7px) clamp(4px, 0.6vw, 15px);
    /* margin-bottom: 10px; */
    border: none;
    /* border-radius: 6px;
    box-shadow: 0 4px 8px rgba(44, 62, 80, 0.4); */
    cursor: pointer;
    /* transition: background-color 0.6s ease, box-shadow 0.3s ease, transform 0.15s ease; */
    transition: color 0.3s ease-in-out, 
                background-color 0.3s ease-in-out, 
                transform 0.2s ease-in-out, 
                box-shadow 0.3s ease-in-out;
}


.btn-primary:hover  {
  /* background-color: #34495e;       */
  /* box-shadow: 0 6px 14px rgba(52, 73, 94, 0.6); */
  color: rgba(179, 179, 138, 0.959);
}

#imageInputLabel {
    margin-right: 10px;
    padding-top: 8px;
}

.file-name-display {
    margin-right: 20px;
    font-size: clamp(0.8rem, 1.2vw, 0.95rem);
    /* color: #555; */
    color: #8d8888;
    vertical-align: middle;
    user-select: none;
  }

#back {
  text-decoration: none;
}


#upload-nav-bar {
  border-radius: 5px;
    display: flex;
    justify-content: center;
    gap: clamp(3px, 0.9vw, 20px);  /* Shrinking gap */
    flex-wrap: wrap;
    flex: 1;
    position: absolute;
    border-radius: 10px;
    background-color: black;
    z-index: 2;
    row-gap: 6px;
    padding: 5px;
    left: clamp(1.3em, 27em, 27em);
    right: 1em;
    align-items: center;
    box-sizing: border-box;
    margin-top: 0.5em;
    margin-left: 1em;
    max-width: 70em;
    /* justify-content: space-around; */
    overflow: hidden;
    /* overflow: hidden; */
    /* max-height: 5em; */
    border: rgb(211, 211, 211) solid 1px;
  }

  /* TODO: Fix imae from getting cut off on a bit smaller size: fix nav bar responsiveness when smaller than cerain size, done:*/
#room-select {
    width: clamp(140px, 15vw, 260px);
    font-weight: 500;
    font-size: clamp(0.8rem, 1vw, 1rem);
    padding: clamp(4px, 0.5vw, 7px) clamp(10px, 1.2vw, 17px);
    flex-shrink: 1;
    color: #333;
    background-color: #fff;
    border: 1.5px solid #ccc;
    border-radius: 6px;
    cursor: pointer;
    outline: none;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3csvg width='10' height='7' viewBox='0 0 10 7' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M1 1L5 5L9 1' stroke='%23666' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 10px 7px;
}

#room-select:focus {
  border-color: #4a90e2;
  box-shadow: 0 0 6px rgba(74, 144, 226, 0.5);
}

#room-select option {
  padding: 8px;
  color: #333;
  background-color: #fff;
}

span, #user-option {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  font-size: clamp(0.75rem, 1vw, 1rem);
  color: #8d8888;
  font-style: italic;
  user-select: none;
}


/* Position toggle button inside container but absolutely to right */
#chat-toggle {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 30px;
    height: 30px;
    background-color: #2c3e50;
    color: white;
    border: 1.5px solid #2c3e50;
    border-radius: 4px;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    user-select: none;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

#allowed-overlay {
    pointer-events: none; 
    display: block;
    min-width: 100%;
    min-height: 100%;
    background-color: green;
    z-index: 999999999999999999;
}


#chat-toggle:hover {
    background-color: #34495e;
    border-color: #34495e;
}
#roomvo-loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* background: #c4c4c4; */
    background: white;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 999999;
    flex-direction: column;
}

.roomvo-loader-content {
    position: relative;   /* needed for line absolute positioning */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.roomvo-loader-content img {
    width: 64px;      /* or 32px for smaller */
    height: 64px;
    object-fit: contain; /* keeps proportions */
    margin-bottom: 10px;
}

.magic-line {
    width: 7em;                 /* span across the thumbnail */
    height: 2px;                /* thin horizontal line */
    background-color: #000000;  /* line color */
    position: absolute;
    top: 0;                      /* starting at top */
    left: 50%;
    transform: translate(-50%, -50%);
    animation: moveLine 2s infinite ease-in-out;
}

.loading-text {
    font-size: 1.5rem;
    font-weight: 500;
    color: #444;
    font-family: "Segoe UI", sans-serif;
}


@keyframes moveLine {
    0% { top: 0%; }   /* starts a bit higher */
    50% { top: 45%; }  /* doesn’t go too low */
    100% { top: 0%; } /* back to start */
}

/* 
#roomvo-loading-overlay {
  position: relative;
  z-index: 10000;
  width: 100%;  
  height: 100%; 
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  transition: opacity 0.3s ease;
}

.roomvo-loader-content {
  text-align: center;
  animation: fadeIn 0.4s ease-in-out;
}

.wand-icon {
  font-size: 64px;
  color: #4A90E2;
  margin-bottom: 20px;
  animation: spin 1s linear infinite;
}

.loading-text {
  font-size: 1.5rem;
  font-weight: 500;
  color: #444;
  font-family: "Segoe UI", sans-serif;
} 
*/

/* @keyframes fadeIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
} */


/* USER HOME SECTION */
.user-home-main{
    /* background-color: #c4c4c4; */
    background-color: white;
    min-height: 100%;
    padding: 20px;
    overflow-y: auto;
    overflow-x: hidden;
}
.user-slabs-container {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;           /* space between images */
    justify-content: center;
    border-radius: 10px;
    padding: 10px;
}

.pre-determined-images {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
}

.user-slab {
    /* max-width: 20%; */
    width: calc(20% - 12px);
    min-width: 200px;
    height: auto;        /* maintain aspect ratio */
    object-fit: contain;   /* crop if needed */
    border-radius: 4px;
    overflow-y: auto;
    overflow-x: hidden;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), 
              border 0.4s ease,
              box-shadow 0.4s ease;
   
}

.upload-button{
  display: flex;
  justify-content: space-between;
  padding: 10px 0px 10px 0px;
  flex-wrap: wrap-reverse;
}

.upload-button button{
    padding: 1.5em;
    width: 20em;
    background-color: black;
    color: white;
    border-radius: 10px;
    font-weight: 600;
    font-size: 1.3em;
}

.upload-button button:hover {
    background-color: rgb(32, 32, 32);
    cursor: pointer;
    transition: background-color 0.5s ease;
}

.user-slab:hover{
    /* border: 1.5px solid #2c3e50; */
    transform: scale(1.05);
}

.logo-div-user img {
  border-radius: 10px;
  /* min-width: 5em; */
}

.no-scroll {
  overflow: hidden;
  touch-action: none; /* prevents swipe gestures on mobile */
}

@media (max-width: 1225px) {
  #upload-nav-bar {
    left: 20em;
    right: 0;
    max-width: calc(100% - 360px);
    margin: 0;
    border-radius: 0;
    flex-wrap: wrap;              /* allow buttons to wrap */
    justify-content: space-around;
    z-index: 1000;
  }
}


#loader-overlay {
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;             /* allows interacting with canvas if needed */
  z-index: 100;                   /* above canvas */
  background: rgba(0,0,0,0.05);     /* subtle overlay, optional */
}
#loader-overlay.visible{
  opacity: 1;
}

.italic-loading-text {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  font-style: italic;
  font-size: 60px;
  letter-spacing: 0.25em;
  position:absolute;
  pointer-events: none;
  color: #000000;
  display: flex;
  justify-content: center;
  top: 37%;
  left: 37%;
  animation: italic-pulse 1.5s cubic-bezier(0.4, 0, 0.6, 1) infinite;
  transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 0;
  font-weight: 700;
  z-index: 1000;
  will-change: opacity;
  backface-visibility: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
/* Loading bar via :after pseudo-element */
.italic-loading-text::after {
  content: '';
  display: block;
  display: none;
  width: 100%;
  height: 4px;
  top: 85%;
  left: 50%;
  transform: translate(-50%, -95%);
  position: absolute;
  background: #bfae91;
  border-radius: 3px;
  margin-top: 10px; /* spacing below text */
  animation: load-bar 1s linear infinite;
  z-index: 1200;
}

/* Animate bar filling and resetting */
@keyframes load-bar {
  0% { width: 0%; }
  50% { width: 100%; }
  100% { width: 0%; }
}

/* Smoother pulse animation with subtle scale */
@keyframes italic-pulse  {
  0%, 100% { 
    opacity: 0.4;
    transform: scale(1);
  }
  50% { 
    opacity: 1;
    transform: scale(1.02);
  }
}

/* 
 @keyframes italic-pulse {
  0%   { opacity: 0.1; }
  25%  { opacity: 0.5; }
  50%  { opacity: 1.0; }
  75%  { opacity: 0.5; }
  100% { opacity: 0.1; }
}   */

/* =========================
   PHONE LAYOUT
   Big canvas on top
   One slab per row below
   ========================= */
@media (max-width: 768px) {
  /* Stack main layout vertically */
   body.visualizer-main .main-content {
    display: flex;
    flex-direction: column;
    overflow: hidden;

  }
  .italic-loading-text {
   top: 30%;
   left: 25%; 
  }

  .watermark{
    position: absolute;
    top:0;
    left:0;
    width:100%;
    height: 100%;
    opacity: 0;
    z-index: 9999;
  }

  .image-upload {
    height: 100%;
    width: 100%;
  }

   body.visualizer-main #canvas-wrapper {
    width: 100%;
    height: 100%;
    /* width: 75%; */
    position: relative;
    flex: 1 1 auto;
    box-shadow: none;
    transform: translate(-10%,0);
    /* box-sizing: border-box;  */
    /* border: solid 5px black; */
    /* display: flex; 
    align-items: center;
    justify-content: center;   */
    /* padding-top: 130px; */
    /* padding-top: 20%; */
    /* margin-left: -6%; */
 
  } 


#drag-3d-preview {
    touch-action: none;
}
   /* canvas {
    border: solid 5px black; 
 
  } 
    */

   body.visualizer-main #upload-nav-bar {
    max-width: 100%;
    /* max-height: 20%; */
    top: 0;
    left: 0;
    right: 0;
    margin: 0;
    border-radius: 0;
    flex-wrap: wrap;   
    position: relative; 
    justify-content: space-around;
    touch-action: none;

  }


  /* ===== SLABS BELOW CANVAS ===== */
   body.visualizer-main .thumbnails {
    width: 100%;
    border-top: 1px solid #e0e0e0;
    display: flex;
    flex: 0 0 35vh;
    flex-direction: column;
    z-index: 2;
    order: 2;
    overflow-y: auto;
    touch-action: none;
  }

   body.visualizer-main #slab-thumbnails {
    overflow-y: auto;
    gap: 12px;
    height: 100%;
    padding: 12px;
    -webkit-overflow-scrolling: touch;
    
    /* min-height: 0;   */
  }

  /* ONE SLAB PER ROW */
   body.visualizer-main .slab-card-wrapper {
    width: 100% !important;
    height: auto;
    /* min-height: 100vh; */
  }

   body.visualizer-main .slab-card {
    width: 100% !important;
    height: auto;
    padding: 5px;
    gap: 8px;
  }

   body.visualizer-main .slab-thumbnail {
    max-width: 23%;
    height: 100px;
    
  }

   body.visualizer-main .slab-img {
    height: 100%;
    object-fit: cover;
    left: 50%;
    right: 50%;
  }
  
   body.visualizer-main .logo-img {
    /* max-width: 60%; */
    max-width: 20%;  
    height: auto;
}

#italic-nav-logo {
  display: none;
  margin-top: 0;
}

}

   


 @import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@400;500;600&family=Inter:wght@400;500;600&display=swap');

      

/* Testing user instructino animation*/

/* Right Side - Illustration */
.illustration-area {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, #fafafa 0%, #f0f0f0 100%);
    border-radius: 2px;
    padding: 60px;
    min-height: 500px;
}

/* Realistic Room Illustration */
.room-illustration {
    width: 100%;
    max-width: 650px;
    aspect-ratio: 16/10;
    background: #e8e8e8;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
}

/* Modern Kitchen Scene */
.room-interior {
    width: 100%;
    height: 100%;
    position: relative;
    background: linear-gradient(180deg, #f5f5f5 0%, #e0e0e0 100%);
}

/* Wall */
.wall {
    width: 100%;
    height: 60%;
    background: linear-gradient(135deg, #e8e8e8 0%, #d8d8d8 100%);
    position: absolute;
    top: 0;
}

/* Upper Cabinets */
.upper-cabinets {
    width: 70%;
    height: 28%;
    background: linear-gradient(135deg, #4a4a4a 0%, #3a3a3a 100%);
    position: absolute;
    top: 12%;
    left: 15%;
    border-radius: 1px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.cabinet-door {
    width: 23%;
    height: 80%;
    background: linear-gradient(135deg, #5a5a5a 0%, #4a4a4a 100%);
    position: absolute;
    top: 10%;
    border: 1px solid rgba(0, 0, 0, 0.2);
}

.cabinet-door:nth-child(1) { left: 2%; }
.cabinet-door:nth-child(2) { left: 27%; }
.cabinet-door:nth-child(3) { left: 52%; }
.cabinet-door:nth-child(4) { left: 77%; }

.cabinet-handle {
    width: 30%;
    height: 4px;
    background: linear-gradient(90deg, #c0c0c0 0%, #a0a0a0 100%);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 2px;
}

/* Counter/Island */
.counter {
    width: 75%;
    height: 35%;
    background: linear-gradient(135deg, #f8f8f8 0%, #e8e8e8 100%);
    position: absolute;
    bottom: 8%;
    left: 12.5%;
    border-radius: 1px;
    box-shadow: 0 -2px 16px rgba(0, 0, 0, 0.08);
}

/* Countertop - Where material will be dropped */
.countertop {
    width: 100%;
    height: 15px;
    background: linear-gradient(135deg, #d4d4d4 0%, #c8c8c8 100%);
    position: absolute;
    top: 0;
    border-radius: 1px 1px 0 0;
}

/* Lower cabinets */
.lower-cabinets {
    width: 100%;
    height: calc(100% - 15px);
    background: linear-gradient(135deg, #3a3a3a 0%, #2a2a2a 100%);
    position: absolute;
    bottom: 0;
    display: flex;
    gap: 2%;
    padding: 3%;
}

.lower-door {
    flex: 1;
    background: linear-gradient(135deg, #4a4a4a 0%, #3a3a3a 100%);
    border: 1px solid rgba(0, 0, 0, 0.3);
    position: relative;
}

.lower-handle {
    width: 40%;
    height: 5px;
    background: linear-gradient(90deg, #b0b0b0 0%, #909090 100%);
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 2px;
}

/* Floor */
.floor {
    width: 100%;
    height: 40%;
    background: linear-gradient(180deg, #c8c8c8 0%, #b8b8b8 100%);
    position: absolute;
    bottom: 0;
}

/* Animated Material Slab */
.material-slab {
    position: absolute;
    width: 70px;
    height: 55px;
    background: linear-gradient(135deg, #f0f0f0 0%, #d8d8d8 100%);
    border: 1px solid rgba(0, 0, 0, 0.15);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    opacity: 0;
    animation: materialDrop 4s cubic-bezier(0.4, 0, 0.2, 1) infinite;
    z-index: 50;
}

/* Marble texture overlay */
.material-slab::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(120deg, transparent 0%, rgba(255, 255, 255, 0.3) 50%, transparent 100%),
        linear-gradient(60deg, rgba(200, 200, 200, 0.2) 0%, transparent 50%);
    background-size: 100% 100%;
}

@keyframes materialDrop {
    0% {
        top: -10%;
        left: 20%;
        opacity: 0;
        transform: rotate(-5deg) scale(0.9);
    }
    15% {
        opacity: 1;
    }
    45% {
        top: 44%;
        left: 35%;
        transform: rotate(0deg) scale(1);
    }
    55% {
        top: 44%;
        left: 35%;
        opacity: 1;
    }
    70% {
        opacity: 0;
    }
    100% {
        top: 44%;
        left: 35%;
        opacity: 0;
    }
}

/* Placement indicator */
.drop-zone {
    position: absolute;
    top: 44%;
    left: 35%;
    width: 70px;
    height: 55px;
    border: 2px dashed rgba(0, 0, 0, 0.2);
    animation: zoneHighlight 4s ease-in-out infinite;
}

@keyframes zoneHighlight {
    0%, 40%, 60%, 100% {
        opacity: 0;
    }
    45%, 55% {
        opacity: 1;
    }
}

/* Tutorial Tooltip - Bottom positioning */
.tutorial-tooltip {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(26, 26, 26, 0.96);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    padding: 20px 28px;
    max-width: 420px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    animation: fadeInUp 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 200;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translate(-50%, 20px);
    }
    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

.tooltip-content {
    display: flex;
    align-items: center;
    gap: 20px;
}

.tooltip-icon {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.icon-graphic {
    width: 24px;
    height: 24px;
    position: relative;
}

.icon-square {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0.1) 100%);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.icon-arrow {
    position: absolute;
    top: 50%;
    right: -8px;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.5);
    font-size: 16px;
}

.tooltip-text {
    flex: 1;
}

.tooltip-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 18px;
    font-weight: 500;
    color: white;
    margin-bottom: 6px;
    letter-spacing: 0.3px;
}

.tooltip-description {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.5;
    font-weight: 400;
}

.close-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    font-size: 18px;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 2px;
    transition: all 0.2s;
    flex-shrink: 0;
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.9);
    border-color: rgba(255, 255, 255, 0.2);
}

/* Hidden state */
.tutorial-tooltip.hidden {
    display: none;
}

/* Responsive */
@media (max-width: 1200px) {
    .main-layout {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .tutorial-tooltip {
        position: relative;
        bottom: auto;
        left: auto;
        transform: none;
        margin-top: 20px;
    }
}

#kitchenCanvas {
  display: block;
  position: absolute; 
  top: 0;
  left: 0;
  /* transform: translate(-50%, -50%); */
}

#renderBtn {
    display: none;
}
