/* Phone New-deal sheet: one surface, same language as cash-create. Desktop Pro stays sectioned. */

body.lite #deal-form-modal.overlay,
html.tg-phone #deal-form-modal.overlay {
  align-items: flex-end;
  justify-content: stretch;
  background: rgb(0 0 0 / 16%);
  backdrop-filter: blur(2px);
}

body.lite #deal-form-modal .modal,
html.tg-phone #deal-form-modal .modal {
  width: 100%;
  max-width: none;
  min-width: 0;
  margin: 0;
  padding: 8px 12px 12px;
  border: 0 !important;
  border-radius: 8px 8px 0 0 !important;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, .18);
  background: var(--tg-theme-bg-color, #fff);
}

body.lite #deal-form-modal #form.nf-deal-form,
html.tg-phone #deal-form-modal #form.nf-deal-form,
body.lite #deal-form-modal #form.nf-deal-form.ui-surface,
html.tg-phone #deal-form-modal #form.nf-deal-form.ui-surface,
body.lite #deal-form-modal #form .nf-section,
html.tg-phone #deal-form-modal #form .nf-section,
body.lite #deal-form-modal #form .nf-section-purchase,
html.tg-phone #deal-form-modal #form .nf-section-purchase,
body.lite #deal-form-modal #form .nf-preview-bar,
html.tg-phone #deal-form-modal #form .nf-preview-bar,
body.lite #deal-form-modal #form .ecosystem-field-row,
html.tg-phone #deal-form-modal #form .ecosystem-field-row {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

body.lite #deal-form-modal #form.nf-deal-form,
html.tg-phone #deal-form-modal #form.nf-deal-form {
  margin: 0 !important;
  padding: 0 0 calc(var(--nf-sticky-h, 118px) + 12px) !important;
  border-radius: 0 !important;
}

body.lite #deal-form-modal #form .nf-section,
html.tg-phone #deal-form-modal #form .nf-section {
  margin: 0 0 10px;
  padding: 0 0 8px;
  border-radius: 0 !important;
}

body.lite #deal-form-modal #form .nf-section-title,
html.tg-phone #deal-form-modal #form .nf-section-title {
  margin: 0 0 6px;
}

body.lite #deal-form-modal #form .nf-op-row,
html.tg-phone #deal-form-modal #form .nf-op-row,
body.lite #deal-form-modal #form .ecosystem-field-row,
html.tg-phone #deal-form-modal #form .ecosystem-field-row {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
}

body.lite #deal-form-modal #form .ecosystem-grow-field,
html.tg-phone #deal-form-modal #form .ecosystem-grow-field {
  width: 100%;
  min-height: 38px;
  height: 38px;
  max-height: 44px;
  padding: 8px 10px;
}

body.lite #deal-form-modal #form .nf-preview-bar,
html.tg-phone #deal-form-modal #form .nf-preview-bar {
  margin: 2px 0 4px;
  padding: 4px 0;
  border-radius: 0 !important;
}

body.lite #deal-form-modal .nf-actions-sticky,
html.tg-phone #deal-form-modal .nf-actions-sticky {
  left: 0;
  right: 0;
  padding: 8px 12px;
  border-radius: 0;
  box-shadow: none;
  background: var(--tg-theme-bg-color, #fff);
}

html[data-theme="dark"] body.lite #deal-form-modal .nf-actions-sticky,
html.tg-phone[data-theme="dark"] #deal-form-modal .nf-actions-sticky,
body.lite #deal-form-modal[data-theme="dark"] .nf-actions-sticky {
  background: var(--tg-theme-bg-color, #1a2330);
}

@media (max-width: 760px) {
  #deal-form-modal.overlay {
    align-items: flex-end;
    justify-content: stretch;
    background: rgb(0 0 0 / 16%);
    backdrop-filter: blur(2px);
  }
  #deal-form-modal .modal {
    width: 100%;
    max-width: none;
    min-width: 0;
    margin: 0;
    padding: 8px 12px 12px;
    border: 0 !important;
    border-radius: 8px 8px 0 0 !important;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, .18);
    background: var(--tg-theme-bg-color, #fff);
  }
  #deal-form-modal #form.nf-deal-form,
  #deal-form-modal #form.nf-deal-form.ui-surface,
  #deal-form-modal #form .nf-section,
  #deal-form-modal #form .nf-section-purchase,
  #deal-form-modal #form .nf-preview-bar,
  #deal-form-modal #form .ecosystem-field-row {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
  }
  #deal-form-modal #form.nf-deal-form {
    margin: 0 !important;
    padding: 0 0 calc(var(--nf-sticky-h, 118px) + 12px) !important;
    border-radius: 0 !important;
  }
  #deal-form-modal #form .nf-section {
    margin: 0 0 10px;
    padding: 0 0 8px;
    border-radius: 0 !important;
  }
  #deal-form-modal #form .nf-section-title {
    margin: 0 0 6px;
  }
  #deal-form-modal #form .nf-op-row,
  #deal-form-modal #form .ecosystem-field-row {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
  }
  #deal-form-modal #form .ecosystem-grow-field {
    width: 100%;
    min-height: 38px;
    height: 38px;
    max-height: 44px;
    padding: 8px 10px;
  }
  #deal-form-modal #form .nf-preview-bar {
    margin: 2px 0 4px;
    padding: 4px 0;
    border-radius: 0 !important;
  }
  #deal-form-modal .nf-actions-sticky {
    left: 0;
    right: 0;
    padding: 8px 12px;
    border-radius: 0;
    box-shadow: none;
    background: var(--tg-theme-bg-color, #fff);
  }
  html[data-theme="dark"] #deal-form-modal .nf-actions-sticky,
  #deal-form-modal[data-theme="dark"] .nf-actions-sticky {
    background: var(--tg-theme-bg-color, #1a2330);
  }
}
