/* ==================== 3D MODEL PAGE SPECIFIC STYLES ==================== */
/* This file extends the main portfolio CSS */

.threedmodel-row {
  position: relative;
  width: 100%;
  max-width: 1500px;
  height: 70vh;
  min-width: 620px;
  margin: 0 auto;
  box-sizing: border-box;
}

.threedmodel-right {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #9f9f9f;
  cursor: pointer;
  transition: box-shadow 0.3s ease;
  box-sizing: border-box;
}

.threedmodel-right img,
.threedmodel-right video {
  width: 100%;
  height: auto;
  object-fit: contain;
  display: block;
}

/* Info overlay box - positioned on top-left */
.threedmodel-left {
  position: absolute;
  top: 10px;
  left: 10px;
  width: 26%;
  max-width: 230px;
  min-width: 150px;
  max-height: calc(100% - 20px); /* full container height minus top/bottom offset */
  overflow-y: auto;
  z-index: 2;
  background: rgba(200, 200, 200, 0.9);
  padding: 9px 12px;
  box-sizing: border-box;
  border: 1px solid #ddd;
}


/* Typography inherits from main CSS, minimal overrides */
.threedmodel-left h2 {
  /* margin: 0 0 3px 0; */
}

.threedmodel-left h2 a:hover {
  background-color: var(--highlight-bg, rgba(231,197,11,0.64));
  text-decoration: none;
}

.threedmodel-left p {
  margin: 0 0 12px 0;
}


/* ==================== INFO SECTION CONTAINERS ==================== */

.info-section {
  background: rgba(255, 255, 255, 0.85);
  padding: 8px 10px;
  margin-bottom: 10px;
  border: 1px solid rgba(128, 128, 128, 0.3);
  border-radius: 3px;
  box-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

.info-section h2 {
  margin: 0 0 6px 0;
  padding: 0;
}

.info-section p {
  margin: 0 0 6px 0;
}

.info-section p:last-child {
  margin-bottom: 0;
}


#worldcontrols-container h2,
#jbmodelcontrols-container h2,
#nysmodelcontrols-container h2 {
  margin: 0 0 8px 0;
}


/* Keep section title outside the styled box */
.threedmodel-left > h2 {
  margin: 0 0 6px 0;
}

/* First h2 (title) should not have background */
.threedmodel-left > h2:first-child {
  background: none;
  border: none;
  padding: 0;
  box-shadow: none;
}


/* ==================== MODELS SLIDESHOW CONTAINER ==================== */
.models-slideshow-container {
  position: relative;
  width: 100%;
  height: 70vh;
  min-height: 500px;
  margin: 0 auto 0 auto;
  overflow: hidden;
}

.models-slide {
  position: absolute;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.6s ease-in-out;
  pointer-events: none;
}

.models-slide.active {
  opacity: 1;
  pointer-events: auto;
}

/* ==================== MODELS INFO PANEL (Top Left) ==================== */

.models-info {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 5000;
  max-width: 280px;
}

/* ==================== MODELS CONTENT (Full Width/Height) ==================== */

.models-content {
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
}

.models-content .portfolio-right-fullwidth {
  width: 100%;
  height: 100%;
  border: none;
  margin: 0;
  padding: 0;
  position: relative;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-sizing: border-box;
}

.models-content #worldmodel-container,
.models-content #model-thumbnail-container,
.models-content #jb-model-thumbnail-container,
.models-content #nys-model-thumbnail-container {
  width: 100%;
  height: 100%;
  position: relative;
}



/* ==================== MODELS NAVIGATION WRAPPER ==================== */

.models-navigation-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin: 15px auto 2vw auto;
  width: 100%;
  z-index: 100;
}

.models-arrow {
  position: static;
  transform: none;
  background: rgba(200, 200, 200, 0.8);
  color: var(--text-primary);
  font-size: 2em;
  padding: 10px 15px;
  cursor: pointer;
  border: none;
  user-select: none;
  transition: background 0.3s;
}

.models-arrow:hover {
  background: rgba(160, 160, 160, 0.9);
}

.models-indicators {
  position: static;
  transform: none;
  display: flex;
  gap: 12px;
  background: rgba(255, 255, 255, 0.9);
  padding: 8px 10px;
  border-radius: 20px;
}

.models-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #ccc;
  cursor: pointer;
  transition: background 0.3s;
}

.models-dot:hover {
  background: #999;
}

.models-dot.active {
  background: #333;
}




/* ==================== CONTROLS & BUTTONS ==================== */

.controls-group,
.controls-container-group {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  z-index: 10;
  padding: 0;
  width: 100%;
}

.controls-container-group {
  gap: 0px;
  margin-top: 8px;
}

.controls-container {
  display: flex;
  flex-direction: column;
  width: 100%;
  align-items: flex-start;
  margin-bottom: 0;
  pointer-events: auto;
  position: relative;
  box-sizing: border-box;
}

.controls-grid,
.controls-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  align-items: center;
  /* gap: 5px; */
}

.control-section,
.control-buttons-group {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

#worldcontrols-container,
#jbmodelcontrols-container,
#nysmodelcontrols-container {
  display: flex;
  flex-direction: column;
  padding: 0px;
  margin-bottom: 15px;
  z-index: 10;
  box-sizing: border-box;
}

#nysmodelcontrols-container {
  align-items: flex-start;
}


/* ==================== 3D MODEL BUTTONS ==================== */

.threedmodelbutton {
  width: 25px;
  height: 25px;
  color: var(--text-secondary);
  font-size: 14px;
  cursor: pointer;
  transition: background-color 0.2s, transform 0.1s, box-shadow 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-right: 5px;
  margin-bottom: 5px;
  background: rgb(255 255 255 / 90%);
  border-radius: 2px;
  border: 1px solid #8080804a;
  box-shadow: 2px 2px 1px rgba(0, 0, 0, 0.25);
}

.threedmodelbutton:hover {
  background: var(--highlight-bg);
}

.threedmodelbutton:active {
  transform: translateY(1px);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

/* ==================== LAYER BUTTONS ==================== */

.layer-buttons-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-top: 10px;
  justify-content: flex-start;
}

.layer-button {
  width: 100%;
  padding: 10px;
  font-size: 13px;
  font-weight: bold;
  border-radius: 4px;
  background: rgba(212, 218, 252, 0.9);
  border: 1px solid #8080804a;
  display: block;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
}

.layer-button:hover {
  background: rgba(180, 180, 180, 0.9);
}

.layer-button.active {
  background: rgba(0, 88, 146, 0.9);
  color: white;
}

/* ==================== LEGEND ==================== */

#jblegend-container {
  padding: 0px;
  /* border-radius: 2px; */
  font-size: 12px;
  max-width: 160px;
  min-width: 140px;
  position: relative;
  align-self: flex-start;
  margin: 0 0 8px 0;
}

#jblegend-container h3 {
  margin: 0 0 8px 0;
  font-size: 14px;
  font-weight: bold;
  color: var(--text-secondary);
  text-align: left;
}

#jblegend {
  list-style: none;
  padding: 0;
  margin: 0;
}

#jblegend li {
  display: flex;
  align-items: center;
  margin-bottom: 3px;
  padding: 1px 0;
  justify-content: flex-start;
}

.jbcolor-box {
  width: 20px;
  height: 14px;
  margin-right: 6px;
  border: 1px solid #999;
  border-radius: 2px;
  flex-shrink: 0;
}

.jblabel {
  font-size: 13px;
  color: var(--text-darker);
  line-height: 1.2;
  text-align: left;
}

/* ==================== MODEL CONTAINERS ==================== */

#worldcanvas {
  width: 100%;
  height: 100%;
  display: block;
}

#worldmodel-container {
  width: 100%;
  height: 100%;
  position: relative;
  z-index: 1;
  min-width: 400px;
}

#jbmodel-container {
  width: 100%;
  height: 100%; 
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  background: #e0e0e0;
  overflow: hidden;
}

.nysmodel-container {
  width: 100%;
  height: 100%;
  min-width: 400px;
  min-height: 300px;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  background: #fff;
  overflow: hidden;
  box-sizing: border-box;
}

.nysmodel-container canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
}

/* ==================== LOADING OVERLAYS ==================== */

#worldloading-overlay,
#jbmodelloading-overlay,
#nysmodelloading-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(255, 255, 255, 0.8);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 100;
}

#nysmodelloading-overlay {
  background-color: rgba(255, 255, 255, 0.9);
}

#worldloading-progress,
#jbmodelloading-progress,
#nysmodelloading-progress {
  width: 200px;
  height: 10px;
  background-color: #f0f0f0;
  border-radius: 5px;
  overflow: hidden;
  margin-top: 10px;
}

#nysmodelloading-progress {
  width: 250px;
  height: 12px;
  border-radius: 6px;
  margin-top: 15px;
  border: 1px solid #ddd;
}

#worldloading-bar,
#jbmodelloading-bar,
#nysmodelloading-bar {
  width: 0;
  height: 100%;
  background-color: #005892;
  transition: width 0.5s ease;
}

#nysmodelloading-bar {
  transition: width 0.3s ease;
}

#worldloading-message,
#jbmodelloading-message {
  font-size: 12px;
  font-family: var(--font-family);
  font-weight: normal;
}

#nysmodelloading-message {
  font-size: 16px;
  font-family: var(--font-family);
  font-weight: normal;
  color: var(--text-secondary);
  margin: 0;
  text-align: center;
}

#nysmodelloading-details {
  font-size: 12px;
  color: #666;
  margin-top: 10px;
  text-align: center;
}



/* ==================== MISC ==================== */

.model-description {
  font-size: 13px;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.8);
  margin-bottom: 10px;
  display: block;
  line-height: 1.4;
}

.group-label {
  display: none;
}