.qm-lb-launcher {
  display: grid;
  gap: 0.75rem;
  margin: 1rem 0 1.25rem;
  padding: 1rem;
  border: 1px solid #d9dde5;
  border-radius: 1rem;
  background:
    radial-gradient(circle at top right, rgba(59, 130, 246, 0.12), transparent 26%),
    linear-gradient(180deg, #ffffff 0%, #f6f8fb 100%);
}

.qm-lb-launcher__button {
  width: 100%;
  justify-content: center;
}

.qm-lb-launcher__hint,
.qm-lb-launcher__summary-label {
  margin: 0;
  color: #5a6473;
  font-size: 0.95rem;
}

.qm-lb-launcher__summary {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}

.qm-lb-launcher__summary-value {
  color: #121722;
  font-size: 1rem;
}

body.qm-lb-modal-open {
  overflow: hidden;
}

.qm-lb-modal {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: none;
}

.qm-lb-modal.is-open {
  display: block;
}

.qm-lb-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 14, 22, 0.58);
}

.qm-lb-modal__dialog {
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr auto;
  width: 100%;
  height: 100%;
  margin-left: auto;
  background: #ffffff;
  box-shadow: -18px 0 45px rgba(15, 23, 42, 0.22);
}

.qm-lb-modal__header,
.qm-lb-modal__footer {
  background: #ffffff;
}

.qm-lb-modal__header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem;
  border-bottom: 1px solid #e7ebf1;
}

.qm-lb-modal__header-copy {
  min-width: 0;
  flex: 1 1 auto;
}

.qm-lb-modal__eyebrow {
  margin: 0 0 0.25rem;
  color: #2864f0;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.qm-lb-modal__title {
  margin: 0;
  color: #121722;
  font-size: 1.55rem;
  line-height: 1.15;
}

.qm-lb-modal__icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.6rem;
  height: 2.6rem;
  border: 0;
  border-radius: 999px;
  background: #eef3fb;
  color: #121722;
  font-size: 1.2rem;
}

.qm-lb-modal__icon-button.is-hidden {
  visibility: hidden;
}

.qm-lb-modal__content {
  overflow-y: auto;
  padding: 1rem;
  background:
    radial-gradient(circle at top left, rgba(53, 124, 255, 0.08), transparent 32%),
    linear-gradient(180deg, #ffffff 0%, #f7f9fc 100%);
}

.qm-lb-modal__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 0.9rem 1rem calc(0.9rem + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid #e7ebf1;
}

.qm-lb-modal__footer-copy {
  min-width: 0;
  flex: 1 1 100%;
}

.qm-lb-modal__summary-label,
.qm-lb-modal__price-label {
  margin: 0;
  color: #5a6473;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.qm-lb-modal__summary-text,
.qm-lb-modal__price-value {
  display: block;
  margin-top: 0.18rem;
  color: #121722;
}

.qm-lb-modal__summary-text {
  overflow: hidden;
  font-size: 0.96rem;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.qm-lb-modal__footer-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  width: 100%;
  min-width: 0;
}

.qm-lb-modal__price-block {
  text-align: right;
  flex: 0 1 auto;
  min-width: 0;
}

.qm-lb-modal__price-value {
  font-size: 1.05rem;
  font-weight: 700;
}

.qm-lb-modal__cta {
  min-width: 7.5rem;
  padding: 0.92rem 1.2rem;
  border: 0;
  border-radius: 999px;
  background: #121722;
  color: #ffffff;
  font-weight: 600;
  flex: 0 0 auto;
}

.qm-lb-modal__cta:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}

.qm-lb-panel {
  display: grid;
  gap: 1rem;
}

.qm-lb-panel--centered {
  min-height: 50vh;
  place-content: center;
  text-align: center;
}

.qm-lb-panel__hero,
.qm-lb-choice-panel,
.qm-lb-manual-card,
.qm-lb-upload,
.qm-lb-summary-list {
  padding: 1rem;
  border: 1px solid #e6ebf2;
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.96);
}

.qm-lb-choice-panel--success {
  border-color: rgba(40, 100, 240, 0.2);
  background:
    radial-gradient(circle at top right, rgba(40, 100, 240, 0.1), transparent 30%),
    rgba(255, 255, 255, 0.98);
}

.qm-lb-panel__title {
  margin: 0;
  color: #121722;
  font-size: 1.15rem;
}

.qm-lb-panel__lead,
.qm-lb-panel__copy,
.qm-lb-panel__meta {
  margin: 0;
  color: #495469;
  line-height: 1.55;
}

.qm-lb-panel__meta {
  font-size: 0.88rem;
}

.qm-lb-card-list {
  display: grid;
  gap: 0.85rem;
}

.qm-lb-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
  padding: 1rem;
  border: 1px solid #dbe3ee;
  border-radius: 1rem;
  background: #ffffff;
  color: #121722;
  text-align: left;
}

.qm-lb-card.is-selected {
  border-color: #2864f0;
  box-shadow: 0 0 0 2px rgba(40, 100, 240, 0.12);
}

.qm-lb-card__copy {
  display: grid;
  gap: 0.22rem;
  min-width: 0;
}

.qm-lb-card__title {
  color: #121722;
  font-size: 1rem;
}

.qm-lb-card__description {
  color: #5a6473;
  font-size: 0.92rem;
  line-height: 1.45;
}

.qm-lb-card__price,
.qm-lb-card__badge {
  flex: 0 0 auto;
  color: #2864f0;
  font-size: 0.85rem;
  font-weight: 700;
  white-space: nowrap;
}

.qm-lb-card__meta-stack {
  display: grid;
  gap: 0.35rem;
  justify-items: end;
}

.qm-lb-card__badge {
  padding: 0.3rem 0.55rem;
  border-radius: 999px;
  background: #eef4ff;
}

.qm-lb-notice {
  padding: 0.9rem 1rem;
  border-radius: 0.9rem;
  font-size: 0.94rem;
}

.qm-lb-notice--error {
  border: 1px solid #ffc9cc;
  background: #fff6f6;
  color: #a13b40;
}

.qm-lb-loader {
  width: 2.4rem;
  height: 2.4rem;
  margin: 0 auto;
  border: 3px solid rgba(40, 100, 240, 0.16);
  border-top-color: #2864f0;
  border-radius: 50%;
  animation: qm-lb-spin 0.9s linear infinite;
}

.qm-lb-empty-state {
  display: grid;
  gap: 0.75rem;
}

.qm-lb-upload {
  display: grid;
  gap: 1rem;
}

.qm-lb-upload__dropzone {
  display: grid;
  gap: 0.45rem;
  padding: 1.15rem;
  border: 1px dashed #9eb4db;
  border-radius: 1rem;
  background: #f8fbff;
}

.qm-lb-upload__input {
  display: block;
}

.qm-lb-upload__title {
  color: #121722;
  font-weight: 700;
}

.qm-lb-upload__meta,
.qm-lb-upload__status span {
  color: #5a6473;
  font-size: 0.92rem;
}

.qm-lb-upload__status {
  display: grid;
  gap: 0.2rem;
}

.qm-lb-manual-grid {
  display: grid;
  gap: 1rem;
}

.qm-lb-manual-grid--single {
  grid-template-columns: 1fr;
}

.qm-lb-manual-card {
  display: grid;
  gap: 0.8rem;
}

.qm-lb-manual-card__title {
  margin: 0;
  color: #121722;
  font-size: 1rem;
}

.qm-lb-field {
  display: grid;
  gap: 0.35rem;
}

.qm-lb-field__label {
  color: #334155;
  font-size: 0.86rem;
  font-weight: 600;
}

.qm-lb-field__input {
  width: 100%;
  min-height: 2.8rem;
  padding: 0.72rem 0.85rem;
  border: 1px solid #dbe3ee;
  border-radius: 0.85rem;
  background: #ffffff;
  color: #121722;
}

.qm-lb-checkbox {
  display: flex;
  gap: 0.7rem;
  align-items: flex-start;
  color: #334155;
  line-height: 1.45;
}

.qm-lb-option-group,
.qm-lb-review-card {
  display: grid;
  gap: 0.9rem;
  padding: 1rem;
  border: 1px solid #e6ebf2;
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.96);
}

.qm-lb-option-group__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.qm-lb-review-grid {
  gap: 1rem;
}

.qm-lb-summary-list {
  display: grid;
  gap: 0.75rem;
}

.qm-lb-summary-list__row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  color: #334155;
  align-items: flex-start;
}

.qm-lb-summary-list__row strong {
  color: #121722;
  text-align: right;
  max-width: 62%;
  white-space: normal;
  line-height: 1.45;
}

.qm-lb-summary-list__row--total {
  padding-top: 0.8rem;
  border-top: 1px solid #dbe3ee;
}

.qm-lb-summary-list__row--total span,
.qm-lb-summary-list__row--total strong {
  font-size: 1rem;
}

@keyframes qm-lb-spin {
  to {
    transform: rotate(360deg);
  }
}

@media (min-width: 782px) {
  .qm-lb-launcher {
    padding: 1.1rem 1.2rem;
  }

  .qm-lb-modal__dialog {
    width: min(34rem, 100%);
  }

  .qm-lb-manual-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .qm-lb-review-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .qm-lb-modal__footer {
    flex-wrap: nowrap;
  }

  .qm-lb-modal__footer-copy {
    flex: 1 1 auto;
  }

  .qm-lb-modal__footer-actions {
    width: auto;
  }

  .qm-lb-modal__cta {
    min-width: 8.8rem;
  }
}
