:root
{
  --c33d-canvas-height: 881px;
  --c33d-main-radius: 21px;
  --c33d-bg-dark-blue: #0D1014;
  --c33d-mid-dark-blue: #14191F;
  --c33d-light-dark-blue: #1F262E;
  --c33d-v-light-blue: #3f4d5d;
  --c33d-text: #A3B2C3;
  --c33d-yellow: #FCB21B;
}

#threejs-canvas
{
  background: var(--c33d-bg-dark-blue);
}

#canvasAndControls
{
  position: relative;
}

.c33d_scene
{
  display: flex;
  justify-content: center;
  position: relative;
}

#code-three-metabox .inside {
    padding: 0;
    margin: 0;
}

#c33d-editor
{
    *
    {
        color: var(--c33d-text);
    }

    label
    {
        text-align: center;
        width: 100%;
        display: block;
    }

    button
    {
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 7px;
        border-radius: var(--c33d-main-radius);
        cursor: pointer;
        height: 30px;
        padding-inline: 20px;
    }

    .c3-loading-icon
    {
        animation: load-icon-rotate infinite 2s linear;
        color: #E29519;
        display: none;
        z-index: 2;
    }


    button:hover
    {
        background-color: var(--c33d-v-light-blue);
    }
    
    input[type="number"], select, textarea, button, .tab
    {
        background-color: var(--c33d-light-dark-blue);
        border: none;
    } 

    input[type="range"] 
    {
        accent-color: var(--c33d-v-light-blue);
    }

    input[type="checkbox"]
    {
        background: var(--c33d-v-light-blue);
        border: none;
        accent-color: var(--c33d-text);
    }

    select
    {
        width: 100%;
    }

    .tabContainer 
    {
        display: flex;
    }

    .tab
    {
        /* border: 1px solid gray; */
        padding: 5px;
        cursor: pointer;
        /* color: gray; */
        width: 25%;
        height: 20px;
        text-align: center;
    }

    .tab:first-of-type
    {        
        border-radius: var(--c33d-main-radius) 0 0 0;
    }
    .tab:last-of-type
    {
        border-radius: 0 var(--c33d-main-radius) 0 0;
    }

    .tabContent
    {
        display: none;
        flex-direction: column;
        gap: 16px;
        padding: 12px;
    }

    .activeTab
    {
        border-bottom: none;
        color: white;
        background: var(--c33d-mid-dark-blue);
    }
    
    hr
    {
        width: 100%;
        border-top: 1px solid var(--c33d-text);
        margin-block:12px;
        opacity: 0.2;
    }

    .w-full
    {
        width: 100%;
    }
    
    .rangeWithValue input
    {
        width: 80%;
    }
    /* #codes_controls {
    f    position: absolute;
    top: 0; */

    .leftContInner
    {
        display: flex;
        flex-direction: column;
        gap: 12px;
    }

    .leftControls 
    {
        width: 241px;
        /* border-right: 1px solid rgb(183, 183, 183); */
        padding: 20px;      
        justify-content: space-between;
    }

    .rightControls 
    {
        right: 0;
        width: 223px;
        /* border-left: 1px solid rgb(183, 183, 183); */
        /* box-shadow: inset 1px 1px 1.8px rgba(255, 255, 255, 0.16); */
    }

    .topTransforms 
    {
        top: 0;
        left: 50%;
        transform: translate(-50%);
        position: absolute;
        display: flex;
        gap: 10px;
        padding-top: 50px;
    }

    .rightControls, .leftControls 
    {
        position: absolute;
        display: flex;
        flex-wrap: wrap;
        flex-direction: column;
        top: 0;
        /* background: var(--c33d-mid-dark-blue); */
        background: color-mix(in srgb, var(--c33d-mid-dark-blue) 90%, transparent);
        /* padding: 15px; */
        /* height: 100%; */
        /* padding: 15px; */
        gap: 18px;
        color: #bababa;
        height: var(--c33d-canvas-height);
        box-sizing: border-box;
        /* border-radius: var(--c33d-main-radius); */
    /* width: 217px; */
    }

    .transform-group 
    {
        display: flex;
        /* flex-direction: column; */
        gap: 8px; /* Adds spacing between input groups */
    }

    .checkbox-group
    {
        display: flex;
        align-items: center;
    }

    .transform-field {
        display: flex;
        flex-direction: column;
    }

    .transform-field label {
        font-weight: bold;
        margin-bottom: 3px; /* Adds spacing between label and input */
        text-align: center;
    }

    #mobileOutline
    {
        width: 360px;
        border: 10px solid black;
        border-radius: 20px;
        box-shadow: 0 0 29px #ffffff3b;
        height: calc(var(--c33d-canvas-height) - 20px);
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        pointer-events: none;
        display: none;
        z-index: 1;
    }

    
    /* #codes_controls {
    position: absolute;
    top: 0; */


    .rightControls {
        right: 0;
        width: 223px;
    }



    .transButtonActive
    {
        background: var(--c33d-v-light-blue);
        color: white;
    }



    .transform-group {
        display: flex;
        /* flex-direction: column; */
        gap: 8px; /* Adds spacing between input groups */
    }

    .transform-field {
        display: flex;
        flex-direction: column;
    }

    .transform-field label {
        font-weight: bold;
        margin-bottom: 3px; /* Adds spacing between label and input */
        text-align: center;
    }

    .transform-field input {
        width: 100%;
        padding: 2px 6px;
        border-radius: 4px;
        font-size: 14px;
    }



    span.object-name-span 
    {
        width: 100%;
        padding: 7px 0px;
    }

    .object-list-item {
        /* border-bottom: 1px solid ; */
        width: 100%;
        display: flex;
        justify-content: space-between;
        margin: 0;
        padding-inline: 12px;
        box-sizing: border-box;
    }

    .object-list-item:hover {
        background-color: var(--c33d-v-light-blue);
    }

    #code-three-metabox .inside {
        padding: 0px;
    }

    #objectListContainer
    {
        max-height: 280px; 
        height: 280px;
        overflow-y: auto; 
        border-radius: calc(var(--c33d-main-radius) - 10px);
        background: var(--c33d-light-dark-blue);
        box-shadow: inset 3px 3px 6.3px 4px #00000036;
    }


}

/* Styles for the modal overlay */
  .modal-overlay {
      /* Fixed position, full screen, semi-transparent black background, centered content */
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background-color: rgba(0, 0, 0, 0.5);
      display: flex;
      justify-content: center;
      align-items: center;
      z-index: 1000; /* Ensure it's on top of other content */
  }

  /* Styles for the modal content box */
  .modal-content {
      background-color: var(--c33d-bg-dark-blue);
      padding: 24px;
      border-radius: 12px;
      box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
      width: 95%;
      max-width: 600px;
      position: relative;
      animation: fadeInScale 0.3s ease-out; /* Simple entry animation */
      display: flex;
      flex-direction: column;
      align-items: center;
      gap:40px;
  }


/* } */
/* load screen styles */
.loadScreen
{
    display: flex;
    justify-content: center;
    align-items: center;
    position: absolute;
    height: 100%;
}

.loadInnerCircle
{
    border-radius: 50%;
    border: 5px dashed black;
    width: 40px;
    height: 40px;
    animation: loadSpinReverse 5s linear infinite;
}

.loadCircle
{
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    border: 5px dashed black;
    width: 80px;
    height: 80px;
    animation: loadSpin 5s linear infinite;
    background: white;
    outline: 5px solid white;
}

@keyframes loadSpin
{
    0%
    {
    rotate: 0deg;
    }
    0%
    {
    rotate: -360deg;
    }
}

@keyframes loadSpinReverse
{
    0%
    {
    rotate: 0deg;
    }
    0%
    {
    rotate: 600deg;
    }
}

  /* Keyframes for modal entry animation */
  @keyframes fadeInScale {
      from {
          opacity: 0;
          transform: scale(0.9);
      }
      to {
          opacity: 1;
          transform: scale(1);
      }
  }

  /* Utility to hide the modal */
  .hidden-modal {
      display: none;
  }

  /* Styles for the "Open Model Import" button */
  #openModalBtn {
      background-color: #4f46e5; /* indigo-600 */
      color: white;
      font-weight: bold;
      padding: 12px 24px;
      border-radius: 8px;
      box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
      transition: all 0.3s ease-in-out;
      border: none;
  }

  #openModalBtn:hover {
      background-color: #4338ca; /* indigo-700 */
      transform: scale(1.05);
  }

  /* Styles for the Close button */
  #closeModalBtn {
      position: absolute;
      top: 12px;
      right: 12px;
      color: #6b7280; /* gray-500 */
      font-size: 1.5rem; /* text-xl */
      font-weight: bold;
      padding: 8px;
      border-radius: 9999px; /* rounded-full */
      border: none;
      background-color: transparent;
      cursor: pointer;
      transition: color 0.2s ease-in-out, background-color 0.2s ease-in-out;
  }

  #closeModalBtn:hover {
      color: #1f2937; /* gray-800 */
      background-color: #f3f4f6; /* gray-100 */
  }

#newScenePopup
{
    position: absolute;
    /* display: flex; */
    display: none;
    flex-direction: row; 
    align-items: center;
    justify-content: center;
    padding: 24px; /* p-6 */
    width: 100%;
    height: 100%;
    z-index: 3;
    background: var(--c33d-bg-dark-blue);
    box-sizing: border-box;
    gap:30px;
}

  /* Main popup container */
#newScenePopup, .modal-overlay
{    

    
    h2, h3, h4,  p
    {
        color: var(--c33d-text);
        margin: 0;
    }

    h2
    {
        font-size: 26px;
        font-weight: 500;
        padding: 0;
        text-align: center;
    }

    h3
    {
        font-size: 24px;
        font-weight: 400;
        text-align: center;
    }

    h4
    {
        font-size: 18px;
    }
}

#mediaLibraryBtn:hover
{
    background: #7385a1;
}

#mediaLibraryBtn
{
    border-radius: 50px;
    font-size: 18px;
    color: var(--c33d-text);;
    background: #3a475b;
    width: 100%;
    padding: 5px;
    border: none;
    box-shadow: inset 3px 3px 1.7px rgba(255, 255, 255, 0.132);
    cursor: pointer;
}

.left-side, .right-side
{
    width: 40%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    background-color: var(--c33d-mid-dark-blue);
    border-radius: var(--c33d-main-radius);
    padding: 20px;
    gap:40px;
}

  /* Styles for section headers */
  section h2 {
      
  }

  #upload-existing
  {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center; width: 100%;
  }

  .demo-models
  {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }

  .c3_button_with_text
  {
    display: flex; 
    justify-content: space-between;
    align-items: center;
  }


  .text-center {
      text-align: center;
  }

  .demo-grid {
      display: grid;
      grid-template-columns: 1fr 1fr; 
      gap: 12px; 
      /* width: 100%; */
  }

  .demo-three-column
  {
    grid-template-columns: 1fr 1fr 1fr; 
  }

  .demo-three-column .demo-grid-item img
  {
    width: 145px;
    height: 101px;
  }

  /* Styles for individual grid items */
  .demo-grid-item {
      position: relative;
      background-color: var(--c33d-light-dark-blue);
      box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.06); 
      overflow: hidden;
      transform: scale(1);
      transition: transform 0.3s ease-in-out;
      width: 100%;
      border-radius: var(--c33d-main-radius);
      padding: 10px;
      box-sizing: border-box;
  }

  .c33-download-overlay {
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background-color: rgba(0, 0, 0, 0.7); /* Dark semi-transparent overlay */
      display: flex;
      justify-content: center;
      align-items: center;
      opacity: 0; /* Hidden by default */
      transition: opacity 0.3s ease-in-out; /* Smooth transition */
      flex-direction: column; /* Stack button and text */
  }

  .demo-grid-item:hover {
      transform: scale(1.05);
      cursor: pointer;
  }

  .demo-grid-item:hover .c33-download-overlay {
    opacity: 1;
  }

  .demo-grid-item img {
      width: 100%;
      /* height: 128px;  */
      object-fit: cover;
      border-radius: calc(var(--c33d-main-radius) - 10px);
  }

  .demo-grid-item h3 {
      text-align: center;
      color: #4b5563; 
  }

  .overlay-text {
      color: var(--c33d-text);
      font-size: 0.875rem;
      margin-top: 8px;
  }





  
    @keyframes load-icon-rotate {
        from {
            rotate: 0deg;
        }

        to {
            rotate: -360deg;
        }
    }

@media (max-height: 960px) {
    :root {
        --c33d-canvas-height: 85vh;
    }
}