/* Styling for the iframe section */
.iframe-section {
    padding: 60px 20px;
    background-color: #f9f9f9;
}

.iframe-section .sec-title {
    margin-bottom: 30px;
}

.iframe-section .sec-title .top-text {
    font-size: 18px;
    font-weight: 600;
    color: #d32f2f;
    text-transform: uppercase;
    display: block;
    margin-bottom: 10px;
}

.iframe-section .sec-title h2 {
    font-size: 32px;
    font-weight: 700;
    color: #333;
    line-height: 1.4;
}

.iframe-section .sec-title .top-text {
    font-size: 18px;
    font-weight: 600;
    color: #d32f2f;
    text-transform: uppercase;
    display: block;
    margin-bottom: 10px;
}

.iframe-section .sec-title h2 {
font-size: 32px;
font-weight: 700;
color: #333;
line-height: 1.4;
}

.iframe-container {
position: relative;
overflow: hidden;
border-radius: 20px;
box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
border: 3px solid #d32f2f;
width: 100%; /* Take full width of the container */
max-width: 1200px; /* Optional: Limit the maximum width */
margin: 0 auto; /* Center the iframe horizontally */
height: 650px; /* Set the height */
}

.iframe-container iframe {
display: block;
width: 100%; /* Make the iframe take the full width of the container */
height: 100%; /* Make the iframe take the full height of the container */
border: none;
border-radius: 12px;
}

/* 3d viewer part*/

/* Layout & Containers */
.model-viewer-ui {
    display: flex;
    height: 90vh;
    width: 100%;
    gap: 20px;
    box-sizing: border-box;
    border: 3px solid #bc1622;
    padding: 20px;
  }
  
  .model-viewer-container {
    flex: 7;
    position: relative;
    background: #f9f9f9;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    overflow: hidden;
  }
  
  #webgl {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: block;
    z-index: 1;
    background-color: #f0f0f0;
  }
  
  .loading-indicator {
      display: none; /* hidden by default */  
      position: absolute; /* or relative to container */  
      top: 50%;  
      left: 50%;  
      transform: translate(-50%, -50%);  
      background: rgba(0,0,0,0.7);  
      color: white;  
      padding: 10px 20px;  
      border-radius: 5px;  
      font-weight: bold;  
      z-index: 10;  
      }
  
  .loading-indicator.loading {  
      display: block; /* show when 'loading' class is added */  
  }
  .control-panel {
    flex: 3;
    background: #ffffff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    border: 1px solid #e8e8e8;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 20px;
  }
  
  /* Typography */
  .control-panel h2 {
      font-size: 24px;
      font-weight: 700;
      color: #111;
      margin-bottom: 16px;
      }

  
  .control-group label {
      font-weight: 600;
      color: #333;
      margin-bottom: 8px;
      display: block;
      }
  
  /* Buttons */
  .control-group button {
      background-color: #ff5252;
      color: white;
      border: none;
      padding: 12px 20px;
      border-radius: 10px;
      font-weight: 600;
      font-size: 14px;
      cursor: pointer;
      transition: all 0.25s ease;
      min-width: 130px;
      box-shadow: 0 4px 12px rgba(255, 82, 82, 0.4);
  }
  
  .control-group button:hover {
      background-color: #e84141;
      transform: translateY(-2px);
      box-shadow: 0 6px 14px rgba(188, 22, 34, 0.4);
      }
  /* Button Group Spacing */
  .control-group button + button {
      margin-left: 10px;
      }
  /* Nice Select Styling */
  .control-group select, input, button {
      font-family: 'Poppins', sans-serif;
      font-size: 15px;
      font-weight: 500;
      color: #1f1f1f;
  }

  .nice-select {
      position: relative;
      display: flex;
      align-items: center;
      justify-content: space-between;
      background: #fff;
      border: 2px solid #ff5252;
      border-radius: 12px;
      padding: 0 45px 0 16px; /* Increased right padding for arrow */
      height: 46px;
      line-height: 46px;
      font-size: 15px;
      font-weight: 600;
      color: #2b2b2b;
      cursor: pointer;
      transition: all 0.3s ease;
      outline: 1px solid #ff5252;
      outline-offset: 3px;
      width: 100%;
  }

.nice-select:hover {
  box-shadow: 0 0 0 4px rgba(255, 82, 82, 0.15);
}

.nice-select::after {
  content: "";
  position: absolute;
  right: 16px;
  top: 50%;
  width: 12px;
  height: 12px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23ff5252'%3E%3Cpath d='M7.41 8.59L12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
  transform: translateY(-50%);
  transition: transform 0.3s ease;
  pointer-events: none;
}

.nice-select.open::after {
  transform: translateY(-50%) rotate(180deg);
}

/* Dropdown List Container */
.nice-select .list {  
  background-color: #fff;  
  border-radius: 12px;  
  border: 2px solid #ff5252;  
  box-shadow: 0 5px 15px rgba(255, 82, 82, 0.1);  
  margin-top: 8px;  
  opacity: 0;  
  position: absolute;  
  top: 100%;  
  left: -2px;  
  right: -2px;  
  transform-origin: 50% 0;  
  transform: scale(0.75) translateY(-21px);  
  transition: all 0.2s cubic-bezier(0.5, 0, 0, 1.25);  
  z-index: 9;  
  min-height: 200px;  
  max-height: 400px;  
  display: flex;  
  flex-direction: column;  
  pointer-events: none;  
  overflow: hidden; /* Hide overflow at container level */  
}

.nice-select.open .list {  
  opacity: 1;  
  pointer-events: auto;  
  transform: scale(1) translateY(0);  
}

/* Search Box */
.nice-select .search-box {  
  position: sticky;  
  top: 0;  
  left: 0;  
  right: 0;  
  padding: 10px;  
  background: #fff;  
  border-bottom: 2px solid rgba(255, 82, 82, 0.2);  
  z-index: 3;  
  border-radius: 10px 10px 0 0;  
  flex-shrink: 0; /* Don't allow search box to shrink */  
}
.nice-select .options-container {  
  overflow-y: auto; /* Make this the scrollable area */  
  flex-grow: 1; /* Take up remaining space */  
  padding: 5px 0;  
}
.nice-select .search-box input {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #ff5252;
  border-radius: 6px;
  font-size: 14px;
  outline: none;
  transition: all 0.3s ease;
  background: #fff;
}

.nice-select .search-box input:focus {
  border-color: #ff3838;
  box-shadow: 0 0 0 3px rgba(255, 82, 82, 0.1);
}

/* Options Container */
.nice-select .list-container {
  position: relative;
  overflow-y: auto;
  max-height: calc(100% - 52px); /* Subtract search box height */
  margin-top: 52px; /* Match search box height */
  padding: 5px 0;
}

/* Option Items */
.nice-select .option {
  position: relative;
  padding: 12px 16px;
  line-height: 1.4;
  min-height: 44px;
  display: flex;
  align-items: center;
  font-weight: 500;
  color: #333;
  cursor: pointer;
  transition: all 0.2s ease;
  border-bottom: 1px solid rgba(255, 82, 82, 0.1);
  background: #fff;
}

.nice-select .option:last-child {
  border-bottom: none;
}

.nice-select .option:hover,
.nice-select .option.focus,
.nice-select .option.selected.focus {
  background-color: rgba(255, 82, 82, 0.08);
}

.nice-select .option.selected {
  font-weight: 600;
  background-color: rgba(255, 82, 82, 0.12);
}

/* No Results Message */
.nice-select .no-results {
  padding: 20px 16px;
  color: #999;
  font-style: italic;
  text-align: center;
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  transform: translateY(-50%);
  background: #fff;
}

/* Scrollbar Styling */
.nice-select .list::-webkit-scrollbar {
  width: 6px;
}

.nice-select .list::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 3px;
}

.nice-select .list::-webkit-scrollbar-thumb {
  background: #ff5252;
  border-radius: 3px;
}

.nice-select .list::-webkit-scrollbar-thumb:hover {
  background: #ff3838;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  .nice-select {
      font-size: 14px;
      height: 42px;
      line-height: 42px;
  }

  .nice-select .option {
      padding: 10px 14px;
      min-height: 40px;
  }

  .nice-select .search-box {
      padding: 8px;
  }
}
  /* Form Elements */
  select,
  input[type="range"] {
      width: 100%;
      background: #fff;
      color: #333;
      border: 1px solid #ccc;
      border-radius: 6px;
      padding: 8px;
  }
  
  
  /* Slider Styling */
  .rotation-slider input[type="range"] {
      -webkit-appearance: none;
      width: 100%;
      height: 6px;
      background: #e0e0e0;
      border-radius: 3px;
      outline: none;
      margin-top: 10px;
      }

  .rotation-slider input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #ff5252;
  cursor: pointer;
  border: 2px solid #fff;
  box-shadow: 0 2px 6px rgba(255, 82, 82, 0.4);
  transition: background 0.3s;
  }

  .rotation-slider input[type="range"]::-moz-range-thumb {
      width: 18px;
      height: 18px;
      border-radius: 50%;
      background: #ff5252;
      cursor: pointer;
      border: 2px solid #fff;
      box-shadow: 0 2px 6px rgba(255, 82, 82, 0.4);
  }  
  /* Responsive Behavior */
  @media (max-width: 768px) {
  .model-viewer-ui {
      flex-direction: column;
      height: auto;
      gap: 10px;
  }

  .model-viewer-container {
      flex: none;
      width: 100%;
      height: 50vh; /* Adjust height for mobile */
  }

  .control-panel {
      flex: none;
      width: 100%;
      padding: 10px;
  }

  .control-panel h2 {
      font-size: 18px;
  }

  .control-group button {
      font-size: 12px;
      padding: 10px;
  }

  .rotation-slider input[type="range"] {
      height: 4px;
  }
}

/* Fullscreen button for mobile */
.fullscreen-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  border: none;
  padding: 8px 12px;
  border-radius: 5px;
  font-size: 14px;
  cursor: pointer;
  z-index: 10;
}

.fullscreen-btn:hover {
  background: rgba(0, 0, 0, 0.9);
}
  /* Responsive adjustments */  
  @media (max-width: 768px) {  
      .nice-select {  
          padding: 0 40px 0 12px;  
          height: 42px;  
          line-height: 42px;  
          font-size: 14px;  
      }  
      .nice-select .list {  
          min-height: 120px;  
      } 
      .nice-select .option {  
          padding: 10px 14px;  
      } 
      .nice-select::after {  
          right: 14px;  
          width: 10px;  
          height: 10px;  
      } 
  }
  


  #roughnessSelector {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    background-color: #fff;
    font-size: 14px;
    color: #333;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

#roughnessSelector:focus {
    outline: none;
    border-color: #d32f2f;
    box-shadow: 0 0 5px rgba(211, 47, 47, 0.5);
}

.styled-color-picker {
  width: 100%;
  height: 40px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Style for the sliders */
.control-group input[type="range"] {
  width: 100%;
  margin-top: 10px;
  -webkit-appearance: none;
  appearance: none;
  height: 8px;
  background: #ddd;
  border-radius: 5px;
  outline: none;
  transition: background 0.3s ease;
}

.control-group input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  background: #d32f2f;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.control-group input[type="range"]::-moz-range-thumb {
  width: 20px;
  height: 20px;
  background: #d32f2f;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}