/* Shared responsive fixes - all Recivo pages */

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

html,
body {
  overflow-x: hidden;
  max-width: 100%;
}

img,
video,
iframe,
svg {
  max-width: 100%;
  height: auto;
}

/* Touch-friendly tap targets */
button,
.ip-btn,
.btn-blue,
.btn-hero-primary,
.btn-outline,
.demo-call-btn,
.email-gate-submit,
.gate-confirm-btn,
.calendly-trigger {
  min-height: 44px;
}

/* Prevent iOS zoom on form focus */
input,
select,
textarea,
.gate-input,
.gate-country-select {
  font-size: 16px;
}

/* Demo call gate - phones */
@media (max-width: 520px) {
  #emailGate {
    padding: 0;
    align-items: flex-end;
  }

  #emailGate .email-gate-box {
    width: 100% !important;
    max-width: 100% !important;
    border-radius: 20px 20px 0 0;
    max-height: 92vh;
    max-height: 92dvh;
    padding: 28px 20px 24px;
  }

  .gate-phone-row {
    flex-direction: column;
    gap: 10px;
  }

  .gate-country-wrap {
    width: 100%;
  }

  .gate-country-select {
    width: 100%;
  }
}

/* Calendly - small screens */
@media (max-width: 768px) {
  .calendly-overlay .calendly-popup {
    width: 100% !important;
    height: 100% !important;
    max-height: 100dvh !important;
  }

  .calendly-popup-close {
    top: max(12px, env(safe-area-inset-top, 12px)) !important;
    right: max(12px, env(safe-area-inset-right, 12px)) !important;
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
    min-height: 40px !important;
  }
}

/* Safe areas for notched phones */
@supports (padding: env(safe-area-inset-top)) {
  .navbar,
  .ip-nav {
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
  }

  .mobile-menu,
  .ip-mobile-menu {
    padding-bottom: calc(16px + env(safe-area-inset-bottom));
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .ip-reveal {
    opacity: 1;
    transform: none;
  }
}
