/* =========================
Price simulator
========================= */
.sim-box {
  margin-top: 8px;
}

.sim-layout {
  display: grid;
  align-items: start;
  gap: 14px;
  grid-template-columns: 1fr 0.9fr;
}

.sim-left {
  box-sizing: border-box;
  min-width: 0;
  padding: 12px;
  border: var(--border-brand);
  background: var(--white);
}

.sim-right {
  min-width: 0;
}

.sim-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: 1fr;
}

.sim-item {
  box-sizing: border-box;
  padding: 0;
  border: 0;
  background: transparent;
}

.sim-label {
  display: block;
  margin-bottom: 8px;
  color: var(--brand);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.7;
}

.sim-select {
  box-sizing: border-box;
  width: 100%;
  margin: 3px 0 8px 0;
  padding: 10px 12px;
  border: var(--border-brand);
  border-radius: var(--radius-sm);
  background: var(--brand-soft-bg);
  color: #444;
  font-size: 16px;
  font-weight: 500;
}

.sim-note {
  margin: 4px 0 12px 0;
  color: #555;
  font-size: 12.5px;
  line-height: 1.75;
}

.sim-check {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  user-select: none;
}

.sim-check input {
  transform: scale(1.15);
}

.sim-check--plain {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  font-size: 15px;
}

.sim-result {
  position: sticky;
  top: 12px;
  box-sizing: border-box;
  padding: 12px;
  border: var(--border-brand);
  background: var(--white);
}

.sim-total {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--brand-soft-border);
}

.sim-total__label {
  color: #444;
  font-size: 15px;
  font-weight: 800;
}

.sim-total__value {
  color: var(--brand);
  font-size: 24px;
  font-weight: 700;
}

.sim-lines {
  color: #444;
  font-size: 13.5px;
  line-height: 1.9;
}

.sim-line {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.sim-line__name,
.sim-muted {
  color: #444;
}

.sim-line__price {
  color: #444;
  font-weight: 700;
}

/* =========================
Simulator open / close
========================= */
.sim-toggle-wrap {
  margin: 12px 0 18px;
}

.sim-toggle-panel {
  display: grid;
  opacity: 0;
  grid-template-rows: 0fr;
  transition:
    grid-template-rows 0.4s ease,
    opacity 0.8s ease;
}

.sim-toggle-panel.is-open {
  opacity: 1;
  grid-template-rows: 1fr;
}

.sim-toggle-panel__inner {
  overflow: hidden;
}

.sim-toggle-panel__inner>* {
  transform: translateY(-380px);
  transition: transform 0.4s ease;
}

.sim-toggle-panel.is-open .sim-toggle-panel__inner>* {
  transform: translateY(0);
}

/* =========================
Rental list shared
========================= */
.sim-rentals {
  padding: 0;
  border: 0;
  border-radius: 0;
}

.sim-rentals__group {
  box-sizing: border-box;
  margin: 10px 0;
  padding: 12px 14px 8px;
  border: 1px solid var(--brand-soft-border);
  border-radius: var(--radius-sm);
  background: var(--brand-soft);
}

.sim-rentals__title {
  margin: 0 0 8px 0;
  color: var(--brand);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.sim-rentals__name,
.sim-rentals__price,
.sim-rentals__unit {
  color: #444;
  font-size: 13px;
  line-height: 1.7;
}

.sim-rentals__price,
.sim-rentals__unit {
  font-weight: 700;
}

.sim-rentals__group br {
  display: none;
}

/* =========================
Static rental list
========================= */
.rentals-static .sim-rentals {
  max-width: 900px;
  margin-top: 15px;
}

.sim-rentals--static .sim-rentals__row,
.sim-rentals--static-2col .sim-rentals__row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 0;
  border-bottom: 1px solid var(--white);
}

.sim-rentals--static .sim-rentals__group .sim-rentals__row:last-child,
.sim-rentals--static-2col .sim-rentals__group .sim-rentals__row:last-child {
  border-bottom: none;
}

.sim-rentals--static .sim-rentals__name,
.sim-rentals--static-2col .sim-rentals__name {
  flex: 1 1 auto;
  min-width: 0;
  text-align: left;
}

.sim-rentals--static .sim-rentals__price,
.sim-rentals--static-2col .sim-rentals__price {
  flex: 0 0 auto;
  text-align: right;
  white-space: nowrap;
}

.sim-rentals--static-2col {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 32px;
}

.sim-rentals__col {
  display: block;
  min-width: 0;
}

.sim-rentals--static-2col .sim-rentals__group {
  margin-top: 0;
  margin-bottom: 24px;
}

.sim-rentals--static-2col .sim-rentals__group:last-child {
  margin-bottom: 0;
}

/* =========================
Interactive rental list
========================= */
.sim-rentals--interactive {
  max-width: none;
  margin-top: 0;
}

.sim-rentals--interactive .sim-rentals__check {
  display: grid;
  align-items: center;
  column-gap: 10px;
  row-gap: 0;
  padding: 8px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  user-select: none;
  line-height: 1.4;
  grid-template-columns: 22px minmax(0, 1fr) auto;
}

.sim-rentals--interactive .sim-rentals__check:hover {
  background: rgba(255, 255, 255, 0.45);
}

.sim-rentals--interactive .sim-rentals__check input[type="checkbox"] {
  margin: 0;
  transform: scale(1.15);
}

.sim-rentals--interactive .sim-rentals__name {
  min-width: 0;
  text-align: left;
}

.sim-rentals--interactive .sim-rentals__price {
  text-align: right;
  white-space: nowrap;
}

.sim-rentals--interactive .sim-rentals__group .sim-rentals__check+.sim-rentals__check {
  border-top: 1px solid var(--white);
}

.sim-rentals--interactive .sim-rentals__actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 10px;
}

.sim-rentals--interactive .sim-rentals__clear {
  padding: 10px 12px;
  border: var(--border-brand);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--brand);
  font-size: 12.8px;
  font-weight: 700;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  transition: background-color var(--transition-fast);
}

.sim-rentals--interactive .sim-rentals__clear:hover,
.sim-rentals--interactive .sim-rentals__clear:focus-visible {
  background: var(--brand-soft);
  outline: none;
}

/* =========================
Rental qty select
========================= */
.sim-rental-qty {
  box-sizing: border-box;
  min-width: 62px;
  margin-right: 4px;
  padding: 3px 5px;
  border: 1px solid var(--brand-soft-border);
  border-radius: 6px;
  background: var(--white);
  color: #444;
  font-size: 12.5px;
  font-weight: 700;
}

/* =========================
Simulator / rentals SP
========================= */
@media screen and (max-width: 666px) {
  .sim-layout {
    grid-template-columns: 1fr;
  }

  .sim-left {
    border: none;
  }

  .sim-result {
    position: static;
    top: auto;
    margin-bottom: 10px;
    border: none;
    border-top: 1px solid var(--brand);
  }

  .sim-rentals {
    padding: 10px 0;
  }

  .sim-rentals__group {
    padding: 10px;
  }

  .sim-rentals--static-2col {
    display: block;
  }

  .sim-rentals--static-2col .sim-rentals__col+.sim-rentals__col {
    margin-top: 24px;
  }

  .sim-rentals--interactive .sim-rentals__check {
    row-gap: 4px;
    grid-template-columns: 22px minmax(0, 1fr);
    grid-template-areas:
      "cb name"
      "cb price";
  }

  .sim-rentals--interactive .sim-rentals__check input[type="checkbox"] {
    grid-area: cb;
  }

  .sim-rentals--interactive .sim-rentals__name {
    grid-area: name;
  }

  .sim-rentals--interactive .sim-rentals__price {
    grid-area: price;
    justify-self: start;
    text-align: left;
  }

  .sim-rentals--interactive .sim-rentals__actions {
    justify-content: center;
  }

  .sim-rentals--interactive .sim-rentals__clear {
    width: 100%;
    max-width: 320px;
  }
}