/* Online order form + modal — scoped .nh-form / .nh-modal */

.nh-form {
  max-width: 640px;
  margin: 0;
}

.nh-form-files {
  margin-bottom: 1em;
}

.nh-form-drop {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35em;
  width: 100%;
  padding: 1.25em 1em;
  border: 2px dashed #bbb;
  border-radius: 10px;
  background: #fafafa;
  color: #444;
  text-align: center;
  cursor: pointer;
  text-shadow: none;
  font-weight: 400;
  font-family: inherit;
  box-sizing: border-box;
  -webkit-appearance: none;
  appearance: none;
}

.nh-form-drop:hover,
.nh-form-drop:focus,
.nh-form-drop.is-dragover {
  border-color: #888;
  background: #f3f3f3;
  outline: none;
}

.nh-form-drop.is-dragover {
  border-color: #0562ad;
}

.nh-form-drop-icon {
  color: #666;
}

.nh-form-drop-title {
  font-size: 15px;
  font-weight: 700;
}

.nh-form-drop-hint {
  font-size: 12px;
  color: #777;
}

.nh-form-file-pick,
.nh-form-file-slot {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  border: 0 !important;
  opacity: 0 !important;
}

.nh-uploader {
  position: relative;
}

.nh-uploader-list {
  display: flex;
  flex-direction: column;
  gap: 0.45em;
  margin-top: 0.75em;
}

.nh-uploader-list[hidden] {
  display: none !important;
  margin: 0;
  gap: 0;
}

.nh-uploader-item {
  display: flex;
  align-items: center;
  gap: 0.6em;
  padding: 0.45em 0.55em;
  background: #f5f5f5;
  border-radius: 8px;
}

.nh-uploader-icon {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #555;
  font-size: 10px;
  font-weight: 700;
  overflow: hidden;
  background: transparent;
}

.nh-uploader-icon--pdf,
.nh-uploader-icon--doc,
.nh-uploader-icon--xls,
.nh-uploader-icon--img,
.nh-uploader-icon--txt,
.nh-uploader-icon--file {
  background: transparent;
  color: #555;
}

.nh-uploader-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.nh-uploader-name {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 13px;
  color: #333;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: none;
  font-weight: 400;
}

.nh-uploader-remove {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: #666;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.nh-uploader-remove:hover {
  background: #e8e8e8;
  color: #111;
}

.nh-uploader-error {
  margin-top: 0.5em;
  color: #c0392b;
  font-size: 13px;
  text-shadow: none;
}

.nh-uploader.is-full .nh-form-drop {
  display: none;
}

.nh-form-input,
.nh-form-message {
  width: 100%;
  box-sizing: border-box;
  padding: 0.65em 0.75em;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 15px;
  font-family: inherit;
  background: #fff;
  color: #333;
  text-shadow: none;
}

.nh-form-fields {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 0.6em;
  margin-bottom: 0.75em;
}

.nh-form-fields .nh-form-input[name="customer_name"] {
  flex: 0 0 100%;
  width: 100%;
  max-width: 100%;
}

.nh-form-fields .nh-form-input[name="phone"],
.nh-form-fields .nh-form-input[name="customer_email"] {
  flex: 1 1 0;
  width: 0;
  max-width: none;
  min-width: 0;
}

.nh-form-message {
  min-height: 120px;
  resize: vertical;
  margin-bottom: 0.75em;
}

.nh-form-input.is-error,
.nh-form-message.is-error {
  background-color: #fbdbd2;
  border-color: #e07a6a;
}

.nh-form-consent {
  display: flex;
  align-items: flex-start;
  gap: 0.55em;
  margin-bottom: 1em;
  font-size: 12px;
  line-height: 1.4;
  color: #444;
  text-shadow: none;
  font-weight: 400;
}

.nh-form-consent input {
  margin-top: 0.2em;
  flex: 0 0 auto;
}

.nh-form-consent a {
  color: #0562ad !important;
  text-decoration: underline !important;
  font-weight: 400;
}

.nh-form-actions {
  text-align: left;
}

.nh-form-submit {
  display: inline-block;
  padding: 0.65em 1.5em;
  border: 0;
  border-radius: 6px;
  background: #333;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  text-shadow: none;
}

.nh-form-submit:hover,
.nh-form-submit:focus {
  background: #111;
}

.nh-form-submit:disabled {
  opacity: 0.65;
  cursor: wait;
}

/* Modal */
.nh-modal {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1em;
  box-sizing: border-box;
}

.nh-modal[hidden] {
  display: none !important;
}

.nh-modal.is-open {
  display: flex !important;
}

.nh-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
}

.nh-modal__dialog {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 560px;
  max-height: calc(100vh - 2em);
  overflow: auto;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
  padding: 1.25em 1.25em 1.5em;
  box-sizing: border-box;
}

.nh-modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1em;
  margin-bottom: 1em;
}

.nh-modal__title {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  color: #333;
  text-shadow: none;
}

.nh-modal__close {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #666;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
}

.nh-modal__close:hover {
  color: #111;
  background: #f0f0f0;
}

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

@media all and (max-width: 768px) {
  .nh-form-fields {
    flex-direction: column;
    flex-wrap: wrap;
  }

  .nh-form-fields .nh-form-input[name="customer_name"],
  .nh-form-fields .nh-form-input[name="phone"],
  .nh-form-fields .nh-form-input[name="customer_email"] {
    flex: 1 1 auto;
    width: 100%;
    max-width: 100%;
  }

  .nh-form-drop {
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
    column-gap: 0.85em;
    row-gap: 0.2em;
    align-items: center;
    min-height: 72px;
    padding: 0.85em 1em;
    text-align: left;
  }

  .nh-form-drop-icon {
    grid-column: 1;
    grid-row: 1 / span 2;
    align-self: center;
  }

  .nh-form-drop-icon svg {
    display: block;
    width: 24px;
    height: 24px;
  }

  .nh-form-drop-title {
    grid-column: 2;
    grid-row: 1;
    font-size: 14px;
    margin: 0;
  }

  .nh-form-drop-hint {
    grid-column: 2;
    grid-row: 2;
    padding-left: 0;
    font-size: 11px;
    line-height: 1.35;
  }

  .nh-uploader-item {
    padding: 0.55em 0.6em;
  }

  .nh-uploader-remove {
    width: 36px;
    height: 36px;
  }

  .nh-form-submit {
    width: 100%;
    box-sizing: border-box;
    min-height: 44px;
  }
}

@media all and (max-width: 480px) {
  .nh-modal {
    padding: 0.5em;
    align-items: flex-end;
  }

  .nh-modal__dialog {
    padding: 1em;
    max-height: calc(100vh - 1em);
    max-height: calc(100dvh - 1em);
    border-radius: 12px 12px 8px 8px;
  }

  .nh-modal__title {
    font-size: 18px;
  }

  .nh-form-drop {
    min-height: 64px;
    padding: 0.75em 0.85em;
  }
}
