/* ================= Mobile: make buttons smaller (global) ==================== */
@media (max-width: 600px){
  /* Default mobile variables for buttons */
  :root{
    --btn-pad-y: 12px;
    --btn-pad-x: 20px;
    --btn-radius: 10px;
  }

  /* Global buttons (theme + Gutenberg + native inputs) */
  .btn,
  .ph-btn,
  .hp-btn,
  a.button,
  .button,
  button,
  input[type=button],
  input[type=submit],
  .wp-block-button__link{
    padding: var(--btn-pad-y) var(--btn-pad-x) !important;
    border-radius: var(--btn-radius) !important;
    font-size: .95rem;
    min-height: 40px; /* keep good tap target while smaller visually */
    line-height: 1.2;
  }

  /* Hero CTA rows: keep compact look */
  .hero-ctas .btn,
  .hero-ctas .ph-btn,
  .hero-ctas .hp-btn{
    padding: 10px 16px !important;
    border-radius: 10px !important;
    font-size: .95rem !important;
  }

  /* Startsidans hero (el-hero): gör knapparna ännu lite mindre */
  .el-hero .btn{
    padding: 8px 14px !important;
    font-size: .9rem !important;
    border-radius: 10px !important;
  }

  /* Håll hero-knappar på en rad med horisontell scroll vid behov */
  .hero-ctas{
    display: flex;
    flex-wrap: nowrap !important;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    gap: 10px;
    justify-content: flex-start;
    padding-bottom: 2px; /* lite luft mot ev. scrollbar */
    scroll-snap-type: x proximity;
  }
  .hero-ctas::-webkit-scrollbar{ display: none; }
  .hero-ctas{ scrollbar-width: none; }
  .hero-ctas .btn,
  .hero-ctas .ph-btn,
  .hero-ctas .hp-btn{ flex: 0 0 auto; white-space: nowrap; scroll-snap-align: start; }

  /* Frontsidans hero kan använda .btns-container – applicera samma mönster där */
  .el-hero .btns{
    display: flex;
    flex-wrap: nowrap !important;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    gap: 10px;
    justify-content: flex-start;
    padding-bottom: 2px;
    scroll-snap-type: x proximity;
  }
  .el-hero .btns::-webkit-scrollbar{ display: none; }
  .el-hero .btns{ scrollbar-width: none; }
  .el-hero .btns .btn{ flex: 0 0 auto; white-space: nowrap; scroll-snap-align: start; }

  /* Footer CTA pills inside footer template */
  footer.iw-footer .iw-btn{
    padding: 10px 14px !important;
    font-size: 14px !important;
    border-radius: 10px !important;
  }

  /* Header buttons that appear on mobile */
  .iw-actions .btn{
    --btn-pad-y: 10px;
    --btn-pad-x: 16px;
    font-size: .9rem;
    border-radius: 999px; /* keep capsule look where used */
  }

  /* Gutenberg block button wrapper: avoid full-width tall buttons unless intended */
  .wp-block-buttons .wp-block-button .wp-block-button__link{
    padding: 10px 16px !important;
    border-radius: 10px !important;
    font-size: .95rem !important;
    min-height: 40px;
  }

  /* Specific inline style from CTA partials (ensure smaller on mobile) */
  .ph-cta-offer .ph-cta-actions .ph-btn{
    padding: 10px 16px !important;
    border-radius: 10px !important;
    font-size: 14px !important;
  }
}


