.fp-app {
  --fp-bg: #F8F8F8;
  --fp-panel: #ffffff;
  --fp-text: #2a2c2b;
  --fp-muted: #585858;
  --fp-line: #CDCDCD;
  --fp-primary: #f24840;
  --fp-primary-dark: #2a2c2b;
  --fp-danger: #ED1B24;
  --fp-accent: #f24840;
  --fp-shadow: 0px 5px 14px 0px rgba(0, 0, 0, 0.13);
  width: min(1480px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 36px;
  color: var(--fp-text);
  font-family: 'Circe';
}

.fp-modalOpen {
  overflow: hidden;
}

.fp-app *,
.fp-app *::before,
.fp-app *::after {
  box-sizing: border-box;
}

.fp-app button,
.fp-app input,
.fp-app select {
  font: inherit;
}

.fp-topbar,
.fp-workspace,
.fp-resultSection {
  background: var(--fp-panel);
  border: 1px solid var(--fp-line);
  box-shadow: var(--fp-shadow);
}

.fp-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 92px;
  padding: 20px 24px;
  border-radius: 8px;
}

.fp-topbar {
  display: none !important;
}

.fp-app h1,
.fp-app h2,
.fp-app p {
  margin: 0;
}

.fp-app h1 {
  font-size: 28px;
  line-height: 1.15;
  font-weight: 700;
}

.fp-app h2 {
  font-size: 17px;
  line-height: 1.25;
  font-weight: 700;
}

.fp-topbar p,
.fp-resultHeader p {
  margin-top: 5px;
  color: var(--fp-muted);
}

.fp-status {
  min-width: 118px;
  padding: 8px 12px;
  border: 1px solid var(--fp-line);
  border-radius: 999px;
  color: var(--fp-primary-dark);
  text-align: center;
  font-size: 14px;
  font-weight: 700;
}

.fp-workspace {
  margin-top: 18px;
  border-radius: 8px;
  overflow: hidden;
}

.fp-form {
  padding: 20px;
}

.fp-rowsHeader,
.fp-resultHeader,
.fp-actions,
.fp-rowTop {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.fp-requestRows {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}

.fp-requestRow {
  display: grid;
  grid-template-columns: repeat(4, minmax(180px, 1fr));
  gap: 13px;
  margin: 0;
  padding: 16px;
  border: 1px solid var(--fp-line);
  border-radius: 8px;
}

.fp-rowTop {
  grid-column: 1 / -1;
}

.fp-requestRow > .fp-rowTop {
  display: none !important;
}

.fp-requestRow legend {
  padding: 0;
  font-weight: 700;
}

.fp-app label {
  display: grid;
  gap: 6px;
  min-width: 0;
  color: var(--fp-muted);
  font-size: 13px;
  font-weight: 400;
}

.fp-inputHelpWrap {
  position: relative;
  display: block;
}

.fp-inputHelpWrap input {
  padding-right: 38px;
}

.fp-helpIcon {
  position: absolute;
  top: 50%;
  right: 8px;
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  min-height: 18px;
  padding: 0;
  border: 1px solid var(--fp-line);
  border-radius: 999px;
  background: #fff;
  color: var(--fp-primary-dark);
  font-size: 12px;
  line-height: 1;
  cursor: help;
  transform: translateY(-50%);
}

.fp-app .fp-helpIcon {
  width: 18px;
  height: 18px;
  min-height: 18px;
  padding: 0;
  border: 1px solid var(--fp-line);
  border-radius: 999px;
  background: #fff;
  color: var(--fp-primary-dark);
  font-size: 12px;
  line-height: 1;
}

.fp-helpIcon::after {
  position: absolute;
  right: 0;
  bottom: calc(100% + 8px);
  z-index: 20;
  display: none;
  width: max-content;
  max-width: min(360px, 80vw);
  padding: 8px 10px;
  border: 1px solid var(--fp-line);
  border-radius: 6px;
  background: #2a2c2b;
  color: #fff;
  box-shadow: 0px 5px 14px 0px rgba(0, 0, 0, 0.13);
  content: attr(data-tooltip);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.35;
  text-align: left;
  white-space: normal;
  pointer-events: none;
}

.fp-helpIcon:hover::after,
.fp-helpIcon:focus-visible::after {
  display: block;
}

.fp-app input,
.fp-app select {
  width: 100%;
  min-height: 40px;
  padding: 8px 10px;
  border: 1px solid var(--fp-line);
  border-radius: 6px;
  background: #fff;
  color: var(--fp-text);
  outline: none;
}

.fp-app input:focus,
.fp-app select:focus {
  border-color: var(--fp-primary);
  box-shadow: 0px 0px 3px 0px #ff0a00 inset;
}

.fp-features {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.fp-sizeHint {
  grid-column: 1 / -1;
  min-height: 38px;
  padding: 9px 11px;
  border: 1px solid var(--fp-line);
  border-radius: 6px;
  background: #F8F8F8;
  color: var(--fp-muted);
  font-size: 13px;
  line-height: 1.35;
}

.fp-sizeHint[data-mode="ok"] {
  border-color: #F24840;
  background: #F8F8F8;
  color: #2a2c2b;
}

.fp-sizeHint[data-mode="warning"] {
  border-color: #CDCDCD;
  background: #F8F8F8;
  color: #585858;
}

.fp-sizeHint[data-mode="error"] {
  border-color: #ED1B24;
  background: #F8F8F8;
  color: var(--fp-danger);
}

.fp-app .fp-featurePill {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 6px 10px;
  border: 1px solid var(--fp-line);
  border-radius: 999px;
  color: var(--fp-text);
  background: #fff;
  cursor: pointer;
  transition: border-color 0.16s ease, background-color 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}

.fp-app .fp-featurePill:hover {
  border-color: var(--fp-primary);
  box-shadow: 0px 0px 3px 0px #ff0a00 inset;
}

.fp-app .fp-featurePill.is-selected,
.fp-app .fp-featurePill:has(input:checked) {
  border-color: var(--fp-primary);
  background: var(--fp-primary);
  color: #fff;
}

.fp-app .fp-featurePill input {
  position: absolute;
  width: 1px;
  min-height: 1px;
  margin: 0;
  opacity: 0;
  pointer-events: none;
}

.fp-app .fp-featurePill:focus-within {
  border-color: var(--fp-primary);
  box-shadow: 0px 0px 3px 0px #ff0a00 inset;
}

.fp-app .fp-featurePill span {
  pointer-events: none;
}

.fp-mutedLine {
  min-height: 34px;
  padding: 8px 0;
  color: var(--fp-muted);
  font-size: 13px;
}

.fp-actions {
  margin-top: 18px;
  justify-content: flex-end;
}

.fp-app button {
  min-height: 40px;
  border: 0;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 700;
}

.fp-app button:disabled {
  cursor: wait;
  opacity: 0.7;
}

.fp-primaryButton,
.fp-secondaryButton,
.fp-cartButton {
  padding: 0 16px;
}

.fp-primaryButton,
.fp-cartButton {
  background: var(--fp-primary);
  color: #fff;
}

.fp-primaryButton:hover,
.fp-cartButton:hover {
  background: var(--fp-primary-dark);
}

.fp-cartButton.is-added {
  background: #2a2c2b;
}

.fp-secondaryButton {
  border: 1px solid var(--fp-line);
  background: #fff;
  color: var(--fp-text);
}

.fp-compact {
  min-height: 34px;
  padding: 0 12px;
  font-size: 13px;
}

.fp-iconButton {
  width: 40px;
  height: 40px;
  border: 1px solid var(--fp-line);
  background: #fff;
  color: var(--fp-primary);
  font-size: 24px;
  line-height: 1;
}

.fp-iconButton.fp-danger {
  color: var(--fp-danger);
}

.fp-resultSection {
  margin-top: 18px;
  border-radius: 8px;
  overflow: hidden;
}

.fp-resultHeader {
  padding: 18px 20px;
  border-bottom: 1px solid var(--fp-line);
}

.fp-resultTools {
  display: flex;
  align-items: center;
  gap: 12px;
}

.fp-total {
  color: var(--fp-accent);
  font-size: 24px;
  font-weight: 700;
  white-space: nowrap;
}

.fp-tableWrap {
  overflow-x: auto;
}

.fp-app table {
  width: 100%;
  border-collapse: collapse;
  min-width: 980px;
}

.fp-app th,
.fp-app td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--fp-line);
  text-align: left;
  vertical-align: middle;
  font-size: 14px;
}

.fp-app th {
  position: sticky;
  top: 0;
  background: #F8F8F8;
  color: #585858;
  font-size: 12px;
  text-transform: uppercase;
}

.fp-number {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.fp-thumb {
  width: 44px;
  height: 44px;
  border: 1px solid var(--fp-line);
  border-radius: 6px;
  object-fit: cover;
  background: #F8F8F8;
}

.fp-thumbButton {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  min-height: 44px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
}

.fp-thumbButton:hover .fp-thumb,
.fp-thumbButton:focus-visible .fp-thumb {
  border-color: var(--fp-primary);
  box-shadow: 0px 0px 3px 0px #ff0a00 inset;
}

.fp-nameCell {
  min-width: 260px;
  font-weight: 700;
}

.fp-productLink {
  color: var(--fp-text);
  text-decoration: none;
}

.fp-productLink:hover {
  color: var(--fp-primary);
  text-decoration: underline;
}

.fp-subtle {
  display: block;
  margin-top: 4px;
  color: var(--fp-muted);
  font-size: 12px;
  font-weight: 400;
}

.fp-noProduct {
  color: var(--fp-muted);
  font-size: 13px;
}

.fp-empty {
  height: 86px;
  color: var(--fp-muted);
  text-align: center;
}

.fp-imageModal[hidden] {
  display: none;
}

.fp-imageModal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 24px;
}

.fp-imageModalBackdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
}

.fp-imageModalDialog {
  position: relative;
  display: grid;
  gap: 12px;
  width: min(960px, 100%);
  max-height: calc(100vh - 48px);
  padding: 16px;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0px 5px 14px 0px rgba(0, 0, 0, 0.13);
}

.fp-imageModalClose {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 38px;
  height: 38px;
  min-height: 38px;
  border: 1px solid var(--fp-line);
  border-radius: 999px;
  background: #fff;
  color: var(--fp-text);
  font-size: 24px;
  line-height: 1;
}

.fp-imageModalDialog img {
  width: 100%;
  max-height: calc(100vh - 140px);
  object-fit: contain;
  border: 1px solid var(--fp-line);
  border-radius: 6px;
  background: #F8F8F8;
}

.fp-imageModalCaption {
  min-height: 20px;
  color: var(--fp-muted);
  font-size: 14px;
  line-height: 1.4;
}

@media (max-width: 1180px) {
  .fp-requestRow {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .fp-app {
    width: min(100% - 20px, 1480px);
    padding-top: 10px;
  }

  .fp-topbar,
  .fp-resultHeader {
    align-items: flex-start;
    flex-direction: column;
  }

  .fp-form {
    padding: 14px;
  }

  .fp-requestRow {
    grid-template-columns: 1fr;
    padding: 13px;
  }

  .fp-app h1 {
    font-size: 23px;
  }
}
