.cotdps-wrap {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 16px;
  background: #fff;
}

.cotdps-search-box {
  position: relative;
}

#cotdps-search {
  width: 100%;
  min-height: 42px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  padding: 0.6rem 0.75rem;
}

.cotdps-results {
  position: absolute;
  z-index: 1000;
  width: 100%;
  max-height: 280px;
  overflow: auto;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  margin-top: 6px;
}

.cotdps-item {
  display: grid;
  grid-template-columns: 48px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 8px;
  border-bottom: 1px solid #f1f5f9;
  cursor: pointer;
}

.cotdps-item:hover {
  background: #f8fafc;
}

.cotdps-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 14px;
}

.cotdps-table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.cotdps-table th,
.cotdps-table td {
  border-bottom: 1px solid #e5e7eb;
  padding: 8px;
  font-size: 14px;
  vertical-align: middle;
}

.cotdps-product-cell {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cotdps-product-cell img,
.cotdps-product-placeholder {
  width: 44px;
  height: 44px;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
}

.cotdps-product-cell img {
  object-fit: cover;
}

.cotdps-product-placeholder {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  background: #f8fafc;
}

.cotdps-table input[type="number"] {
  width: 80px;
}

.cotdps-table .cotdps-price {
  width: 110px;
}

.cotdps-ok {
  color: #15803d;
  font-weight: 600;
}

.cotdps-bad {
  color: #b91c1c;
  font-weight: 600;
}

.cotdps-actions {
  margin-top: 12px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.cotdps-total {
  min-width: 220px;
  line-height: 1.6;
}

.cotdps-action-buttons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.cotdps-form {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid #e5e7eb;
}

.cotdps-form-actions {
  margin-top: 10px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.cotdps-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.cotdps-grid input,
#cotdps-note {
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  min-height: 40px;
  padding: 0.55rem 0.7rem;
  width: 100%;
}

#cotdps-note {
  min-height: 88px;
  margin-top: 10px;
}

.cotdps-msg {
  margin-top: 10px;
  padding: 8px 10px;
  border-radius: 8px;
}

.cotdps-msg.ok {
  background: #ecfdf3;
  color: #166534;
}

.cotdps-msg.error {
  background: #fef2f2;
  color: #991b1b;
}

.cotdps-btn-quote,
.cotdps-btn-quote-single {
  margin-top: 8px;
}

@media (max-width: 768px) {
  .cotdps-wrap {
    padding: 12px;
  }

  .cotdps-table {
    min-width: 760px;
  }

  .cotdps-table th,
  .cotdps-table td {
    font-size: 13px;
    white-space: nowrap;
  }

  .cotdps-product-cell {
    min-width: 210px;
  }

  .cotdps-grid {
    grid-template-columns: 1fr;
  }

  .cotdps-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .cotdps-action-buttons {
    width: 100%;
  }

  .cotdps-action-buttons .button {
    width: 100%;
  }

  .cotdps-form-actions {
    flex-direction: column;
  }

  .cotdps-form-actions .button {
    width: 100%;
  }
}
