/* UTEC English public mobile polish v3.5.30
   1) Cleaner, centered hamburger button.
   2) Precise left/right alignment for "Lihat Detail & Booking" buttons.
   Loaded last so it intentionally overrides legacy mobile header/card rules. */

@media (max-width: 820px) {
  /* Mobile header hamburger — balanced 44x44 button with centered 22x2 lines. */
  body:not(.admin-body) .public-site-header .public-menu-button {
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    min-height: 44px !important;
    flex: 0 0 44px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 4px !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 1px solid #e1e9f4 !important;
    border-radius: 13px !important;
    color: #183a70 !important;
    background: #f5f8fd !important;
    box-shadow: 0 5px 14px rgba(25, 58, 112, .07) !important;
    line-height: 0 !important;
    transform: none !important;
    appearance: none;
    -webkit-appearance: none;
  }

  body:not(.admin-body) .public-site-header .public-menu-button span {
    display: block !important;
    width: 22px !important;
    height: 2px !important;
    flex: 0 0 2px !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 999px !important;
    background: currentColor !important;
    opacity: 1;
    transform-origin: center;
    transition: transform .2s ease, opacity .16s ease, width .2s ease;
  }

  body:not(.admin-body) .public-site-header .public-menu-button:hover,
  body:not(.admin-body) .public-site-header .public-menu-button:focus-visible {
    background: #edf4ff !important;
    border-color: #cdddf4 !important;
    box-shadow: 0 7px 18px rgba(25, 58, 112, .10) !important;
    outline: none !important;
  }

  /* When drawer is open, morph the hamburger into a clean X. */
  body.public-menu-open:not(.admin-body) .public-site-header .public-menu-button span:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
  }
  body.public-menu-open:not(.admin-body) .public-site-header .public-menu-button span:nth-child(2) {
    opacity: 0;
    width: 14px !important;
  }
  body.public-menu-open:not(.admin-body) .public-site-header .public-menu-button span:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
  }

  /* Booking CTA — width:auto is critical because .btn-block sets width:100%.
     With absolute left/right positioning, width:100% caused the right edge to overflow. */
  body:not(.admin-body) .public-premium-class-grid .public-class-card {
    padding-bottom: 68px !important;
  }

  body:not(.admin-body) .public-premium-class-grid .public-detail-action,
  body:not(.admin-body) .public-premium-class-grid .btn-block.public-detail-action {
    position: absolute !important;
    left: 12px !important;
    right: 12px !important;
    bottom: 12px !important;
    width: auto !important;
    max-width: none !important;
    min-width: 0 !important;
    min-height: 44px !important;
    margin: 0 !important;
    padding: 0 16px !important;
    box-sizing: border-box !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 12px !important;
    border-radius: 14px !important;
    line-height: 1.2 !important;
    overflow: hidden !important;
  }

  body:not(.admin-body) .public-premium-class-grid .public-detail-action > span {
    flex: 0 0 auto;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 18px;
    margin-left: auto !important;
    line-height: 1 !important;
    text-align: center !important;
  }
}

@media (max-width: 420px) {
  body:not(.admin-body) .public-site-header .public-menu-button {
    width: 42px !important;
    height: 42px !important;
    min-width: 42px !important;
    min-height: 42px !important;
    flex-basis: 42px !important;
    border-radius: 12px !important;
  }

  body:not(.admin-body) .public-site-header .public-menu-button span {
    width: 21px !important;
  }

  body:not(.admin-body) .public-premium-class-grid .public-detail-action,
  body:not(.admin-body) .public-premium-class-grid .btn-block.public-detail-action {
    left: 11px !important;
    right: 11px !important;
    bottom: 11px !important;
    min-height: 43px !important;
    padding-inline: 15px !important;
    border-radius: 13px !important;
  }
}
