/* ==========================================================================
   Sticky Bottom Bar: Policy Notice (Desktop & Mobile) + Download App Button (Mobile only)
   ========================================================================== */

.sticky-bottom-bar,
.mobile-sticky-bottom {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 1035;
  display: flex;
  flex-direction: column;
  pointer-events: none;
}

/* Enable pointer events on interactive children */
.sticky-bottom-bar .policy-notice,
.sticky-bottom-bar .mobile-policy-notice,
.sticky-bottom-bar .mobile-download-btn {
  pointer-events: auto;
}

/* Hide when mobile offcanvas drawer is open */
body.mobile-nav-open .sticky-bottom-bar,
body.mobile-nav-open .mobile-sticky-bottom {
  display: none !important;
}

/* ==========================================================================
   1. Policy Notice Banner (Both Desktop and Mobile)
   ========================================================================== */
.policy-notice,
.mobile-policy-notice {
  position: relative;
  background-color: #e9ebed;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.06);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1),
              opacity 0.25s ease,
              padding 0.3s ease,
              transform 0.25s ease;
  max-height: 260px;
  opacity: 1;
  overflow: hidden;
  box-sizing: border-box;
}

.policy-notice.is-closing,
.mobile-policy-notice.is-closing {
  max-height: 0 !important;
  opacity: 0 !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  transform: translateY(8px);
  pointer-events: none;
}

.policy-notice-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 12px 24px;
}

.policy-notice-content {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 12px;
}

.policy-notice-text {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: #2b2b2b;
  font-weight: 400;
  letter-spacing: -0.01em;
}

.policy-notice-link {
  display: inline-block;
  font-size: 14px;
  line-height: 1.5;
  color: #015ba7;
  text-decoration: underline;
  text-underline-offset: 2px;
  font-weight: 600;
  white-space: nowrap;
  transition: color 0.15s ease;
}

.policy-notice-link:hover,
.policy-notice-link:focus {
  color: #003e73;
  text-decoration: underline;
}

/* Close button - Cyan square with white X */
.policy-notice-close {
  flex: 0 0 30px;
  width: 30px;
  height: 30px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #009fe3;
  border: none;
  border-radius: 2px;
  cursor: pointer;
  color: #ffffff;
  transition: background-color 0.15s ease, transform 0.15s ease;
  outline: none;
}

.policy-notice-close:hover,
.policy-notice-close:focus {
  background-color: #0088c4;
}

.policy-notice-close:active {
  transform: scale(0.92);
}

.policy-notice-close svg {
  width: 13px;
  height: 13px;
  display: block;
}

/* ==========================================================================
   2. Download App Button (Mobile Only)
   ========================================================================== */
.mobile-download-btn {
  display: none; /* Hidden on desktop */
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 48px;
  padding: 12px 16px;
  padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  background-color: #005baa;
  color: #ffffff !important;
  text-decoration: none !important;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 15.5px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.15px;
  text-align: center;
  border: none;
  cursor: pointer;
  transition: background-color 0.15s ease, opacity 0.15s ease;
  box-sizing: border-box;
}

.mobile-download-btn:hover,
.mobile-download-btn:focus {
  background-color: #004e92;
  color: #ffffff !important;
}

.mobile-download-btn:active {
  background-color: #00437e;
}

.mobile-download-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.mobile-download-icon svg {
  width: 19px;
  height: 19px;
  display: block;
}

/* ==========================================================================
   3. Responsive Rules for Mobile / Tablet (< 992px)
   ========================================================================== */
@media (max-width: 991.98px) {
  /* Show download button on mobile */
  .mobile-download-btn {
    display: flex;
  }

  /* Notice layout on mobile matches original design */
  .policy-notice,
  .mobile-policy-notice {
    padding: 0;
  }

  .policy-notice-inner {
    display: block;
    position: relative;
    padding: 14px 44px 14px 16px;
  }

  .policy-notice-content {
    display: block;
  }

  .policy-notice-text {
    font-size: 13.5px;
    line-height: 1.45;
  }

  .policy-notice-link {
    font-size: 13.5px;
    margin-top: 5px;
  }

  .policy-notice-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 28px;
    height: 28px;
  }

  /* Hide QR code on mobile as requested */
  .float-qr {
    display: none !important;
  }

  /* Adjust floating contact on mobile */
  .floating-contact {
    width: auto !important;
    right: 16px;
    bottom: calc(64px + env(safe-area-inset-bottom, 0px)) !important;
  }

  body {
    padding-bottom: calc(52px + env(safe-area-inset-bottom, 0px));
  }
}

@media (max-width: 479.98px) {
  .floating-contact {
    right: 12px;
    bottom: calc(58px + env(safe-area-inset-bottom, 0px)) !important;
  }
}
