/* ===== DM Delivery Form - isolated styles (override theme) ===== */

.dm-form-wrap {
  max-width: 720px;
}

/* 1) Base reset inside plugin container */
.dm-form-wrap,
.dm-form-wrap * {
  box-sizing: border-box;
}

/* 2) Force default readable typography inside plugin (overrides theme) */
.dm-form-wrap {
  color: #111 !important;
}
.dm-form-wrap label,
.dm-form-wrap legend,
.dm-form-wrap span,
.dm-form-wrap p,
.dm-form-wrap div {
  color: #111 !important;         /* <-- ломаем белый текст темы */
}

/* 3) Fix layout that themes often break (floats/inline labels) */
.dm-form-wrap label,
.dm-form-wrap legend {
  display: block !important;
  float: none !important;
  width: 100% !important;
  margin: 0 0 6px 0 !important;
  padding: 0 !important;
  text-align: left !important;
  font-weight: 600;
}

/* 4) One-column stable layout */
.dm-form-wrap .dm-grid {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 14px !important;
}

/* 5) Inputs: own background + text color (ignore theme) */
.dm-form-wrap input[type="text"],
.dm-form-wrap input[type="email"],
.dm-form-wrap input[type="tel"],
.dm-form-wrap textarea {
  display: block !important;
  float: none !important;
  width: 100% !important;
  max-width: 100% !important;
  background: #fff !important;
  color: #111 !important;
  border: 1px solid #d7d7d7 !important;
  border-radius: 8px !important;
  padding: 12px 12px !important;
  outline: none !important;
}

/* Placeholder */
.dm-form-wrap input::placeholder,
.dm-form-wrap textarea::placeholder {
  color: #777 !important;
}

/* 6) Fieldset */
.dm-form-wrap .dm-fieldset {
  border: 1px solid #d7d7d7 !important;
  border-radius: 10px !important;
  padding: 12px !important;
  background: #fff !important;
}

/* 7) Checkboxes: align nicely */
.dm-form-wrap .dm-check {
  display: flex !important;
  align-items: flex-start !important;
  gap: 10px !important;
  margin: 10px 0 !important;
}

.dm-form-wrap .dm-check input[type="checkbox"] {
  width: 18px !important;
  height: 18px !important;
  margin: 3px 0 0 0 !important;
  flex: 0 0 auto !important;
}

.dm-form-wrap .dm-check span {
  color: #111 !important;
  line-height: 1.4 !important;
}

/* 8) Button */
.dm-form-wrap .dm-btn {
  margin-top: 8px !important;
  padding: 12px 16px !important;
  border: 1px solid #cfcfcf !important;
  border-radius: 8px !important;
  background: #f2f2f2 !important;
  color: #111 !important;
  cursor: pointer !important;
}
.dm-form-wrap .dm-btn:hover {
  opacity: 0.9;
}

/* 9) Notices */
.dm-form-wrap .dm-form-notice{
  padding: 12px 14px !important;
  margin: 0 0 14px 0 !important;
  border-radius: 10px !important;
  font-size: 14px !important;
  background: #fff !important;
  color:#111 !important;
}
.dm-form-wrap .dm-ok  { border: 1px solid #2b7a2b !important; }
.dm-form-wrap .dm-err { border: 1px solid #a33 !important; }

/* 10) Remove dark background on focus */
.dm-form-wrap input[type="text"]:focus,
.dm-form-wrap input[type="email"]:focus,
.dm-form-wrap input[type="tel"]:focus,
.dm-form-wrap textarea:focus {
  background: #fff !important;
  color: #111 !important;
  border-color: #999 !important; /* опционально */
  outline: none !important;
  box-shadow: none !important;
}

/* optional: smooth transition for focus */
.dm-form-wrap input,
.dm-form-wrap textarea {
  transition: border-color 0.2s, background 0.2s;
}
