/**
 * Auth Modal — Responsive Styles
 *
 * Mobile bottom sheet, desktop handle visibility, and reduced motion.
 * Part of the auth-modal module split from auth-modal.css.
 *
 * @see static/css/auth-modal.css (original)
 */

@media (max-width: 768px) {
  .gf-auth-modal {
    padding: 0;
    align-items: flex-end;
  }

  .gf-auth-modal__dialog {
    padding: 0.5rem 1.5rem 2rem;
    border-radius: 1.25rem 1.25rem 0 0;
    max-height: 92vh;
    max-height: 92dvh;
    /* pan-y allows vertical scrolling while preserving swipe-to-close on handle */
    touch-action: pan-y;
  }

  /* Show drag handle on mobile */
  .gf-auth-modal .gf-modal__handle {
    display: flex;
    justify-content: center;
    padding: 0.75rem 1rem 0.5rem;
    cursor: grab;
  }

  .gf-auth-modal .gf-modal__handle-bar {
    width: 40px;
    height: 4px;
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 2px;
    transition: background-color 0.15s ease, width 0.15s ease;
  }

  .gf-auth-modal .gf-modal__handle:hover .gf-modal__handle-bar,
  .gf-auth-modal .gf-modal__handle:active .gf-modal__handle-bar {
    background-color: rgba(0, 0, 0, 0.35);
    width: 50px;
  }

  .gf-auth-step__summary {
    flex-direction: column;
    align-items: flex-start;
  }

  .gf-auth-step__actions {
    justify-content: stretch;
  }

  .gf-auth-step__actions .btn {
    width: 100%;
  }

  .gf-auth-form__grid {
    grid-template-columns: 1fr;
  }

  .gf-auth-profile__options {
    grid-template-columns: 1fr;
  }

  .gf-auth-modal__close {
    top: 0.75rem;
    right: 0.75rem;
  }
}

/* Hide drag handle on desktop */
@media (min-width: 769px) {
  .gf-auth-modal .gf-modal__handle {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .gf-auth-modal {
    transition: none;
  }
  .gf-auth-profile__option,
  .gf-auth-modal__close {
    transition: none;
  }
}
