/* Order modal — B.LAB */

.order-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.order-modal.is-open {
  opacity: 1;
  visibility: visible;
}

.order-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(4px);
}

.order-modal__dialog {
  position: relative;
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(320px, 1.15fr);
  align-items: stretch;
  width: min(1080px, 100%);
  max-height: min(92vh, 760px);
  background: #fff;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.28);
  transform: translateY(16px) scale(0.98);
  transition: transform 0.3s ease;
}

.order-modal.is-open .order-modal__dialog {
  transform: translateY(0) scale(1);
}

.order-modal__close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 2;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #111;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s ease;
}

.order-modal__close:hover {
  background: rgba(0, 0, 0, 0.06);
}

/* Left promo panel */
.order-modal__promo {
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 36px 32px 24px;
  background: #f3f3f3;
  overflow: hidden;
}

.order-modal__brand {
  margin: 0 0 28px;
  font-family: 'Oswald', sans-serif;
  font-size: 22px;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: #111;
}

.order-modal__promo-title {
  margin: 0 0 12px;
  font-family: 'Oswald', sans-serif;
  font-size: clamp(28px, 3vw, 40px);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #111;
}

.order-modal__promo-text {
  margin: 0 0 24px;
  font-family: 'Roboto Condensed', sans-serif;
  font-size: 15px;
  line-height: 1.5;
  color: #494949;
}

.order-modal__features {
  list-style: none;
  margin: 0 0 auto;
  padding: 0;
  display: grid;
  gap: 14px;
}

.order-modal__feature {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-family: 'Roboto Condensed', sans-serif;
  font-size: 14px;
  line-height: 1.4;
  color: #333;
}

.order-modal__feature-icon {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  color: #111;
}

.order-modal__visual {
  margin-top: 20px;
  flex-shrink: 1;
  min-height: 0;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  aspect-ratio: 4 / 3;
}

.order-modal__visual img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Form panel */
.order-modal__form-wrap {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 36px 32px 24px;
  background: #fff;
  overflow: hidden;
}

.order-modal__form-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

.order-modal__form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 0;
  overflow-y: auto;
  padding-right: 4px;
}

.order-modal__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.order-modal__field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.order-modal__label {
  font-family: 'Roboto Condensed', sans-serif;
  font-size: 13px;
  color: #494949;
}

.order-modal__label .req {
  color: #d93025;
}

.order-modal__input,
.order-modal__textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #d9d9d9;
  border-radius: 10px;
  background: #fff;
  font-family: 'Roboto Condensed', sans-serif;
  font-size: 15px;
  color: #111;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.order-modal__input::placeholder,
.order-modal__textarea::placeholder {
  color: #9a9a9a;
}

.order-modal__input:focus,
.order-modal__textarea:focus {
  outline: none;
  border-color: #111;
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.06);
}

.order-modal__textarea-wrap {
  position: relative;
}

.order-modal__textarea {
  min-height: 110px;
  resize: vertical;
}

.order-modal__counter {
  position: absolute;
  right: 12px;
  bottom: 10px;
  font-family: 'Roboto Condensed', sans-serif;
  font-size: 12px;
  color: #9a9a9a;
  pointer-events: none;
}

.order-modal__hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

/* File upload */
.order-modal__upload {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 120px;
  padding: 20px 16px;
  border: 1.5px dashed #c8c8c8;
  border-radius: 12px;
  background: #fafafa;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.order-modal__upload:hover,
.order-modal__upload.is-dragover {
  border-color: #111;
  background: #f5f5f5;
}

.order-modal__upload input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.order-modal__upload-icon {
  width: 28px;
  height: 28px;
  color: #666;
}

.order-modal__upload-text {
  margin: 0;
  font-family: 'Roboto Condensed', sans-serif;
  font-size: 14px;
  line-height: 1.45;
  color: #494949;
}

.order-modal__upload-hint {
  margin: 0;
  font-family: 'Roboto Condensed', sans-serif;
  font-size: 12px;
  color: #9a9a9a;
}

.order-modal__file-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.order-modal__file-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  background: #f0f0f0;
  font-family: 'Roboto Condensed', sans-serif;
  font-size: 12px;
  color: #333;
}

.order-modal__file-remove {
  border: 0;
  background: transparent;
  color: #666;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  padding: 0 2px;
}

/* Footer */
.order-modal__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid #eee;
}

.order-modal__privacy {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  max-width: 280px;
  font-family: 'Roboto Condensed', sans-serif;
  font-size: 12px;
  line-height: 1.4;
  color: #9a9a9a;
}

.order-modal__privacy svg {
  flex-shrink: 0;
  width: 14px;
  height: 14px;
  margin-top: 1px;
}

.order-modal__submit {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 24px;
  border: 0;
  border-radius: 999px;
  background: #111;
  color: #fff;
  font-family: 'Oswald', sans-serif;
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.2s ease, opacity 0.2s ease;
}

.order-modal__submit:hover:not(:disabled) {
  background: #333;
}

.order-modal__row--extra.is-hidden {
  display: none;
}

.order-modal--signage .order-modal__promo-title,
.order-modal--modeling .order-modal__promo-title {
  letter-spacing: 0.05em;
}

.order-modal__submit:disabled {
  opacity: 0.6;
  cursor: wait;
}

/* Messages */
.order-modal__message {
  margin: 0;
  padding: 10px 12px;
  border-radius: 10px;
  font-family: 'Roboto Condensed', sans-serif;
  font-size: 14px;
  line-height: 1.4;
}

.order-modal__message--error {
  background: #fdecea;
  color: #b3261e;
}

.order-modal__message--success {
  background: #e8f5e9;
  color: #1b5e20;
}

.order-modal__success-screen {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 12px;
  padding: 32px;
  background: #fff;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.order-modal__success-screen.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.order-modal__success-title {
  margin: 0;
  font-family: 'Oswald', sans-serif;
  font-size: 22px;
  font-weight: 400;
  line-height: 1.3;
  letter-spacing: 0.02em;
  color: #111;
  max-width: 340px;
}

.order-modal__success-text {
  margin: 0;
  max-width: 320px;
  font-family: 'Roboto Condensed', sans-serif;
  font-size: 15px;
  line-height: 1.5;
  color: #494949;
}

body.order-modal-open {
  overflow: hidden;
}

@media (max-width: 860px) {
  .order-modal__dialog {
    grid-template-columns: 1fr;
    max-height: 94vh;
  }

  .order-modal__promo {
    padding: 28px 24px 20px;
  }

  .order-modal__visual {
    display: none;
  }

  .order-modal__form-wrap {
    padding: 24px 24px 20px;
  }

  .order-modal__row {
    grid-template-columns: 1fr;
  }

  .order-modal__footer {
    flex-direction: column;
    align-items: stretch;
  }

  .order-modal__privacy {
    max-width: none;
    justify-content: center;
    text-align: center;
  }

  .order-modal__submit {
    justify-content: center;
    width: 100%;
  }
}

@media (max-width: 480px) {
  .order-modal {
    padding: 8px;
  }

  .order-modal__dialog {
    border-radius: 16px;
  }

  .order-modal__close {
    top: 10px;
    right: 10px;
  }
}
