/* Grand Line parity — roof calculator UI */
.gl-roof-calc {
  --gl-accent: #ff7900;
  --gl-accent-dark: #e56a00;
  --gl-border: #e3e3e3;
  --gl-muted: #777;
  --gl-panel: #f5f5f5;
  --gl-radius: 4px;
  font-size: 1.4rem;
  line-height: 1.45;
}

.gl-roof-calc .white-bg {
  background: #fff;
  border: 1px solid var(--gl-border);
  border-radius: var(--gl-radius);
  padding: 2rem 2.4rem 2.4rem;
}

.gl-roof-calc .steps-list {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  list-style: none;
  margin: 0 0 2.4rem;
  padding: 0 0 1.2rem;
  border-bottom: 1px solid var(--gl-border);
}

.gl-roof-calc .steps-list__item {
  flex: 1 1 0;
  min-width: 12rem;
  padding: 0.8rem 1rem 1.2rem;
  color: var(--gl-muted);
  font-size: 1.3rem;
  font-weight: 600;
}

.gl-roof-calc .steps-list__item--active,
.gl-roof-calc .steps-list__item--passed {
  color: #222;
}

.gl-roof-calc .steps-list__item--active {
  font-weight: 700;
}

.gl-roof-calc .steps-list__progress {
  position: absolute;
  left: 0;
  bottom: -1px;
  height: 3px;
  background: var(--gl-accent);
  transition: width 0.25s ease;
}

.gl-roof-calc .calc-row {
  margin-bottom: 2.4rem;
}

.gl-roof-calc .calc-row__title {
  display: block;
  margin: 0 0 1.2rem;
  font-size: 1.6rem;
  font-weight: 700;
}

.gl-roof-calc .calc-row hr {
  border: 0;
  border-top: 1px solid var(--gl-border);
  margin: 2rem 0 0;
}

.gl-roof-calc .calc-inputs-list {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.gl-roof-calc .calc-inputs-list--slider {
  flex-wrap: nowrap;
  overflow-x: auto;
  padding-bottom: 0.8rem;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.gl-roof-calc .calc-inputs-list--slider .calc-inputs-list__item {
  flex: 0 0 auto;
  scroll-snap-align: start;
}

.gl-roof-calc .calc-input {
  position: relative;
  display: block;
  min-width: 11rem;
  cursor: pointer;
}

.gl-roof-calc .calc-input__input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.gl-roof-calc .calc-input__bg {
  position: absolute;
  inset: 0;
  border: 2px solid var(--gl-border);
  border-radius: var(--gl-radius);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.gl-roof-calc .calc-input__input:checked + .calc-input__bg {
  border-color: var(--gl-accent);
  box-shadow: inset 0 0 0 1px var(--gl-accent);
}

.gl-roof-calc .calc-input__content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.8rem;
  min-height: 11rem;
  padding: 1.2rem 1rem 1rem;
  text-align: center;
  font-size: 1.3rem;
  font-weight: 600;
}

.gl-roof-calc .calc-input__visual {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 7rem;
}

.gl-roof-calc .calc-input__visual img {
  max-width: 100%;
  max-height: 7rem;
  height: auto;
  object-fit: contain;
}

.gl-roof-calc .calc-input__visual--full-width img {
  width: 100%;
  max-height: 9rem;
}

.gl-roof-calc .calc-input__color {
  font-size: 1.2rem;
  font-weight: 600;
}

.gl-roof-calc .calc-input__price {
  font-size: 1.2rem;
  font-weight: 700;
  color: #222;
}

.gl-roof-calc .calc-input--product {
  min-width: 14rem;
}

.gl-roof-calc .calc-input--product .calc-input__content {
  min-height: 16rem;
}

.gl-roof-calc .roof-parameters .col-row {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  gap: 2.4rem;
  align-items: start;
}

.gl-roof-calc .roof-parameters__visual {
  background: var(--gl-panel);
  border: 1px solid var(--gl-border);
  border-radius: var(--gl-radius);
  padding: 2rem;
  min-height: 28rem;
  display: grid;
  place-items: center;
}

.gl-roof-calc .roof-parameters__visual img {
  max-width: 100%;
  max-height: 36rem;
  object-fit: contain;
}

.gl-roof-calc .form-row {
  position: relative;
  margin-bottom: 1.2rem;
}

.gl-roof-calc .form-row__title {
  display: block;
  margin-bottom: 0.6rem;
  font-size: 1.3rem;
  font-weight: 600;
}

.gl-roof-calc .form-control {
  width: 100%;
  min-height: 4.4rem;
  padding: 0.8rem 4rem 0.8rem 1.2rem;
  border: 1px solid #ccc;
  border-radius: var(--gl-radius);
  font: inherit;
  font-size: 1.6rem;
  background: #fff;
}

.gl-roof-calc .form-control:focus {
  border-color: var(--gl-accent);
  outline: none;
  box-shadow: 0 0 0 2px rgba(255, 121, 0, 0.15);
}

.gl-roof-calc .form-row__icon {
  position: absolute;
  right: 1.2rem;
  bottom: 1.1rem;
  color: var(--gl-muted);
  font-size: 1.2rem;
  font-weight: 700;
  pointer-events: none;
}

.gl-roof-calc .form-row.is-error .form-control {
  border-color: #d32f2f;
}

.gl-roof-calc .error-msg {
  display: none;
  margin-top: 0.4rem;
  color: #d32f2f;
  font-size: 1.2rem;
}

.gl-roof-calc .form-row.is-error .error-msg {
  display: block;
}

.gl-roof-calc .checkbox-panel {
  margin-bottom: 1.6rem;
}

.gl-roof-calc .checkbox-panel__title {
  display: block;
  margin-bottom: 0.8rem;
  font-weight: 700;
}

.gl-roof-calc .checkbox-panel__list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem 1.6rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.gl-roof-calc .checkbox {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  cursor: pointer;
  font-size: 1.3rem;
}

.gl-roof-calc .checkbox__input {
  width: 1.6rem;
  height: 1.6rem;
  accent-color: var(--gl-accent);
}

.gl-roof-calc .calc-options-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1.2rem 2rem;
  margin-top: 1.6rem;
}

.gl-roof-calc .gray-panel {
  background: var(--gl-panel);
  border: 1px solid var(--gl-border);
  border-radius: var(--gl-radius);
  padding: 1.6rem;
  margin-bottom: 1.6rem;
}

.gl-roof-calc .subheading {
  margin: -0.4rem 0 1.2rem;
  color: var(--gl-muted);
  font-size: 1.3rem;
}

.gl-roof-calc .color-swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.gl-roof-calc .color-swatch {
  width: 3.2rem;
  height: 3.2rem;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 50%;
  background: var(--swatch-color, #ccc);
  cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.12);
}

.gl-roof-calc .color-swatch.is-active {
  border-color: var(--gl-accent);
  box-shadow: 0 0 0 2px rgba(255, 121, 0, 0.25);
}

.gl-roof-calc .filter-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.2rem;
  margin-bottom: 1.6rem;
}

.gl-roof-calc .filter-row label {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 1.2rem;
  font-weight: 600;
}

.gl-roof-calc .filter-row select {
  width: 100%;
  min-height: 4rem;
  padding: 0.6rem 1rem;
  border: 1px solid #ccc;
  border-radius: var(--gl-radius);
  font: inherit;
}

.gl-roof-calc .sheet-length-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.2rem;
  margin: 1.6rem 0;
}

.gl-roof-calc .counter {
  display: inline-flex;
  align-items: center;
  border: 1px solid #ccc;
  border-radius: var(--gl-radius);
  overflow: hidden;
}

.gl-roof-calc .counter__btn {
  width: 3.6rem;
  height: 3.6rem;
  border: 0;
  background: #fff;
  font-size: 1.8rem;
  cursor: pointer;
}

.gl-roof-calc .counter__input {
  width: 5rem;
  height: 3.6rem;
  border: 0;
  border-left: 1px solid #ccc;
  border-right: 1px solid #ccc;
  text-align: center;
  font: inherit;
}

.gl-roof-calc .selected-products-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.gl-roof-calc .selected-product {
  display: grid;
  grid-template-columns: 8rem minmax(0, 1fr);
  gap: 1.2rem;
  align-items: center;
  padding: 1.2rem 0;
  border-top: 1px solid var(--gl-border);
}

.gl-roof-calc .selected-product__img {
  width: 8rem;
  height: 8rem;
  object-fit: contain;
  background: #fff;
  border: 1px solid var(--gl-border);
  border-radius: var(--gl-radius);
}

.gl-roof-calc .selected-product__title {
  margin: 0 0 0.4rem;
  font-size: 1.4rem;
  font-weight: 700;
}

.gl-roof-calc .selected-product__meta {
  margin: 0;
  color: var(--gl-muted);
  font-size: 1.2rem;
}

.gl-roof-calc .selected-product__price {
  margin: 0.4rem 0 0;
  font-size: 1.5rem;
  font-weight: 700;
}

.gl-roof-calc .calc-row__info-msg {
  display: block;
  margin-top: 1.2rem;
  padding: 1rem 1.2rem;
  background: #fff8ef;
  border: 1px solid #ffe0b2;
  border-radius: var(--gl-radius);
  color: #6d4c1a;
  font-size: 1.2rem;
}

.gl-roof-calc .basket-section__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 30rem;
  gap: 2.4rem;
  align-items: start;
}

.gl-roof-calc .basket-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.gl-roof-calc .basket-item {
  padding: 1.6rem 0;
  border-bottom: 1px solid var(--gl-border);
}

.gl-roof-calc .basket-item__title {
  margin: 0 0 0.6rem;
  font-size: 1.4rem;
  font-weight: 700;
}

.gl-roof-calc .basket-item__row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  color: var(--gl-muted);
  font-size: 1.3rem;
}

.gl-roof-calc .basket-item__price {
  margin-left: auto;
  font-weight: 700;
  color: #222;
}

.gl-roof-calc .basket-section__sidebar {
  position: sticky;
  top: 1.6rem;
  padding: 2rem;
  background: #fff;
  border: 1px solid var(--gl-border);
  border-radius: var(--gl-radius);
}

.gl-roof-calc .basket-section__sidebar__title {
  display: block;
  margin-bottom: 1rem;
  font-size: 1.6rem;
}

.gl-roof-calc .basket-section__total-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.gl-roof-calc .basket-section__total-item {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin: 0;
  padding: 0.6rem 0;
}

.gl-roof-calc .basket-section__total-item__title {
  margin: 0;
  color: var(--gl-muted);
  font-size: 1.3rem;
}

.gl-roof-calc .basket-section__total-item__value {
  margin: 0;
  font-weight: 700;
}

.gl-roof-calc .basket-section__total-item__value--price {
  font-size: 2rem;
  color: #222;
}

.gl-roof-calc hr {
  border: 0;
  border-top: 1px solid var(--gl-border);
  margin: 1.2rem 0;
}

.gl-roof-calc .btn-panel {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2rem;
}

.gl-roof-calc .btn--default {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 4.8rem;
  padding: 0 2.4rem;
  border: 0;
  border-radius: var(--gl-radius);
  background: var(--gl-accent);
  color: #fff;
  font: inherit;
  font-size: 1.4rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease;
}

.gl-roof-calc .btn--default:hover {
  background: var(--gl-accent-dark);
  color: #fff;
}

.gl-roof-calc .btn--default:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.gl-roof-calc .btn--secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 4.8rem;
  padding: 0 2.4rem;
  border: 1px solid #ccc;
  border-radius: var(--gl-radius);
  background: #fff;
  color: #222;
  font: inherit;
  font-size: 1.4rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

.gl-roof-calc .btn--block {
  width: 100%;
}

.gl-roof-calc .calc-input--link {
  text-decoration: none;
  color: inherit;
}

.gl-roof-calc .calc-input--link:hover .calc-input__bg {
  border-color: var(--gl-accent);
}

.gl-roof-calc.calculator-hub-gl .calc-inputs-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.2rem;
}

@media (max-width: 768px) {
  .gl-roof-calc.calculator-hub-gl .calc-inputs-list {
    grid-template-columns: 1fr;
  }
}


.gl-roof-calc .gl-roof-calc__layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 30rem;
  gap: 2.4rem;
  align-items: start;
}

.gl-roof-calc .gl-roof-calc__layout--full {
  grid-template-columns: 1fr;
}

.gl-roof-calc .gl-roof-calc__layout--full [data-roof-aside],
.gl-roof-calc .gl-roof-calc__layout--full [data-gl-aside] {
  display: none;
}


.gl-roof-calc .gl-roof-calc__aside-panel {
  position: sticky;
  top: 1.6rem;
}

@media (max-width: 960px) {
  .gl-roof-calc .roof-parameters .col-row,
  .gl-roof-calc .basket-section__inner,
  .gl-roof-calc .gl-roof-calc__layout {
    grid-template-columns: 1fr;
  }

  .gl-roof-calc .filter-row {
    grid-template-columns: 1fr;
  }
}
