/* =========================================================
   V241 — Right panel alternate pages
   AI ANALYSIS | PARTS INTELLIGENCE
   Frontend presentation only.
   ========================================================= */

.v225-column.v225-right,
.v225-right{
  min-height:0;
}

/* Two compact borderless tabs directly under the right-panel header */
.yv241-right-tabs{
  flex:0 0 auto;
  display:grid;
  grid-template-columns:1fr 1fr;
  align-items:center;
  gap:8px;
  padding:8px 14px 9px;
  border-bottom:1px solid #24324a;
  background:#071522;
}

.yv241-right-tab{
  appearance:none;
  border:0!important;
  outline:0!important;
  box-shadow:none!important;
  background:transparent!important;
  border-radius:0!important;
  min-width:0;
  height:55px;
  padding:4px 5px;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:5px;
  color:#8796ad;
  cursor:pointer;
}

.yv241-right-tab:hover{
  color:#d6c9ff;
}

.yv241-right-tab.is-active{
  color:#aa82ff!important;
}

.yv241-right-tab-icon{
  width:23px;
  height:23px;
  display:flex;
  align-items:center;
  justify-content:center;
}

.yv241-right-tab-icon svg{
  width:23px;
  height:23px;
  fill:none;
  stroke:currentColor;
  stroke-width:1.9;
  stroke-linecap:round;
  stroke-linejoin:round;
}

.yv241-right-tab-label{
  font-size:7px;
  line-height:1;
  font-weight:900;
  letter-spacing:.085em;
  white-space:nowrap;
}

/* ---------------- AI ANALYSIS page ----------------
   Preserve everything already present in the right rail except Part Intelligence.
*/
.v225-right.yv241-ai-mode .v225-part-drawer,
.v225-column.v225-right.yv241-ai-mode .v225-part-drawer{
  display:none!important;
}

/* ---------------- PARTS INTELLIGENCE page ----------------
   Hide current-result / thinking / trace / voice sections and let the existing
   Part Intelligence component own the page.
*/
.v225-right.yv241-parts-mode .v225-right-scroll,
.v225-column.v225-right.yv241-parts-mode .v225-right-scroll{
  display:flex!important;
  flex-direction:column!important;
  min-height:0!important;
  overflow:hidden!important;
  padding:12px!important;
}

.v225-right.yv241-parts-mode .v225-right-scroll > *:not(.v225-part-drawer),
.v225-column.v225-right.yv241-parts-mode .v225-right-scroll > *:not(.v225-part-drawer){
  display:none!important;
}

.v225-right.yv241-parts-mode .v225-part-drawer,
.v225-column.v225-right.yv241-parts-mode .v225-part-drawer{
  display:flex!important;
  flex-direction:column!important;
  flex:1 1 auto!important;
  min-height:0!important;
  height:100%!important;
  max-height:none!important;
  margin:0!important;
}

.v225-right.yv241-parts-mode .v225-part-drawer .v225-part-body,
.v225-column.v225-right.yv241-parts-mode .v225-part-drawer .v225-part-body{
  display:flex!important;
  flex:1 1 auto!important;
  flex-direction:column!important;
  min-height:0!important;
  overflow:hidden!important;
}

.v225-right.yv241-parts-mode .v225-part-content,
.v225-column.v225-right.yv241-parts-mode .v225-part-content{
  flex:1 1 auto!important;
  min-height:0!important;
  max-height:none!important;
  overflow:auto!important;
  scrollbar-width:thin;
}

/* Do not interfere with the existing right-side collapse rail */
body.yv239-right-collapsed #yv241-right-tabs,
body.yv239-workspace-focus #yv241-right-tabs{
  display:none!important;
}

@media(max-width:1180px){
  .yv241-right-tabs{
    position:sticky;
    top:0;
    z-index:5;
  }

  .v225-right.yv241-parts-mode .v225-part-drawer,
  .v225-column.v225-right.yv241-parts-mode .v225-part-drawer{
    min-height:420px!important;
  }
}
