/* Quick Order Modal — vanilla CSS, brand-aware */

.qom {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: qom-fade 0.2s ease;
}
.qom[hidden] { display: none; }

.qom__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(2px);
}

.qom__panel {
  position: relative;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
  width: 100%;
  max-width: 460px;
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  padding: 28px 24px 24px;
  animation: qom-slide-up 0.25s cubic-bezier(0.2, 0.9, 0.3, 1);
}

@keyframes qom-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes qom-slide-up {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.qom__close {
  position: absolute;
  top: 8px;
  right: 12px;
  width: 36px;
  height: 36px;
  border: none;
  background: transparent;
  font-size: 28px;
  line-height: 1;
  color: #6b7280;
  cursor: pointer;
  border-radius: 50%;
  transition: background 0.15s;
}
.qom__close:hover { background: #f3f4f6; color: #111827; }

.qom__title {
  font-size: 22px;
  font-weight: 800;
  margin: 0 0 6px;
  color: #111827;
}
.qom__subtitle {
  margin: 0 0 18px;
  color: #6b7280;
  font-size: 14px;
}

/* Mahsulot info */
.qom__product {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 12px;
  background: #f9fafb;
  border-radius: 10px;
  margin-bottom: 18px;
}
.qom__product-img {
  width: 64px;
  height: 64px;
  object-fit: contain;
  border-radius: 8px;
  background: #fff;
  flex-shrink: 0;
}
.qom__product-info { flex: 1; min-width: 0; }
.qom__product-name {
  font-size: 14px;
  font-weight: 600;
  margin: 0 0 4px;
  color: #111827;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.qom__product-sku {
  font-size: 12px;
  color: #9ca3af;
  margin: 0 0 4px;
}
.qom__product-price {
  font-size: 14px;
  font-weight: 700;
  color: #023E8A;
  margin: 0;
}

/* Form */
.qom__form { display: flex; flex-direction: column; gap: 14px; }

.qom__field { display: flex; flex-direction: column; gap: 4px; }
.qom__label {
  font-size: 13px;
  font-weight: 600;
  color: #374151;
}
.qom__required { color: #DC2626; }

.qom__field input,
.qom__field textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #E5E7EB;
  border-radius: 8px;
  font-size: 15px;
  font-family: inherit;
  background: #fff;
  transition: border-color 0.15s, box-shadow 0.15s;
  box-sizing: border-box;
}
.qom__field input:focus,
.qom__field textarea:focus {
  outline: none;
  border-color: #023E8A;
  box-shadow: 0 0 0 3px rgba(2, 62, 138, 0.12);
}

.qom__field--qty input {
  max-width: 120px;
}

.qom__hint {
  font-size: 12px;
  color: #9ca3af;
  margin-top: 2px;
}

.qom__submit {
  margin-top: 6px;
  padding: 14px 20px;
  background: #023E8A;
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
}
.qom__submit:hover:not(:disabled) { background: #03306E; }
.qom__submit:active { transform: scale(0.98); }
.qom__submit:disabled { background: #9ca3af; cursor: wait; }

.qom__terms {
  font-size: 11px;
  color: #9ca3af;
  text-align: center;
  margin: 4px 0 0;
}

/* Success / Error states */
.qom__icon {
  font-size: 56px;
  text-align: center;
  margin-bottom: 8px;
}
.qom__success-id {
  text-align: center;
  font-size: 15px;
  color: #4B5563;
  margin: 0 0 16px;
}
.qom__success-id strong { color: #023E8A; }

.qom__success-info {
  background: #ECFDF5;
  border-radius: 10px;
  padding: 12px 14px;
  margin: 0 0 16px;
}
.qom__success-info p { margin: 4px 0; font-size: 14px; color: #065F46; }

.qom__telegram {
  display: block;
  text-align: center;
  background: #0088CC;
  color: #fff;
  padding: 14px;
  border-radius: 10px;
  font-weight: 700;
  text-decoration: none;
  font-size: 15px;
  margin-bottom: 8px;
  transition: background 0.15s;
}
.qom__telegram:hover { background: #006699; color: #fff; }

.qom__close-btn,
.qom__retry {
  display: block;
  width: 100%;
  padding: 12px;
  background: transparent;
  border: 1px solid #E5E7EB;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  color: #4B5563;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s;
}
.qom__close-btn:hover,
.qom__retry:hover { background: #F3F4F6; }

.qom__error-msg {
  text-align: center;
  color: #DC2626;
  font-size: 14px;
  margin: 0 0 16px;
}

/* Mobile */
@media (max-width: 480px) {
  .qom { padding: 0; align-items: flex-end; }
  .qom__panel {
    border-radius: 16px 16px 0 0;
    max-height: 92vh;
    padding: 24px 20px 20px;
  }
}
