.fitting-panel {
    box-sizing: border-box;
    position: fixed;
    inset: 0 0 0 auto;
    margin: 0;
    width: min(400px, 100vw);
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    padding: 24px;
    border: 0;
    background: #fff;
    color: #222;
    overflow: auto;
}

.fitting-panel::backdrop {
    background: rgb(0 0 0 / 35%);
}

.fitting-panel li {
    margin-bottom: 12px;
}

.fitting-add,
.fitting-reopen,
.fitting-panel a:not([hidden]) {
    display: inline-block;
    padding: 10px 16px;
    border: 0;
    border-radius: 4px;
    background: #ff6912;
    color: #fff;
    cursor: pointer;
}

.fitting-reopen {
    position: fixed;
    right: 16px;
    bottom: 20px;
    z-index: 100;
}

dialog.fitting-panel:not([open]) {
    display: none !important;
}

dialog.fitting-panel[open] {
    display: flex;
    flex-direction: column;
    gap: 16px;
    box-sizing: border-box;
    position: fixed;
    inset: 0 0 0 auto;
    width: min(380px, 100%);
    max-width: 100%;
    height: 100%;
    max-height: 100%;
    margin: 0;
    padding: 24px;
    overflow-y: auto;
    border: 0;
    background: #fff;
    color: #222;
    box-shadow: -8px 0 32px rgb(0 0 0 / 14%);
}

dialog.fitting-panel::backdrop {
    background: rgb(0 0 0 / 35%);
}

dialog.fitting-panel > button:first-child {
    align-self: flex-end;
    padding: 6px 12px;
    border: 1px solid #ccc0;
    background: #fff0;
    color: #333;
    font: inherit;
    cursor: pointer;
}

dialog.fitting-panel h2,
dialog.fitting-panel ul {
    margin: 0;
}

dialog.fitting-panel ul {
    padding: 0;
    list-style: none;
}

dialog.fitting-panel li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 0;
    border-bottom: 1px solid #ddd;
}

dialog.fitting-panel > a:not([hidden]) {
    display: block;
    margin-top: auto;
    padding: 12px 16px;
    text-align: center;
    background: #242424;
    color: #fff;
}

.product-item-container button.fitting-add {
  display: block;
  width: fit-content;
  max-width: 100%;
  min-width: 0;
  height: auto;
  min-height: 32px;
  margin: 6px auto 12px;
  padding: 5px 9px;
  border-radius: 4px;
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.25;
  text-align: center;
  cursor: pointer;
}

button.fitting-reopen {
    position: static;
    display: block;
    width: fit-content;
    max-width: 100%;
    margin: 0 auto 20px;
    padding: 7px 14px;
    border: 1px solid #ff5e00;
    border-radius: 4px;
    background: #fff;
    color: #212529;
    font-family: inherit;
    font-size: 14px;
    line-height: 1.3;
    cursor: pointer;
}

button {
  border: none;
  background-color: #a52a2a00;
  font-size: 12px;
}

button:focus {
  outline: none !important;
}