/* Reset default styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Roboto", sans-serif;
  line-height: 1.6;
  background-color: #f0f2f5;
  color: #333;
}

/* Main content spacing */
main {
  padding: 2rem;
}

/* General styles */
h1,
h2,
h3 {
  margin-bottom: 1rem;
}

p {
  margin-bottom: 1.5rem;
}

/* Container for content */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Button styles */
.btn {
  display: inline-block;
  padding: 0.8rem 1.5rem;
  background-color: #6B9038;
  color: #fff;
  text-decoration: none;
  border-radius: 4px;
  transition: background-color 0.3s ease, transform 0.2s ease;
}

.btn:hover {
  background-color: #6B9038;
  transform: scale(1.05);
}

/**************************************
 * General blueprint container styles *
 **************************************/
.blueprint {
  margin: 0 auto;
  padding: 2rem;
  box-sizing: border-box;
  font-family: "Roboto", sans-serif;
  background: #fff;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
}

.blueprint .title {
  line-height: 1.4;
  font-size: 28px;
  font-weight: 700;
  text-transform: capitalize;
  margin-bottom: 16px;
  display: block;
  text-align: center;
  color: #6B9038;
}

.blueprint hr {
  margin: 10px 0;
  border: none;
  border-bottom: 2px solid #ccc;
}

.blueprint-container {
  display: flex;
  flex-direction: row;
  gap: 2rem;
  justify-content: center;
}

.blueprint-left {
  width: 30%;
  height: 100%;
  box-sizing: border-box;
  padding: 1.5rem;
  background: #f9f9f9;
  border-radius: 12px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}
.blueprint-right {
  width: 65%;
  box-sizing: border-box;
  padding: 2rem;
  background: #f9f9f9;
  border-radius: 12px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.blueprint-right-header {
  padding: 10px 5px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #6B9038;
  color: #fff;
  border-radius: 8px;
}

.blueprint-right-header label {
  font-size: 20px;
  font-weight: 600;
}

.measurements-column {
  min-width: 50px;
  text-align: right;
  padding-right: 10px;
  font-size: 14px;
  color: #333;
}

#precisionwarning {
  display: block;
  margin-top: 1rem;
  font-style: italic;
  font-size: 12px;
  font-weight: normal;
  color: #6B9038;
}

.printblueprint {
  border-radius: 8px;
  width: 43px;
  height: 43px;
  background: url("./assets/print-button.png") center center no-repeat #eee;
  border: none;
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.printblueprint:hover {
  opacity: 0.8;
}

/* Menu styles */
.menu {
  width: 100%;
  max-width: 450px;
  padding: 2rem;
  background-color: #fff;
  border-radius: 12px;
  border: #eee;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  margin-bottom: 2rem;
}

.menu .title {
  font-size: 24px;
  font-weight: 700;
  color: #000000;
  margin-bottom: 0.5rem;
}

.menu hr {
  margin-bottom: 1.5rem;
  border: none;
  border-bottom: 2px solid #cccccc;
}

.form-row {
  display: flex;
  flex-direction: column;
  margin-bottom: 1.5rem;
  position: relative;
}

.label-left {
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: #333333;
}

/* Native SELECT styling (simple approach) */
.select-right {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border: 2px solid #6B9038;
  border-radius: 4px;
  background-color: #ffffff;
  color: #000000;
  font-weight: bold;
  transition: border-color 0.2s, box-shadow 0.2s;
  appearance: none;
  background-position: right 0.75rem center;
  background-repeat: no-repeat;
}

.select-right:focus {
  border-color: #6B9038;
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.3);
  outline: none;
}

/* Angle input or any text input in the form */
.input-right {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border: 2px solid #6B9038;
  border-radius: 4px;
  background-color: #ffffff;
  color: #000000;
  font-weight: bold;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.input-right:focus {
  border-color: #6B9038;
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.3);
  outline: none;
}

/* Submit Button (optional if you have one) */
.menu button {
  background-color: #6B9038;
  color: #fff;
  border: 2px solid #6B9038;
  padding: 0.8rem 1.5rem;
  border-radius: 4px;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.3s ease, color 0.3s ease, transform 0.2s ease;
  align-self: flex-start;
}

.menu button:hover {
  background-color: #6B9038;
  color: #ffffff;
  transform: scale(1.05);
}

.menu button:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.3);
}

/* Legend styles */
.legenda {
  width: 100%;
  /* max-width: 450px; */
  padding: 1.5rem;
  background-color: #ffffff;
  border: 2px solid #6B9038;
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.legend-header {
  border-bottom: 2px solid #6B9038;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.selectionmenutitle {
  font-size: 18px;
  font-weight: 700;
  color: #6B9038;
}

.legenda2 {
  display: flex;
  flex-direction: column;
}

/* Each row in the legend */
.row-legend {
  display: flex;
  align-items: center;
  margin: 0.6rem 0;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.row-legend:hover {
  background-color: #f6f6f6;
}

/* We call it 'hoverClass' in your script; keep the same name */
.hoverClass {
  position: relative;
}

/* Custom checkboxes */
.hoverClass input[type="checkbox"] {
  display: none;
}

.hoverClass input[type="checkbox"] + label {
  position: relative;
  padding-left: 30px;
  font-weight: 600;
  color: #6B9038;
  transition: color 0.2s;
}

.hoverClass input[type="checkbox"] + label::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  height: 20px;
  width: 20px;
  background-color: #ffffff;
  border: 2px solid #6B9038;
  border-radius: 4px;
  transition: background-color 0.3s, border-color 0.3s;
}

.hoverClass input[type="checkbox"]:checked + label::before {
  background-color: #6B9038;
  border-color: #fff;
}

.hoverClass input[type="checkbox"] + label::after {
  content: "";
  position: absolute;
  left: 8px;
  top: 43%;
  transform: translateY(-50%) rotate(45deg);
  width: 5px;
  height: 12px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  opacity: 0;
  transition: opacity 0.2s, transform 0.3s;
}

.hoverClass input[type="checkbox"]:checked + label::after {
  opacity: 1;
}

/* The measurements-column (if you want to show text or input fields there) */
.measurements-column {
  margin-left: auto;
  display: inline-block;
}

/* Precision warning style */
#precisionwarning {
  display: block;
  margin-top: 1rem;
  font-size: 14px;
  color: #6B9038;
  font-style: italic;
}

/**************************************
 * Measurement & drawing images
 **************************************/
#measurements {
  position: relative;
  margin-top: 2rem;
}

.overlay {
  position: relative;
  width: 100%;
  max-width: 700px;
  margin: 0 auto;
}

.drawing-img {
  position: absolute;
  /* max-width: 100%; */
  height: auto;
}

/**************************************
 * Text fields for measurements
 **************************************/
.measurement {
  position: absolute;
  text-align: center;
  width: 100px;
  padding: 0.2rem 0.5rem;
  border: none;
  /* background: rgba(255, 255, 255, 0.7); */
  border-radius: 20px;
  font-size: 14px;
  color: #000;
}

#text-HeightWallProfile {
  top: 37px;
  left: 20px;
}
#text-ThicknessPost {
  top: 335px;
  left: 500px;
}
#text-DepthGutter {
  top: -13px;
  left: 325px;
}
#text-LengthRoofPlatesAndRafters {
  top: 63px;
  left: 325px;
}
#text-LengthRoof {
  top: 83px;
  left: 325px;
}

#text-HeightDifferenceGutterAndWallProfile {
  top: 110px;
  left: 104px;
  transform: rotate(-90deg);
}
#text-HeightBottomWallProfile {
  top: 200px;
  left: 30px;
  transform: rotate(-90deg);
}
#text-HeightTopWallProfile {
  top: 200px;
  left: -28px;
  transform: rotate(-90deg);
}
#text-WidthGutter {
  top: 200px;
  left: 500px;
}
#text-HeightBottomGutter {
  top: 260px;
  left: 592px;
  transform: rotate(-90deg);
}
#text-DepthInsidePost {
  top: 420px;
  left: 325px;
}
#text-DepthOutsidePost {
  top: 440px;
  left: 325px;
}
#text-HeightTopGutter {
  top: 260px;
  left: 641px;
  transform: rotate(-90deg);
}
#text-Angle {
  top: 146px;
  left: 471px;
  width: 50px;
}
#text-DepthToEndPost {
  top: 461px;
  left: 325px;
}
.length-roof {
  margin-top: -43px;
  transform: rotateX(45deg);
}
.depth-end{
  margin-top: 23px;
}
.depth-outside{
  margin-top: -10px;
}
.depth-inside{
  margin-top: -3px;
}
@media screen and (max-width: 768px) {
  .blueprint {
    padding: 0.5rem;
    background-color: #f9f9f9;
    box-shadow: none;
  }
  .blueprint-right {
    background-color: #f9f9f9;
    box-shadow: none;
  }
  .container {
    padding: 0px;
  }
  .blueprint-left {
    width: 100%;
    padding: 10px;
  }
  .menu {
    width: 100%;
    padding: 10px;
  }
  .blueprint-container {
    flex-direction: column;
  }
  .blueprint-left,
  .blueprint-right {
    width: 100%;
  }
}
@media screen and (min-width: 768px) and (max-width: 1024px) {
  .blueprint {
    padding: 0.5rem;
  }
  .container {
    padding: 0px;
  }
  .blueprint-left {
    width: 100%;
    padding: 10px;
  }
  .menu {
    padding: 10px;
  }

  .blueprint-left {
    width: 30%;
  }
  .blueprint-right {
    width: 70%;
  }
  #text-HeightWallProfile {
    top: 33px;
    left: 15px;
  }
  #text-ThicknessPost {
    top: 300px;
    left: 445px;
  }
  #text-DepthGutter {
    top: -13px;
    left: 325px;
  }
  #text-LengthRoofPlatesAndRafters {
    top: 55px;
    left: 325px;
  }
  #text-LengthRoof {
    top: 75px;
    left: 325px;
  }
  #text-HeightDifferenceGutterAndWallProfile {
    top: 90px;
    left: 95px;
    transform: rotate(-90deg);
  }
  #text-HeightBottomWallProfile {
    top: 200px;
    left: 30px;
    transform: rotate(-90deg);
  }
  #text-HeightTopWallProfile {
    top: 200px;
    left: -28px;
    transform: rotate(-90deg);
  }
  #text-WidthGutter {
    top: 180px;
    left: 445px;
  }
  #text-HeightBottomGutter {
    top: 260px;
    left: 522px;
    transform: rotate(-90deg);
  }
  #text-DepthInsidePost {
    top: 371px;
    left: 325px;
  }
  #text-DepthOutsidePost {
    top: 390px;
    left: 325px;
  }
  #text-HeightTopGutter {
    top: 260px;
    left: 567px;
    transform: rotate(-90deg);
  }
  #text-Angle {
    top: 130px;
    left: 428px;
    width: 50px;
  }
  #text-DepthToEndPost {
    top: 410px;
    left: 325px;
  }
}
@media (max-width: 768px) {
  .selectionmenutitle {
    font-size: 16px;
  }
  .label-left {
    font-size: 14px;
  }
  .blueprint-right-header {
    flex-direction: column;
    align-items: flex-start;
  }
  .printblueprint {
    margin-top: 10px;
  }
}

@media (max-width: 480px) {
  .selectionmenutitle {
    font-size: 14px;
  }
  .label-left {
    font-size: 12px;
  }

  .blueprint-right {
    padding: 10px;
  }
  .blueprint-right-header {
    padding: 5px;
  }
  .printblueprint {
    width: 35px;
    height: 35px;
  }
  .measurement {
    font-size: 12px;
    width: 80px;
  }

  #text-HeightWallProfile {
    top: 13px;
    left: -10px;
    font-size: 6px;
    /* display: none; */
  }
  #text-ThicknessPost {
    top: 133px;
    left: 185px;
    font-size: 7px;
  }
  #text-DepthGutter {
    top: -5px;
    left: 120px;
    font-size: 7px;
    /* display: none; */
  }
  #text-LengthRoofPlatesAndRafters {
    top: 25px;
    left: 120px;
    font-size: 7px;
    /* display: none; */
  }
  #text-LengthRoof {
    top: 45px;
    left: 120px;
    font-size: 7px;
    /* display: none; */
  }
  #text-HeightDifferenceGutterAndWallProfile {
    top: 47px;
    left: 25px;
    font-size: 7px;
    transform: rotate(-90deg);
    /* display: none; */
  }
  #text-HeightBottomWallProfile {
    top: 90px;
    left: -5px;
    font-size: 7px;
    /* transform: rotate(-90deg); */
  }
  #text-HeightTopWallProfile {
    top: 90px;
    left: -28px;
    font-size: 7px;
    transform: rotate(-90deg);
  }
  #text-WidthGutter {
    top: 79px;
    left: 184px;
    font-size: 7px;
    /* display: none; */
  }
  #text-HeightBottomGutter {
    top: 111px;
    left: 225px;
    font-size: 7px;
    transform: rotate(-90deg);
    /* display: none; */
  }
  #text-DepthInsidePost {
    top: 170px;
    left: 125px;
    font-size: 4px;
    /* display: none; */
  }
  #text-DepthOutsidePost {
    top: 177px;
    left: 125px;
    font-size: 4px;
    /* display: none; */
  }
  #text-HeightTopGutter {
    top: 111px;
    left: 244px;
    font-size: 7px;
    transform: rotate(-90deg);
    /* display: none; */
  }
  #text-Angle {
    top: 130px;
    left: 428px;
    width: 50px;
    display: none;
  }
  #text-DepthToEndPost {
    top: 188px;
    left: 125px;
    font-size: 4px;
    /* display: none; */
  }
  .drawing-img {
    display: block;
    width: 100%;
  }

  .length-roof {
    margin-top: -18px;
    /* transform: rotateX(45deg); */
  }
  .depth-end{
    margin-top: 13px;
  }
  .depth-outside{
    margin-top: -5px;
  }
  .depth-inside{
    margin-top: 0px;
  }
}

@media print {
  /** GENERAL SETTINGS */
  @page {
    size: 297mm 210mm !important;
  }
  nav,
  footer,
  .page-wrapper,
  .printblueprint,
  .breadcrumbs_block,
  .rocketchat-widget,
  div[data-role="gdpr-cookie-container"],
  #select-all,
  .txt-left.selectionmenutitle,
  hr,
  .title {
    display: none !important;
  }

  .txt-right.selectionmenutitle {
    display: block !important;
  }

  .construct-drawing-side.modal-popup .modal-content {
    height: inherit;
    padding-top: 0;
    padding-left: 0;
    padding-right: 0;
  }

  .blueprint .logo-img {
    display: block;
    position: absolute;
    top: 0;
    right: 0;
    height: 43px;
  }

  .blueprint .printblueprint {
    display: none;
  }

  .blueprint label.title {
    margin-top: -10px;
    line-height: 24px;
    font-size: 24px;
    font-weight: 600;
    text-transform: capitalize;
    text-align: center;
  }

  .blueprint .left-part {
    top: 10px;
    left: 0;
    position: absolute;
    display: block;
    width: 275px;
  }

  .blueprint .right-part {
    top: 10px;
    right: 0;
    position: absolute;
    display: block;
    width: 700px;
  }

  .blueprint .txt-right {
    display: inline-block;
    text-align: right;
    float: right;
  }

  .blueprint .txt-left {
    display: inline-block;
    text-align: left;
    float: left;
  }

  .blueprint .drawing-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
  }

  /* ITEMS IN SECTION LEFT */
  .blueprint .menu {
    display: block;
    line-height: 20px;
    float: left;
    margin: 0 0 10px 0;
    width: 100%;
  }

  .blueprint .legend {
    display: block;
    line-height: 20px;
    float: left;
    border: 1px solid grey;
    clear: left;
    width: 100%;
  }

  .blueprint .left-section {
    float: left;
    clear: left;
    width: 60%;
  }

  .blueprint .right-section {
    float: right;
    clear: right;
    width: 40%;
  }

  .blueprint label.left-section {
    padding-bottom: 15px;
  }

  .blueprint select.right-section,
  .blueprint input[type="text"].right-section {
    padding: 3px 5px;
    height: 32px;
    float: right;
    clear: right;
    text-align: left;
  }

  .blueprint .measurements-column {
    display: inline-block;
    float: right;
    text-align: right;
    padding-right: 10px;
  }

  /* ITEMS IN SECTION RIGHT */
  .blueprint #measurements {
    position: relative;
    width: 700px;
    height: 500px;
  }

  .blueprint #calculations {
    position: absolute;
  }

  .blueprint #tech-drawings {
    position: relative;
  }

  .blueprint .overlay {
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    max-width: 700px;
    max-height: 500px;
  }

  /* Positioning the measurements labels */
  .blueprint #text-Angle {
    position: absolute;
    width: 50px;
    top: 150px;
    left: 465px;
    border-style: none;
    background: none;
  }

  .blueprint #text-DepthGutter {
    position: absolute;
    top: -13px;
    left: 325px;
  }

  .blueprint #text-LengthRoofPlatesAndRafters {
    position: absolute;
    top: 60px;
    left: 325px;
  }
  
  .blueprint #text-LengthRoof {
    position: absolute;
    top: 80px;
    left: 325px;
  }

  .blueprint #text-HeightWallProfile {
    position: absolute;
    top: 33px;
    left: 25px;
  }

  .blueprint #text-HeightDifferenceGutterAndWallProfile {
    position: absolute;
    top: 90px;
    left: 105px;
  }

  .blueprint #text-HeightBottomWallProfile {
    position: absolute;
    top: 200px;
    left: 30px;
    transform: rotate(-90deg);
  }

  .blueprint #text-HeightTopWallProfile {
    position: absolute;
    top: 200px;
    left: -28px;
    transform: rotate(-90deg);
  }

  .blueprint #text-HeightBottomGutter {
    position: absolute;
    top: 280px;
    left: 575px;
    transform: rotate(-90deg);
  }

  .blueprint #text-HeightTopGutter {
    position: absolute;
    top: 280px;
    left: 620px;
    transform: rotate(-90deg);
  }

  .blueprint #text-WidthGutter {
    position: absolute;
    top: 210px;
    left: 500px;
  }

  .blueprint #text-ThicknessPost {
    position: absolute;
    top: 325px;
    left: 500px;
  }

  .blueprint #text-DepthInsidePost {
    position: absolute;
    top: 445px;
    left: 325px;
  }

  .blueprint #text-DepthOutsidePost {
    position: absolute;
    top: 460px;
    left: 325px;
  }

  .blueprint #text-DepthToEndPost {
    position: absolute;
    top: 477px;
    left: 325px;
  }

  .blueprint hr {
    color: #6B9038;
    margin: 5px 0 5px 0;
  }

  .legend2 .hoverClass span {
    max-width: 200px;
  }

  label {
    margin-bottom: 0;
    margin-left: 0 !important;
  }

  span {
    margin-left: 10px !important;
  }

  #precisionwarning {
    margin: 5px 10px !important;
  }

  #image-DepthOutsidePost {
    margin-top: -20px !important;
  }

  #image-DepthInsidePost {
    margin-top: -4px !important;
  }

  #image-DepthToEndPost {
    margin-top: 25px !important;
  }
}
