

/* ============================================================= */

/* GLOBAL                                                        */

/* ============================================================= */

#xps-element-lines-static {

  margin: 0.4rem 0 1rem 0;

  font-size: 0.82rem !important;

  line-height: 1.2 !important;

}



/* ============================================================= */

/* PERIODIC TABLE                                                */

/* ============================================================= */

#xps-element-lines-static .xps-periodic-shell {

  max-width: 690px;

  margin: 0 auto 0.45rem auto;

}



#xps-element-lines-static .xps-periodic-table {

  position: relative;

  display: grid;

  grid-template-columns:

    repeat(

      18,

      minmax(34px, 1fr)

    );

  gap: 2px;

}



/* ============================================================= */

/* ELEMENT CELLS                                                 */

/* ============================================================= */

#xps-element-lines-static .xps-periodic-table button,

#xps-element-lines-static .xps-series-row button {

  position: relative;

  min-width: 0;

  height: 29px;

  padding: 0;

  border: 1px solid #b7bec8;

  border-radius: 0.18rem;

  background: transparent;

  color: inherit;

  cursor: pointer;

  overflow: hidden;

  transition:

    border-color 0.12s ease,

    *background* 0.12s ease,

    color 0.12s ease;

}



/* Atomic number */

#xps-element-lines-static .xps-z {

  position: absolute;

  top: 2px;

  left: 3px;

  font-size: 7px !important;

  line-height: 1 !important;

  opacity: 0.65;

}



/* Element symbol */

#xps-element-lines-static .xps-symbol {

  position: absolute;

  left: 50%;

  top: 60%;

  transform: translate(-50%, -50%);

  font-size: 13px !important;

  line-height: 1 !important;

  font-weight: 700;

}



/* Hover */

#xps-element-lines-static .xps-periodic-table button:hover:not(:disabled),

#xps-element-lines-static .xps-series-row button:hover:not(:disabled) {

  border-color:

    var(--accent);

}



/* Selected */

#xps-element-lines-static .xps-element-selected {
  background: var(--xps-element-color, #14b8a6) !important;
  border-color: var(--xps-element-color, #14b8a6) !important;
  color: white !important;
}



/* Disabled */

#xps-element-lines-static .xps-periodic-table button:disabled,

#xps-element-lines-static .xps-series-row button:disabled {

  opacity: 0.28;

  cursor: default;

}



#xps-element-lines-static .xps-gap {

  visibility: hidden;

}



/* ============================================================= */

/* L / A MARKERS                                                 */

/* ============================================================= */

#xps-element-lines-static .xps-series-marker {

  display: flex;

  align-items: center;

  justify-content: center;

  height: 29px;

  border: 1px dashed #9ca3af;

  border-radius: 0.18rem;

  opacity: 0.55;

  font-size: 0.72rem !important;

  font-weight: 700;

}



/* ============================================================= */

/* CENTRAL SOURCE PANEL                                          */

/* ============================================================= */

#xps-element-lines-static .xps-source-panel {

  position: absolute;

  top: 1px;

  left:

    calc((100% / 18) * 2);

  width:

    calc((100% / 18) * 10);

  height: 85px;

  z-index: 5;

  display: flex;

  flex-direction: column;

  align-items: center;

  justify-content: center;

  gap: 0.18rem;

}



#xps-element-lines-static .xps-source-instruction {

  max-width: 440px;

  margin-bottom: 0.12rem;

  text-align: center;

  font-size: 0.64rem !important;

  line-height: 1.2 !important;

  opacity: 0.65;

}



#xps-element-lines-static .xps-source-panel label {

  font-size: 0.66rem !important;

  font-weight: 600;

  opacity: 0.8;

}



#xps-element-lines-static .xps-source-panel select {

  width: 185px;

  max-width: 90%;

  padding: 0.28rem 0.5rem;

  border: 1px solid #d1d5db;

  border-radius: 0.4rem;

  background: transparent;

  color: inherit;

  font-size: 0.73rem !important;

}

#xps-element-lines-static .xps-source-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  width: 100%;
}

#xps-element-lines-static .xps-line-filter {
  display: inline-flex;
  border: 1px solid #d1d5db;
  border-radius: 0.4rem;
  overflow: hidden;
}

#xps-element-lines-static .xps-line-filter button {
  padding: 0.28rem 0.48rem;
  border: 0;
  border-right: 1px solid #d1d5db;
  background: transparent;
  color: inherit;
  font-size: 0.68rem !important;
  line-height: 1.2;
  cursor: pointer;
  opacity: 0.65;
}

#xps-element-lines-static .xps-line-filter button:last-child {
  border-right: 0;
}

#xps-element-lines-static .xps-line-filter button:hover {
  opacity: 1;
}

#xps-element-lines-static .xps-line-filter button.is-active {
  background: #6b7280;
  color: white;
  opacity: 1;
}




/* ============================================================= */

/* LANTHANIDES / ACTINIDES                                       */

/* ============================================================= */

#xps-element-lines-static .xps-series-row {

  display: grid;

  grid-template-columns:

    29px repeat(15, minmax(29px, 1fr));

  gap: 2px;

  width:

    calc(100% - 94px);

  margin-left: 94px;

  margin-top: 2px;

}



#xps-element-lines-static .xps-series-label {

  display: flex;

  align-items: center;

  justify-content: center;

  height: 29px;

  border: 1px solid #9ca3af;

  border-radius: 0.18rem;

  font-weight: 700;

  opacity: 0.6;

}



/* ============================================================= */

/* CHART AREA                                                    */

/* ============================================================= */

#xps-element-lines-static .xps-element-chart-container {

  width: 75%;

  max-width: 900px;

  margin:

    0.18rem auto 0 auto;

}

#xps-element-lines-static .xps-chart-header {
  position: relative;

  display: flex;
  align-items: center;
  justify-content: center;

  min-height: 1.55rem;
}


#xps-element-lines-static .xps-expand-button {
  position: absolute;

  top: 50%;
  right: 0;

  transform: translateY(-50%);

  padding: 0.22rem 0.5rem;

  border: 1px solid #9ca3af;
  border-radius: 0.35rem;

  background: transparent;
  color: inherit;

  font-size: 0.68rem !important;
  line-height: 1;

  cursor: pointer;

  opacity: 0.72;
}


#xps-element-lines-static .xps-expand-button:hover {
  opacity: 1;
  border-color: currentColor;
}


/*
 * Expand only the spectrum area, not the periodic table.
 * The chart grows toward the viewport width and remains centred.
 */







@media (max-width: 768px) {

  #xps-element-lines-static .xps-expand-button {
    position: static;

    transform: none;

    margin-left: 0.45rem;
  }

}



  




#xps-element-lines-static .xps-element-chart-title {

  text-align: center;

  margin-bottom: 0.12rem;

  color: inherit;

  font-size: 1rem !important;

  font-weight: 700;

}



/* ============================================================= */

/* SELECTED LINE INFO                                            */

/* ============================================================= */

#xps-element-lines-static .xps-line-info {

  width: fit-content;

  min-width: 170px;

  max-width: 360px;

  margin:

    0.2rem auto 0.3rem auto;

  padding:

    0.28rem 0.6rem;

  border: 1px solid;

  border-radius: 0.4rem;

  text-align: center;

}



#xps-element-lines-static .xps-line-info {
  color: var(--xps-info-color, #14b8a6);
  border-color: var(--xps-info-color, #14b8a6);
  background:
    color-mix(
      in srgb,
      var(--xps-info-color, #14b8a6) 7%,
      transparent
    );
}



#xps-element-lines-static .xps-line-info-main {

  font-size: 0.76rem !important;

  font-weight: 600;

}



/* ============================================================= */

/* SURVEY                                                        */

/* ============================================================= */

#xps-element-lines-static .xps-element-chart-wrapper {
  position: relative;
  width: 100%;
  margin-top: 0;
}



#xps-element-lines-static .xps-element-chart {

  display: block;

  width: 100%;

  height: auto;

}



#xps-element-lines-static svg text {

  fill: currentColor;

}



/* ============================================================= */

/* AXES                                                          */

/* ============================================================= */

#xps-element-lines-static .xps-axis {

  stroke: #9ca3af;

  stroke-width: 1;

}



#xps-element-lines-static .xps-tick-label {

  font-size: 15px !important;

  opacity: 0.85;

}



#xps-element-lines-static .xps-axis-label {

  font-size: 20px !important;

  font-weight: 600;

}



/* ============================================================= */

/* STICKS                                                        */

/* ============================================================= */

#xps-element-lines-static .xps-stick-xps,
#xps-element-lines-static .xps-stick-auger {
  stroke-width: 4;
  opacity: 0.84;
  cursor: pointer;
}



#xps-element-lines-static .xps-stick-xps:hover,

#xps-element-lines-static .xps-stick-auger:hover {

  opacity: 1;

  stroke-width: 7;

}



#xps-element-lines-static .xps-stick-selected {

  opacity: 1 !important;

  stroke-width: 8 !important;

}



/* ============================================================= */

/* LABELS                                                        */

/* ============================================================= */

#xps-element-lines-static .xps-line-name {

  font-size: 14px !important;

  font-weight: 700;

  cursor: pointer;

}







/* ============================================================= */

/* LEGEND                                                        */

/* ============================================================= */

#xps-element-lines-static .xps-element-legend {
  position: absolute;
  top: 0.35rem;
  left: 0.55rem;
  z-index: 3;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.55rem;
  max-width: 55%;
  padding: 0.18rem 0.35rem;
  font-size: 0.68rem !important;
  line-height: 1 !important;
  opacity: 0.9;
  pointer-events: none;
}

#xps-element-lines-static .xps-element-legend span {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  white-space: nowrap;
}

#xps-element-lines-static .xps-element-legend i {
  display: inline-block;
  width: 14px;
  height: 3px;
  border-radius: 999px;
}

#xps-element-lines-static .xps-source-instruction.xps-limit-flash {
  color: #f59e0b;
  opacity: 1;
}




/* ============================================================= */
/* EXPANDED SPECTRUM MODAL                                       */
/* ============================================================= */

#xps-element-lines-static .xps-spectrum-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
}

#xps-element-lines-static .xps-spectrum-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.52);
}

#xps-element-lines-static .xps-spectrum-modal-panel {
  position: absolute;
  top: 4vh;
  left: 50%;

  width: min(94vw, 1800px);
  height: min(90vh, 980px);

  transform: translateX(-50%);

  padding: 0.75rem 0.9rem;

  border: 1px solid #64748b;
  border-radius: 0.55rem;

  background: Canvas;
  color: CanvasText;

  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.38);

  overflow: auto;
}

#xps-element-lines-static .xps-spectrum-modal-body {
  width: 100%;
  min-height: 100%;
}

#xps-element-lines-static .xps-spectrum-modal-body .xps-element-chart-container {
  width: 100%;
  margin-top: 0;
}

#xps-element-lines-static .xps-spectrum-modal-body .xps-element-chart {
  width: 100%;
}


#xps-element-lines-static .xps-spectrum-modal-body .xps-element-legend {
  top: 0.55rem;
  left: 0.75rem;

  gap: 0.75rem;

  padding: 0.28rem 0.45rem;

  font-size: 0.88rem !important;

  opacity: 0.95;
}


#xps-element-lines-static .xps-spectrum-modal-body .xps-element-legend i {
  width: 20px;
  height: 4px;
}


#xps-element-lines-static .xps-spectrum-modal-body .xps-line-info {
  min-width: 220px;
  max-width: 520px;

  margin-top: 0.28rem;

  padding: 0.42rem 0.85rem;
}


#xps-element-lines-static .xps-spectrum-modal-body .xps-line-info-main {
  font-size: 0.95rem !important;
  font-weight: 700;
}


#xps-element-lines-static .xps-spectrum-modal-body .xps-line-name {
  font-size: 16px !important;
}

#xps-element-lines-static .xps-spectrum-modal-body .xps-tick-label {
  font-size: 17px !important;
}

#xps-element-lines-static .xps-spectrum-modal-body .xps-axis-label {
  font-size: 22px !important;
}

/* ============================================================= */

/* MOBILE                                                        */

/* ============================================================= */

@media (max-width: 768px) {

  #xps-element-lines-static .xps-source-controls {
    flex-direction: column;
    gap: 0.3rem;
  }

  #xps-element-lines-static .xps-periodic-shell {

    overflow-x: auto;

  }



  #xps-element-lines-static .xps-periodic-table {

    min-width: 820px;

  }



  #xps-element-lines-static .xps-series-row {

    min-width: 710px;

  }

}


#xps-element-lines-static .xps-chart-actions{position:absolute;right:0;top:50%;transform:translateY(-50%);display:flex;gap:.35rem;align-items:center}
#xps-element-lines-static .xps-photo-button{display:inline-flex;align-items:center;justify-content:center;width:30px;height:28px;padding:0;border:1px solid #9ca3af;border-radius:.35rem;background:transparent;color:inherit;cursor:pointer;opacity:.75}
#xps-element-lines-static .xps-photo-button:hover{opacity:1;border-color:currentColor}
#xps-element-lines-static .xps-photo-button svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.6}
#xps-element-lines-static .xps-element-chart-wrapper{cursor:grab;user-select:none}
#xps-element-lines-static .xps-element-chart-wrapper.is-dragging{cursor:grabbing}


/* v0.16 interaction refinements */
#xps-element-lines-static .xps-chart-actions{
  position:absolute;
  right:0;
  top:50%;
  transform:translateY(-50%);
  display:flex;
  gap:.35rem;
  align-items:center;
}
#xps-element-lines-static .xps-line-info{
  cursor:pointer;
  user-select:none;
  transition:border-color .12s ease, background-color .12s ease, transform .12s ease;
}
#xps-element-lines-static .xps-line-info:hover{
  transform:translateY(-1px);
}
#xps-element-lines-static .xps-line-info::after{
  content:"Click to copy";
  display:block;
  margin-top:.12rem;
  font-size:.55rem;
  font-weight:500;
  opacity:.55;
}
#xps-element-lines-static .xps-line-info.is-copied::after{
  content:"Copied";
  opacity:.9;
}
