/* ============================================================================
 * Regolo - bending calculator styles
 *
 * Ported from legacy /calcolo-regolo-it/css/{myStyle,regolo2}.css.
 * Everything scoped under .regolo-module so it never bleeds into the theme.
 * Brand blue: #004987   ·   Label gray: #777
 * ========================================================================= */

@import url('https://fonts.googleapis.com/css?family=Roboto+Slab:400,700|Roboto:300,400,700&display=swap');

.regolo-module {
  max-width: 1170px;
  margin: 0 auto;
  padding: 1.5rem 0;
  color: #333;
  font-family: 'Roboto', sans-serif;
  font-weight: 300;
}

.regolo-module a:hover {
  text-decoration: none !important;
}

.regolo-module .regolo-title {
  font-family: 'Roboto Slab', serif;
  font-weight: 700;
  font-size: 2rem;
  margin: 0 0 1.5rem;
  color: #333;
}

.regolo-module .regolo-intro {
  font-size: 0.95rem;
  line-height: 1.5;
  margin: 0 0 0.5rem;
  color: #555;
}

.regolo-module .regolo-nota {
  margin: 0 0 1.5rem;
  color: #999;
  font-size: 0.85rem;
}

/* ---------- Controls (Materiale / Spessore / Gradi) ---------- */

.regolo-module .regolo-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0 45px;
  margin-bottom: 0;
}

.regolo-module .regolo-controls label {
  display: block;
  margin-right: 0;
  min-width: 150px;
}

.regolo-module .regolo-controls label span {
  display: block;
  color: #777;
  font-weight: 300;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 1.1rem;
  margin-bottom: 10px;
}

.regolo-module .regolo-controls select {
  width: 100%;
  height: 33px;
  border: 1px solid #eaeaea;
  border-radius: 5px;
  font-family: 'Roboto', sans-serif;
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  font-weight: 400;
  padding: 0 0.6rem;
  background: #fff;
  cursor: pointer;
}

/* ---------- Helper text above the table ---------- */

.regolo-module .regolo-cursore {
  font-family: 'Roboto Slab', serif;
  font-weight: 300;
  color: #777;
  font-size: 1.8rem;
  line-height: 2.4rem;
  margin: 2rem 0 1.5rem;
  padding-top: 1.5rem;
  border-top: 2px solid #f5f5f5;
}

/* ---------- 5-column table ---------- */

.regolo-module .regolo-table {
  width: 100%;
  margin: 0 0 2rem;
  border: 1px solid #ccc;
  border-collapse: collapse;
}

.regolo-module .regolo-table th,
.regolo-module .regolo-table td {
  padding: 5px;
  margin: 0;
}

.regolo-module .regolo-table th {
  font-size: 12px;
  font-weight: 700;
  text-align: left;
  color: #777;
  white-space: nowrap;
}

.regolo-module .regolo-table td {
  font-size: 12px;
  text-align: center;
  width: 50px;
  vertical-align: middle;
}

.regolo-module .regolo-table td a {
  text-decoration: none;
  display: block;
  width: 100%;
  height: 100%;
  color: inherit;
  cursor: default;
}

.regolo-module .regolo-table td a:hover {
  color: #004987;
}

.regolo-module .regolo-table td.selected {
  background: #004987;
  border-left: 1px solid rgba(0, 73, 135, 0.6);
  border-right: 1px solid rgba(0, 73, 135, 0.6);
  box-sizing: border-box;
  font-weight: 700;
}

.regolo-module .regolo-table td.selected a {
  color: #fff;
}

.regolo-module .regolo-table td.nobordo,
.regolo-module .regolo-table tr.regolo-row-arrow td {
  border: 0;
  background: transparent !important;
  padding: 4px 5px;
}

.regolo-module .regolo-table td img {
  float: none;
  border: 0;
  display: inline-block;
  max-width: 100%;
  height: auto;
}

/* ---------- Piega schiacciata / Schiacciata parziale row ---------- */

.regolo-module .regolo-extra {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  margin: 0 0 3rem;
}

.regolo-module .regolo-extra > div {
  flex: 1 1 280px;
}

.regolo-module .regolo-extra p {
  color: #777;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 1.1rem;
  margin: 0 0 10px;
}

.regolo-module .regolo-extra input {
  height: 33px;
  width: 100px;
  border: 1px solid #eaeaea;
  border-radius: 5px;
  font-family: 'Roboto', sans-serif;
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  background-color: rgb(248, 248, 248);
  text-align: center;
  margin: 0 10px 0 0;
  vertical-align: middle;
  padding: 0;
}

.regolo-module .regolo-extra img {
  vertical-align: middle;
  max-width: 100%;
  height: auto;
}

/* ---------- Bend image with positioned overlays ----------
 * The image is 320x520 px natively. We size the container to match exactly
 * so absolute-positioned inputs can use pixel coordinates relative to the
 * bottom-left of the artwork (each label is baked into the JPEG at a
 * fixed spot — values sit just under them in brand blue).
 */

.regolo-module .regolo-image {
  position: relative;
  width: 320px;
  height: 520px;
  margin: 2rem auto 0;
}

.regolo-module .regolo-image img {
  position: absolute;
  top: 0;
  left: 0;
  width: 320px;
  height: 520px;
  border: 0;
  display: block;
}

.regolo-module .regolo-image input {
  position: absolute;
  background-color: transparent !important;
  border: 0 !important;
  font-family: 'Roboto', sans-serif !important;
  color: #004987 !important;
  font-weight: 700 !important;
  cursor: default !important;
  text-align: center;
  width: 40px;
  height: 18px;
  font-size: 14px;
  padding: 0;
  margin: 0;
  line-height: 18px;
}

/* X/Y in pixels relative to the 320x520 image. Each input is 40px wide,
 * translateX(-50%) centers it on the given X coordinate. */
.regolo-module .regolo-image .grados   { top:  88px; left: 160px; transform: translateX(-50%); }
.regolo-module .regolo-image .borde    { top: 147px; left: 155px; transform: translateX(-50%); }
.regolo-module .regolo-image .radio    { top: 230px; left: 165px; transform: translateX(-50%); }
.regolo-module .regolo-image .espesor  { top: 260px; left:  51px; transform: translateX(-50%); }
.regolo-module .regolo-image .abertura { top: 340px; left: 165px; transform: translateX(-50%); }

/* ---------- Responsive ---------- */

@media screen and (max-width: 1199px) {
  .regolo-module .regolo-controls { gap: 0 25px; }
}

@media screen and (max-width: 992px) {
  .regolo-module .regolo-controls label span { margin-bottom: 5px; }
}

@media screen and (max-width: 768px) {
  .regolo-module .regolo-cursore { font-size: 1.4rem; line-height: 2rem; }
  .regolo-module .regolo-controls label span { font-size: 1rem; letter-spacing: 1px; }
  .regolo-module .regolo-extra p { font-size: 1rem; letter-spacing: 1px; }
}

@media screen and (max-width: 596px) {
  .regolo-module .regolo-controls { gap: 0 5px; }
  .regolo-module .regolo-table { font-size: 0.75rem; }
  .regolo-module .regolo-table th,
  .regolo-module .regolo-table td { padding: 4px 2px; }
}
