/* БЛОК: Модалки на телефоне — один слой, bottom sheet без наложений */

@media (max-width: 768px) {
  .modal-bg {
    z-index: 1100;
    padding: 0;
    align-items: flex-end;
    justify-content: center;
  }
  .modal-bg.show {
    display: flex;
  }
  .modal-bg.show .modal {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin: 0;
    border-radius: 16px 16px 0 0;
    padding: 20px 16px calc(16px + var(--safe-bottom));
    box-sizing: border-box;
    box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.18);
    max-height: min(92dvh, 92vh);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .modal-bg.show .modal h3 {
    margin: 0 0 14px;
    font-size: 17px;
    line-height: 1.3;
  }
  .modal-bg.show .modal input {
    width: 100%;
    margin: 0 0 16px;
    padding: 12px 14px;
    font-size: 16px;
    box-sizing: border-box;
  }
  .modal-bg.show .modal .btns {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    justify-content: flex-start;
    margin: 0;
  }
  .modal-bg.show .modal .btns .btn {
    width: 100%;
    margin: 0;
    justify-content: center;
    min-height: 44px;
  }
  #progressModal {
    z-index: 1100;
    align-items: flex-end;
    padding: 0;
  }
  #progressModal .progress-modal {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin: 0;
    border-radius: 16px 16px 0 0;
    padding: 20px 16px calc(16px + var(--safe-bottom));
    box-sizing: border-box;
  }
}
