/*
    Created on : May 18, 2020, 9:07:36 PM
    Author     : teja
*/

/*Working Area Scrolling*/

#working_area_files .entry:last-of-type {
  margin-bottom: 0;
}

#workingarea_left {
  display: flex;
  height: 100%;
  position: relative;
  flex-direction: column;
}

#working_area_files {
    flex-grow: 1 !important;
    margin-bottom: 0.1em;
    overflow-y: auto !important;
    min-height: 150px;
    max-height: calc(100vh - 310px);
}


/* End Working Area Scrolling */

svg#area_preview {
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -o-user-select: none;
  -ms-user-select: none;
    box-sizing: border-box;
}

.workingarea {
  border: 1px solid black;
  height: 80vh;
  width: auto;
  position: relative;
}

.workingarea.pen-mode {
  cursor: crosshair;
}

.workingarea .laserpos {
  position: absolute;
  right: 0.5em;
  bottom: 0.3em;
  color: #999;
}

.workingarea .laser_btn {
  position: absolute;
  right: 0.5em;
  top: 0.3em;
}

svg#area_preview text {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  cursor: default;
  pointer-events: none;
}

#penDrawingPreview path {
  pointer-events: none;
  vector-effect: non-scaling-stroke;
}

svg#area_preview circle.ft_handle {
  fill-opacity: 0.7;
  stroke: #ff0000;
  stroke-width: 2.5px;
  fill: #fff;
  vector-effect: non-scaling-stroke;
}
svg#area_preview rect.ft_bbox_transformed {
  stroke: #ff0000;
  stroke-width: 2.5px;
  vector-effect: non-scaling-stroke;
  stroke-dasharray: 5, 5;
  fill-opacity: 0.3;
  stroke-opacity: 1;
  fill: #999;
}

svg#area_preview .vector_outline {
  vector-effect: non-scaling-stroke;
  stroke-width: 0.8;
}

svg#area_preview .userSVG,
svg#area_preview .userIMG,
svg#area_preview .userText {
  cursor: pointer;
}

body.ctrlKey svg#area_preview.mbtransformActive .userSVG,
body.ctrlKey svg#area_preview.mbtransformActive .userIMG,
body.ctrlKey svg#area_preview.mbtransformActive .userText {
  cursor: copy;
}

.userText.designHighlight .qtOutlineGroup path,
.userSVG.designHighlight .vector_outline {
  stroke-width: 2px !important;
  filter: none;
}

.userSVG.designHighlight image {
    filter: url(#designHighlight);
}


svg#area_preview path,
svg#area_preview circle,
svg#area_preview line,
svg#area_preview polyline,
svg#area_preview polygon,
svg#area_preview ellipse,
svg#area_preview rect {
  vector-effect: non-scaling-stroke !important;
}

svg g#camera_markers circle {
  opacity: 0;
  pointer-events: none;
}

circle#marker_preview_pane,
g#camera_markers.markerNE circle#markerNE,
g#camera_markers.markerSE circle#markerSE,
g#camera_markers.markerNW circle#markerNW,
g#camera_markers.markerSW circle#markerSW {
  opacity: 1;
  animation: blinker 2s linear infinite;
  pointer-events: auto;
}

g#camera_markers.markerNE.gray circle#markerNE,
g#camera_markers.markerSE.gray circle#markerSE,
g#camera_markers.markerNW.gray circle#markerNW,
g#camera_markers.markerSW.gray circle#markerSW {
  opacity: 0.6;
  animation: none;
  pointer-events: auto;
}

svg#area_preview #userContent .hideWhileRastering {
  opacity: 0;
}

@keyframes blinker {
  50% {
    opacity: 0;
  }
}

#workingarea_left a.dropdown.collapsed span.caret {
    transform: rotate(-90deg);
}

#zoomFactor {
  position: absolute;
  left: 0.3em;
  bottom: 0.4em;
  color: #e25303;
  z-index: 999;
}

#zoom_monitor_wrapper {
  max-width: 20vh;
  position: relative;
  margin: auto;
}
#zoom_monitor {
  width: 100%;
  position: relative;
  background-color: #f1f1f1;
  border: 1px solid #ccc;
}
#zoom_monitor > div {
  border: 1px solid #e25303;
  background-color: #fff;
  position: absolute;
  box-sizing: border-box;
}
#zoom_monitor_hint {
  pointer-events: none;
  width: 90%;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
}

#wa_view_settings_body div.accordion-inner > div:nth-child(1n + 2) {
  margin-top: 1em;
}

/*********************** BEGIN Rotary Mode ***********************/

#laser_cutter_mode_select {
    padding: 8px 0;
}

#wa_surface_settings_body {
    width: 100%;
}

#mrb_object_diameter.accordion-inner {
    padding-right: 0;
    padding-top: 0;
}

#round_object_example {
    border-left: 1px solid #eee;
}

#diameter_and_circumference_input {
    width: 60%;
}

#area_preview.rotary #diameter_lines,
#area_preview.rotary #non_laserable_areas {
    transform: none;
}

#area_preview.rotary.rotary_debug #non_laserable_areas {
    opacity: 0.7;
}

#clip_laserable_area {
    stroke: none;
    fill: #ff0000;
    opacity: 0.2;
    pointer-events: none;
}

#non_laserable_areas {
    pointer-events: none; /* deselection by click in working area (includes white non_laserable_areas) like user is used to */
}


#non_laserable_area .rotary_mode_revolution_overlap {
    opacity: 0.4;
    filter: url(#gcimage_preview);
}

.pathCircumferenceArrow {
    stroke-linejoin: round;
    stroke-linecap: round;
    fill: none;
}
.pathCircumferenceArrow.upper {
    stroke: #A4D1FF;
}
.pathCircumferenceArrow.lower {
    stroke: #3B8EA5;
}

#rotary_hints div.muted,
#rotary_hints a,
#working_height_hints a,
#working_height_hints div.muted {
    color: #999;
    font-size: 0.8rem;
}
#rotary_hints div.muted,
#working_height_hints div.muted {
    margin-bottom: 0.5em;
}


#rotary_installation_hints #rotary_flaps > use {
    display:none;
}

#rotary_installation_hints.is_not_aligned #rotary_flaps #hint_not_aligned_left ,
#rotary_installation_hints.is_not_aligned #rotary_flaps #hint_not_aligned_right,
#rotary_installation_hints.left_flap_open:not(.is_not_aligned) #rotary_flaps #hint_left_flap_open ,
#rotary_installation_hints.right_flap_open:not(.is_not_aligned) #rotary_flaps #hint_right_flap_open {
    display:initial;
}

#rotary_gap_arrow {
    animation: moveUp 1s infinite;
}

@keyframes moveUp {
    0% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-5px);
    }
    100% {
        transform: translateY(-5px);
    }
}

@keyframes closeFlap {
    0% {
        transform: rotate(-90deg);
    }
    30% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(0deg);;
    }
}

/******************************** END Rotary Mode ***************************/

/** BEGIN Toolbox (replacing per file_list_entry information) **/

#toolboxWrapper {
    border: 1px solid #999;
    border-radius: 8px;
    margin: 0.5em;
    position: relative;
    z-index: 1;
    background-color: #fff;
    box-shadow: 0 2px 15px 15px #ffffff77;
}

#toolboxWrapper .caret {
    border-top-color: #999;
}

#toolboxWrapper .accordion-inner {
    padding: 0.5em 0.7em;
}

.toolboxRow:last-of-type {
    margin-bottom: 0;
}


.toolboxItem {
    width: 49%;
    box-sizing: border-box;
    display: inline-block;
    margin-bottom: .3em;
}

#selectionToolbox .link_width_and_height input.decent_input {
    width: 68%;
}

#selectionToolbox {
    opacity: 0.3;
    transition: opacity .3s ease-in-out 0s;
}

#selectionToolbox.active {
    opacity: 1;
}

#selectionToolbox:not(.active) input {
    pointer-events: none;
}

#selectionToolbox .detail_information {
  clear: both;
}

#selectionToolbox,
#selectionToolbox input.decent_input {
  font-size: 0.8rem;
}
#selectionToolbox input {
  width: calc(100% - 1.3em);
  box-sizing: border-box;
  padding-left: 0.2em;
  padding-top: 0;
  padding-bottom: 0;
  height: 1.3em;
  margin-bottom: 0.2em;
}


#selectionToolbox:not(.model_svg):not(.freedraw) .toolboxRow.svgOnly {
    display: none;
}

#selectionToolbox:not(.model_svg):not(.freedraw) .toolboxItem.svgOnly {
    display: none;
}


/** units mm or % **/
#selectionToolbox.show_percent input.unit_mm,
#selectionToolbox input.unit_percent {
  display: none;
}
#selectionToolbox input.unit_mm,
#selectionToolbox.show_percent input.unit_percent {
  display: inline-block;
}

/** scale proportional **/
#scale_proportional_switch.scale_prop_btn > i {
  pointer-events: none;
}
#scale_proportional_switch:not(.scale_proportional).scale_prop_btn
  > i.icon-link,
#scale_proportional_switch.scale_proportional.scale_prop_btn
  > i.icon-unlink {
  display: none;
}
#scale_proportional_switch.scale_proportional.scale_prop_btn
  > i.icon-link,
#scale_proportional_switch:not(.scale_proportional).scale_prop_btn
  > i.icon-unlink {
  display: inline;
}
#scale_proportional_switch.btn-link.scale_prop_btn:hover {
  text-decoration: none;
  box-shadow: none;
}
#scale_proportional_switch.scale_prop_btn:hover > i::before {
  text-decoration: none;
}
#scale_proportional_switch.scale_prop_btn > i::before {
  transform: rotate(-45deg);
}

#standardFunctions {
    position: relative;
    top: -1.8em;
    z-index: 0;
}

#standardFunctions>div.btn-group {
    padding: 0 8px;
    display: block;
}

#standardFunctions .btn-group button {
    padding: 1.5em 0.5em 0.3em;
    width: calc( 100% / 9 );
    box-sizing: border-box;
    margin: 0;
}

.alignment-dropdown-grid-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3 columns */
    grid-template-rows: repeat(2, 1fr); /* 2 rows */
    width: 100%;
    height: 100%;
    list-style: none;
    padding: 0;
    margin: 0;
}

.alignment-dropdown-grid-container .btn-link {
    display: flex;
    align-items: center;
    justify-content: center;
}

/** END Transform Accordion (replacing per file_list_entry information) **/

#addDesignBtn {
    border-radius: 50%;
    width: 5em;
    height: 5em;
    top: 50%;
    bottom: 50%;
    right: -2em;
    transform: translate(0%, -50%);
    position: absolute;
    border: 0.5em solid white;
    background-color: #fff;
    z-index: 1001;

    /* ---- Tunables ---- */
    --n: 5;                 /* << set total count here */
    --flowerRadius: 6em;    /* distance from center */
    --start: -120deg;       /* first petal angle */
    --spread: 210deg;       /* total arc (360deg for full circle) */
    --delayStep: 50ms;      /* stagger between petals */
}

#addDesignBtn .btn {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    min-width: unset;
    border-radius: 50%;
    z-index: 999;
    transition: background-color ease-in-out .2s 0s, transform ease-in-out .2s 0s;
    transform-origin: center center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    box-sizing: border-box;
}

#addDesignBtn .btn i:not(.fa-2x) {
    font-size: 1.5em;
    margin-top: 0.5em;
}

#addDesignBtn .btn span {
    font-size: 0.8em;
    font-weight: normal;
}

#addDesignBtn .btn:hover {
    border: 1px solid #e25303;
}


#addDesignBtn.active .btn:last-of-type{
    transform: scale(0.7) rotate(45deg);
    background-color: #fca97b;
    border-color: #fca97b;
}
#addDesignBtn .btn:last-of-type{
    background-color: #e25303;
    box-shadow: 1px 2px 6px rgba(0, 0, 0, 0.25);
    border-color: #e25303;
    color: #ffffff;
}
#addDesignBtn .btn:last-of-type:hover{
    background-color: #e75606;
    box-shadow: 0 0 0 rgba(0, 0, 0, 0.25);
    border-color: #e75606;
    color: #ffffff;
}

/* Base (unchanged parts of your CSS remain) */
#addDesignBtn .flowerBtn.btn{
  transform: none;
  box-shadow: 1px 2px 6px rgb(0 0 0 / 10%);
  transition: background-color .2s ease-in-out,
              transform .2s ease-in-out,
              box-shadow .2s ease-in-out;
}


/* Compute transform & delay from --n and per-item --i */
#addDesignBtn.active .flowerBtn.btn{
  /* avoid div by zero when --n is 1 */
  --step: calc(var(--spread) / max(1, (var(--n) - 1)));
  --angle: calc(var(--start) + var(--i) * var(--step));

  transform: rotate(var(--angle)) translate(var(--flowerRadius)) rotate(calc(-1 * var(--angle)));
  transition-delay: calc(var(--i) * var(--delayStep));
  box-shadow: 1px 2px 6px rgba(0,0,0,.25);
}

/* ---- Assign indices (CSS-only) ---- */
/* Extend this block to the maximum you need */
#addDesignBtn .flowerBtn.btn:nth-of-type(1){ --i: 0; }
#addDesignBtn .flowerBtn.btn:nth-of-type(2){ --i: 1; }
#addDesignBtn .flowerBtn.btn:nth-of-type(3){ --i: 2; }
#addDesignBtn .flowerBtn.btn:nth-of-type(4){ --i: 3; }
#addDesignBtn .flowerBtn.btn:nth-of-type(5){ --i: 4; }
#addDesignBtn .flowerBtn.btn:nth-of-type(6){ --i: 5; }
#addDesignBtn .flowerBtn.btn:nth-of-type(7){ --i: 6; }
#addDesignBtn .flowerBtn.btn:nth-of-type(8){ --i: 7; }
#addDesignBtn .flowerBtn.btn:nth-of-type(9){ --i: 8; }
#addDesignBtn .flowerBtn.btn:nth-of-type(10){ --i: 9; }

#wa_filelist{
    margin-left: 15px;
    margin-right: 3em;
}

#wa_filelist .file_list_entry {
  border-bottom: 1px dotted lightgray;
  margin-bottom: 0;
  user-select: none;
  cursor: pointer;
  padding-bottom: 0.3em;
  padding-top: 0.3em;
  margin-top: 0;
}

#wa_filelist .file_list_entry .title {
  max-width: 80%;
  text-overflow: ellipsis;
  overflow: hidden;
  cursor: default;
  user-select: none;
  text-wrap: nowrap;
}
#wa_filelist .file_list_entry .detail_information {
  clear: both;
}

#wa_filelist .detail_information,
#wa_filelist .detail_information input.decent_input {
  font-size: 0.8rem;
}
#wa_filelist .detail_information input {
  width: calc(30% - 1.5em);
  box-sizing: border-box;
  padding-left: 0.2em;
  padding-top: 0;
  padding-bottom: 0;
  height: 1.3em;
  margin-bottom: 0.2em;
}
#wa_filelist .detail_information input.wide {
  width: calc(37% - 1em);
}

#wa_filelist .file_list_entry .dropdown {
  display: inline-block;
}
#wa_filelist .file_list_entry .dropdown li {
  padding: 0 0.7em;
  color: #555;
}
#wa_filelist .file_list_entry .dropdown li i {
  color: #e25303;
}

#wa_filelist .misfit_warning {
  display: none;
}
#wa_filelist .misfit .misfit_warning {
  display: block;
}

#wa_filelist .entry .file_list_entry:hover {
    border-left: 4px solid #e2530366;
    padding-left: 0.7em;
    margin-left: calc( -0.7em - 4px );
    background-color: #f9f9f9;
}
#wa_filelist .entry.mbtSelected .file_list_entry {
    border-left: 4px solid #e25303;
    padding-left: 0.7em;
    margin-left: calc( -0.7em - 4px );
}

#wa_filelist div.scrollable{
    overflow: visible;
}

#wa_filelist .entry:not(.isTransformed) .transformResetBtn {
  display: none;
}

#svg_color_editor_dialog .modal-body {
  max-height: 420px;
  overflow-y: auto;
}

/* don't crop the expanded tiny color picker */
#svg_color_editor_dialog .modal-body {
    overflow: visible !important;
}

#svg_color_editor_dialog .svg-color-editor-control {
    display: flex;
    align-items: center;
    gap: 0.75em;
    flex-wrap: wrap;
    margin-bottom: 1.2em;
}

#svg_color_editor_dialog .svg-color-editor-preview.filling {
    background-image:none;
}

#svg_color_editor_dialog .svg-color-editor-preview {
    width: 2em;
    height: 2em;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    background-image: url(../img/line_overlay.svg);
    background-position: center center;
    background-size: cover;
}

#svg_color_editor_dialog .svg-color-editor-picker {
    margin-bottom: .75em;
}

#svg_color_editor_dialog .svg-color-editor-value {
   min-width: 80px;
    padding-left: 1em;
}

svg path#lasso {
    stroke: #a4d1ff;
    stroke-width: 2px;
    fill: none;
    vector-effect: non-scaling-stroke;
    pointer-events: none;
    stroke-dasharray: 5 5;
}

svg#area_preview.lassoActive #userContent * {
    pointer-events: none;
}

/*** mini switch (used for toggling mm/% units and mirroring designs) ***/
.mini_switch {
    cursor: pointer;
    user-select: none;
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    align-content: center;
}

.mini_switch.disabled .mini_switch_trigger > div{
    background-color: #e0e0e0;
}
span.mini_switch_label {
  font-size: 0.75rem;
  color: #555;
  margin: 0;
  display: inline-block;
  width: 2.1em;
  text-align: center;
}
span.mini_switch_label.mini_switch_trigger {
  display: inline-block;
  border-radius: 1em;
  border: 1px solid #ccc;
  width: 2em;
  height: 1em;
  background-color: #eee;
  margin: 0 0 0;
  position: relative;
  font-size: .75em;
  top: 0px;
}
.mini_switch_trigger > div {
  width: 1em;
  background-color: #e25303;
  border-radius: 50%;
  display: inline-block;
  height: 1em;
  position: absolute;
  bottom: 0;
  right: 1em;
  transition: right 0.3s ease-in-out;
}

div.mini_switch.active > .mini_switch_trigger > div {
  right: 0.025em;
}

/* focus / hover both inputs as a hint for proportional scaling enabled */
#working_area_files .file_list_entry .link_width_and_height {
  display: inline;
}
#working_area_files
  .file_list_entry.scale_proportional
  .link_width_and_height:hover
  input.decent_input {
  border: 1px solid gray;
}
#working_area_files
  .file_list_entry.scale_proportional
  .link_width_and_height:focus-within
  input.decent_input {
  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075),
    0 0 8px rgba(82, 168, 236, 0.6);
  border: 1px solid gray;
}

#working_area_files .entry {
  margin-bottom: 0.3em;
}

#working_area_files .entry:last-of-type .file_list_entry {
    border-bottom: none;
    margin-bottom: 0.6em;
}

#working_area_files .entry:last-of-type::after {
   content: "\25B2";
   display: block;
   text-align: center;
   color: #e25303;
   line-height: 0.3em;
   position: relative;
   top: -0.5em;
}


#working_area_files .entry.designHighlight .title {
  font-weight: bold;
}


/*
* === IMAGE PREPROCESSING  ACCORDION ===
*/

.img_slider {
  margin-bottom: 24px;
}

.img_preprocessing_preview {
  background-size: 150px;
  display: inline-block;
  width: 150px;
  height: 150px;
}

.img_preprocessing_preview.after {
  position: relative;
}
.img_preprocessing_preview.after > div {
  position: absolute;
  top: 0;
  left: 0;
}

.img_preprocessing_preview.after .contrast,
.img_preprocessing_preview.after .sharpened,
.img_preprocessing_preview.after .sharpened_contrast {
  opacity: 0;
}
.working_area_image_preprocessing {
  margin-bottom: 0;
}

.working_area_image_preprocessing_heading {
  padding: 0;
  color: #999;
}

.working_area_image_preprocessing_sliders {
  margin: .5em .5em 0;
}

.working_area_image_preprocessing_link
  > button.image-preprocessing-collapsible {
  outline: transparent;
  text-decoration: none;
  padding: 0;
  white-space: nowrap;
  font-size: 0.8rem;
}

.working_area_image_preprocessing_link {
    text-align: right;
    color: #e25303;
}

.working_area_image_preprocessing_link > button.collapsed:after {
  transform: rotate(-45deg);
}

.working_area_image_preprocessing_link > button:after {
  padding: 0;
  content: "\270f";
  color: #383e42;
  display: inline-block;
  transform: rotate(45deg);
}
input.decent_input {
  border: 1px solid transparent;
  box-shadow: none;
  height: 1.3em;
  border-radius: 0.7em;
  padding: 0 0 0 .2em;
}

input.decent_input:focus,
input.decent_input:hover {
  border: 1px solid gray;
}

span.unit_mm:after {
    content: "mm";
    position: relative;
    transition: left .2s ease-in-out;
    left: -1em;
    bottom: -.06em;
}

/* touch devices don't have up down buttons in number input fields. */
@media (hover: none) and (pointer: coarse) {
    span.unit_mm:after {
        left: 0em;
    }
}
span.unit_mm:hover:after,
span.unit_mm:focus-within:after {
    left: 0.2em;
}

/*Laser button */

#laser_button {
  background-color: #e25303;
  background-image: none;
}

/*Laser button */



input#img-preprocess-transparency,
input#img-preprocess-contrast,
input#img-preprocess-brightness,
input#img-preprocess-sharpen,
input#img-preprocess-gamma {
  margin: 0;
  width: 100%;
  height: 2px !important;
}

.img-preprocess-cont {
  margin-bottom: .5em;
  width: 100%;
  position: relative;
  display: flex;
  align-items: center;
  padding: 0;
  gap: 0.6em;
    box-sizing: border-box;
}

.img-preprocess-cont i {
  min-width: 1.2em;
  text-align: center;
}

.img-preprocess-slider {
  flex: 1;
}

.range-value-display {
  min-width: 3em;
  text-align: right;
  font-size: 0.7rem;
  padding: 0 0.4em;
  border: 1px solid transparent;
  border-radius: 0.7em;
  height: 1.3em;
  line-height: 1.3em;
  box-shadow: none;
  background: #fff;
}

.range-value-display:focus,
.range-value-display:hover {
  border: 1px solid gray;
}

#preview-brightness {
  margin-left: 5px;
  vertical-align: middle;
}

#wa_filelist .img-preprocess-cont i {
  vertical-align: bottom;
}

/*Sliders*/

/*
* === WORKING AREA FOOTER ===
*/
.working_area_footer_text {
  font-size: 10px;
  color: darkgrey;
  margin: 0 0 0 30px;
}

/*
* === mbTransform styling ===
*/
body.mbtransform {
  cursor: crosshair;
}

#translateHandle {
  fill: #00000033;
  stroke: #e25303;
  stroke-width: 2;
  stroke-dasharray: 5 5;
  cursor: pointer;
  transition: opacity 0.2s ease-in-out;
  vector-effect: non-scaling-stroke;
}

/* necessary for direct dragging without activating translateHandle first. */
body.mbtransform #translateHandle:hover {
  cursor: grabbing;
}
#translateHandle:active {
  cursor: grabbing;
  opacity: 0.3;
}

body.ctrlKey #translateHandle {
  fill: none;
}

.cropHandle,
.scaleHandle,
#rotHandle {
  fill: #ffffff99;
  stroke: #e25303;
  stroke-width: 2;
  cursor: pointer;
}

#cropHandleNW {
    cursor: nw-resize;
}
#cropHandleSE {
    cursor: se-resize;
}

#mbtransformHandleGroup {
  display: none;
}
#mbtransformHandleGroup.active {
  display: block;
}

/* hide handles while transforming */
#mbtransformHandleGroup.active:is(.translate, .rotate, .scale, .crop)
  :is(.scaleHandle, .cropHandle, #rotHandle) {
  display: none;
}

#mbtransformHandleGroup .scaleHandle:hover, #rotHandle:hover {
    fill: #fff;
}

#translateVis,
#rotateVis,
#scaleVis {
  display: none;
}

#mbtransformHandleGroup.visualize.translate #translateVis,
#mbtransformHandleGroup.visualize.rotate #rotateVis,
#mbtransformHandleGroup.visualize.scale #scaleVis {
  display: block;
}

#scaleVis.showX #scaleXVis,
#scaleVis.showX #scaleXText,
#scaleVis.showY #scaleYVis,
#scaleVis.showY #scaleYText {
  display: block;
}
#scaleVis #scaleXVis,
#scaleVis #scaleXText,
#scaleVis #scaleYVis,
#scaleVis #scaleYText {
  display: none;
}

.transformGuideline {
  fill: none;
  stroke: #e25303;
  stroke-width: 1;
}

#translateVis text,
#rotateVis text,
#scaleVis text {
  font-family: DIN Pro, Roboto, Courier monospace;
  font-size: 9px;
  fill: #e25303;
  stroke: none;
}

#mbtransformHandleGroup path {
  vector-effect: non-scaling-stroke;
}

#mbtransformHandleGroup .isSelectedBBox {
  fill: none;
  stroke: #ffffff;
  stroke-width: 1;
  pointer-events: none;
}
#mbtransformHandleGroup.active.translate .isSelectedBBox,
#mbtransformHandleGroup.active.rotate .isSelectedBBox,
#mbtransformHandleGroup.active.scale .isSelectedBBox {
  display: none;
}

/* eye candy for gcode generation */
#userContent path,
#userContent circle,
#userContent ellipse,
#userContent line,
#userContent polygon,
#userContent polyline,
#userContent rect {
  transition-property: stroke-dashoffset;
  transition-duration: 0.5s;
  transition-timing-function: linear;
}

body.activitySpinnerActive #activitySpinnerOverlay {
  opacity: 1;
  pointer-events: auto;
  transition: opacity ease-out;
  transition-duration: 0.5s;
  transition-delay: 1s;
  caret-color: transparent;
}

body.activitySpinnerActive #activitySpinnerOverlay i {
  transform: scale(1);
}

#activitySpinnerOverlay {
  opacity: 0;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  user-select: none;
  background-color: rgba(0, 0, 0, 0.3);
  z-index: 99999;
  transition: opacity ease-out;
  transition-duration: 0.2s;
  transition-delay: 0s;
}

#activitySpinnerOverlay i {
  position: relative;
  left: 50vw;
  top: 50vh;
  font-size: 4em;
  transform: scale(0.1);
  transition-property: transform;
}

#pasteOverlay {
  opacity: 0;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  user-select: none;
  z-index: -99999;
  caret-color: transparent;
  color: transparent;
}


/* Flip Card Styles */
.flip-container {
    perspective: 1000px;
    height: 10em;
}

.flipper {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.6s;
    transform-style: preserve-3d;
    display: grid;
}

.flip-container.flip .flipper {
    transform: rotateY(180deg);
}

.flip-container .front, .flip-container .back {
    position: absolute;
    backface-visibility: hidden;
    display: block;
    grid-area: 1/1;
    width: 100%;
}

.flip-container .flipper .front {

}

.flip-container .flipper .back {
    transform: rotateY(180deg);
}
/* End Flip Card Styles */

/* Compact live values beside the sidebar headings. */
#wa-settings-accordion .wa-heading-summary {
  display: inline-flex;
  align-items: center;
  margin-left: .4em;
  font-weight: normal;
  color: #777;
  white-space: nowrap;
}
#wa-settings-accordion .wa-summary-icon {
  width: 1em;
  height: 1em;
  margin-left: .3em;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

#wa-settings-accordion .wa-heading-summary input.decent_input {
  width: 3.5em;
  margin-bottom: 0;
}
#wa-settings-accordion .accordion-heading > a.accordion-toggle:focus,
#wa-settings-accordion .accordion-heading > a.accordion-toggle:active {
  outline: none;
  box-shadow: none;
}
#wa-settings-accordion .accordion-heading > a.accordion-toggle:focus-visible {
  color: #e25303;
  text-decoration: underline;
}

#wa-settings-accordion #manual_position.decent_input,
#wa-settings-accordion .wa-heading-summary input.decent_input {
  color: #777;
}
#wa-settings-accordion #manual_position.decent_input:focus,
#wa-settings-accordion .wa-heading-summary input.decent_input:focus {
  color: #383e32;
}
#wa_view_settings_toggle:not(.collapsed) + #wa_zoom_summary {
  display: none;
}

#wa-settings-accordion .wa-heading-summary:focus-within {
  color: #383e32;
}

.mrb-profile-menu {
    position: relative; box-sizing: border-box; width: 100%;
    max-height: 40vh; overflow-y: auto;
    padding: 12px; background: #fff; color: #383e32;
    border-bottom: 1px solid #ddd;
}
.mrb-profile-menu li { margin-bottom: 8px; }
.mrb-profile-menu .btn-block { text-align: left; white-space: normal; }
.mrb-profile-menu small { display: block; color: #777; }
body.mrb-preparation-only #position_control,
body.mrb-preparation-only #focus_tab_btn { display: none; }

body.mrb-preparation-only #beamcam_image_svg,
body.mrb-preparation-only #camera_markers { display: none; }

body.mrb-preparation-only #wa-settings-accordion { display: none; }


#prepared_jobs_library { display: none; }
#designlib.show_prepared #prepared_jobs_library { display: block; }
#designlib .machine_jobs_heading { display: none; }
#designlib.show_prepared .machine_jobs_heading { display: block; }
#designlib.show_prepared #files .entry.recentjob { display: block; }

#prepared_jobs_library .browser-job-preview {
  display: block;
  position: relative;
  width: 100%;
  aspect-ratio: 5 / 4;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}
#prepared_jobs_library .browser-job-preview img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
#prepared_jobs_library .browser-job-preview:focus-visible { outline: 2px solid #e25303; }
#prepared_jobs_library .browser-job-entry .title { line-height: 20px; }
#prepared_jobs_library .dropdown-toggle { display: inline-block; width: 1.2em; height: 20px; float: right; }
#prepared_jobs_library .browser-job-ribbon { z-index: 1; pointer-events: none; }
#prepared_jobs_library .browser-job-ribbon {
  position: absolute;
  top: 8px;
  right: -4px;
  padding: 2px 12px;
  background: #e25303;
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  line-height: 18px;
  border-radius: 2px 0 0 2px;
}
#prepared_jobs_library .browser-job-ribbon::after {
  content: "";
  position: absolute;
  top: 100%;
  right: 0;
  border-top: 4px solid #a83e02;
  border-right: 4px solid transparent;
}


#mrb_state_header .machine-internet-status {
  color: lightgray;
  text-shadow: none;
}
.online #mrb_state_header .machine-internet-status {
  color: inherit;
  text-shadow: 0 0 6px rgba(226, 83, 3, 0.85);
}

#mrb_state_header .machine-exhaust-status { display: inline-block; color: inherit; }
#mrb_state_header .machine-exhaust-status.is-unknown { color: lightgray; }
#mrb_state_header .machine-exhaust-status.is-spinning {
  text-shadow: 0 0 6px rgba(226, 83, 3, 0.85);
  animation: machine-exhaust-spin 1s linear infinite;
}
@keyframes machine-exhaust-spin {
  to { transform: rotate(360deg); }
}

#mrb_state_header .machine-compressor-status { color: inherit; }
#mrb_state_header .machine-compressor-status.is-unknown { color: lightgray; }
#mrb_state_header .machine-compressor-status.is-running {
  text-shadow: 0 0 6px rgba(226, 83, 3, 0.85);
}

.machine-profile-list .machine-profile-entry {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 8px 10px; border: 1px solid #ddd; border-radius: 6px;
  background: #fff; color: #383e32; text-align: left;
  transition: border-color 150ms, background-color 150ms;
}
.machine-profile-list .machine-profile-entry:hover,
.machine-profile-list .machine-profile-entry:focus-visible { border-color: #e25303; background: #fff8f2; }
.machine-profile-list .machine-profile-entry:focus-visible { outline: 2px solid #e25303; outline-offset: 2px; }
.machine-profile-list .machine-profile-entry.active { background: #fff1e6; }
.machine-profile-list .is-serving-machine .machine-profile-entry { border: 2px solid #e25303; }
.machine-profile-photo { width: 88px; height: 68px; object-fit: contain; flex: 0 0 88px; background: white; border-radius: 4px; }
.machine-profile-description { min-width: 0; overflow-wrap: anywhere; }
.machine-profile-description strong { display: block; font-size: 14px; line-height: 1.35; }
.serving-machine-badge { display: inline-block; margin-top: 4px; padding: 1px 6px; border-radius: 3px; background: #e25303; color: white; font-size: 11px; }

.machine-selector-tabs { display: flex; gap: 4px; border-bottom: 1px solid #ddd; margin-bottom: 12px; }
.machine-selector-tabs button { flex: 1; padding: 8px 5px; border: 0; border-bottom: 3px solid transparent; background: transparent; color: #777; font: inherit; line-height: 1.3; }
.machine-selector-tabs button.active { color: #e25303; border-bottom-color: #e25303; font-weight: bold; }
.machine-selector-tabs button:focus-visible { outline: 2px solid #e25303; outline-offset: -2px; }
.machine-discovery-empty { color: #777; margin-bottom: 12px; }
.machine-address-form { margin: 12px 0; }
.machine-connection-summary { margin: 8px 0; }
