/*
Theme Name: BeMyCourier
Theme URI: https://bmc.ropstam.dev
Author: BeMyCourier Team
Author URI: https://bmc.ropstam.dev
Description: Modern, boarding-pass styled WordPress theme for BeMyCourier peer-to-peer delivery platform.
Version: 1.3.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: bemycourier
Tags: custom-colors, custom-menu, featured-images, responsive-layout, block-patterns

BeMyCourier WordPress Theme - Enhanced Design System & High-Fidelity Styles
*/

/* ==========================================================================
   1. Header Dynamic Transparency & Blurred Sticky Effect
   ========================================================================== */

#site-header {
  transition: background-color 0.25s ease, box-shadow 0.25s ease, backdrop-filter 0.25s ease !important;
}

/* Header is 100% transparent at top of page */
#site-header:not(.is-scrolled):not(.is-open) {
  background-color: transparent !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

/* Header adds frosted glass blur only when scrolled or mobile menu open */
#site-header.is-scrolled,
#site-header.is-open {
  background-color: oklch(0.986 0.006 230 / 0.88) !important;
  box-shadow: var(--shadow-soft) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
}

/* ==========================================================================
   2. Complete Button System (Matches Lovable & shadcn/ui buttonVariants)
   ========================================================================== */

.btn,
a.btn,
button.btn,
.wp-block-button__link {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0.5rem !important;
  white-space: nowrap !important;
  border-radius: 9999px !important;
  font-family: var(--font-sans, "Manrope", ui-sans-serif, system-ui, sans-serif) !important;
  font-size: 0.875rem !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
  text-decoration: none !important;
  line-height: 1.25 !important;
  box-sizing: border-box !important;
  height: 2.75rem !important; /* Default 44px height */
  padding: 0 1.5rem !important; /* Default 24px horizontal padding */
  border: 1px solid transparent;
  outline: none;
}

.btn:focus-visible {
  outline: 2px solid transparent !important;
  outline-offset: 2px !important;
  box-shadow: 0 0 0 2px var(--background), 0 0 0 4px var(--ring) !important;
}

.btn:disabled,
.btn[aria-disabled="true"] {
  pointer-events: none !important;
  opacity: 0.5 !important;
  cursor: not-allowed !important;
}

.btn svg,
a.btn svg,
button.btn svg {
  pointer-events: none;
  width: 1rem !important;
  height: 1rem !important;
  flex-shrink: 0;
  stroke-width: 2.25;
}

/* Button Variants */
.btn-primary,
.btn-default,
.btn:not([class*="btn-"]) {
  background-color: var(--primary) !important;
  color: var(--primary-foreground) !important;
  box-shadow: 0 1px 2px oklch(0.22 0.045 252 / 0.06), 0 8px 24px -12px oklch(0.22 0.045 252 / 0.18) !important;
  border-color: transparent !important;
}

.btn-primary:hover,
.btn-default:hover,
.btn:not([class*="btn-"]):hover {
  background-color: color-mix(in oklch, var(--primary) 88%, black) !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 4px 12px oklch(0.62 0.155 240 / 0.3) !important;
}

.btn-parcel {
  background-image: var(--gradient-parcel, linear-gradient(135deg, var(--amber, #F6C446) 0%, var(--amber-deep, #EF973E) 100%)) !important;
  color: var(--amber-foreground, #3E2405) !important;
  box-shadow: 0 12px 30px -10px oklch(0.76 0.15 62 / 0.55) !important;
  border-color: transparent !important;
}

.btn-parcel:hover {
  transform: translateY(-2px) !important;
  filter: brightness(1.06) !important;
  box-shadow: 0 16px 36px -8px oklch(0.76 0.15 62 / 0.65) !important;
}

.btn-ink {
  background-color: var(--ink, #0E1626) !important;
  color: var(--ink-foreground, #F4F7FC) !important;
  border-color: transparent !important;
}

.btn-ink:hover {
  background-color: color-mix(in oklch, var(--ink) 88%, black) !important;
  transform: translateY(-2px) !important;
}

.btn-on-dark,
.btn-onDark {
  background-color: color-mix(in oklch, var(--ink-foreground) 12%, transparent) !important;
  color: var(--ink-foreground, #F4F7FC) !important;
  border: 1px solid color-mix(in oklch, var(--ink-foreground) 25%, transparent) !important;
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
}

.btn-on-dark:hover,
.btn-onDark:hover {
  background-color: color-mix(in oklch, var(--ink-foreground) 22%, transparent) !important;
  transform: translateY(-2px) !important;
}

.btn-outline {
  border: 1px solid var(--border, #E2E8F0) !important;
  background-color: var(--card, #FFFFFF) !important;
  color: var(--foreground, #1E293B) !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05) !important;
}

.btn-outline:hover {
  border-color: color-mix(in oklch, var(--primary) 65%, transparent) !important;
  color: var(--primary) !important;
  background-color: var(--card, #FFFFFF) !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 6px 18px oklch(0.62 0.155 240 / 0.15) !important;
}

.btn-secondary {
  background-color: var(--secondary, #F1F5F9) !important;
  color: var(--secondary-foreground, #0F172A) !important;
  border-color: transparent !important;
}

.btn-secondary:hover {
  background-color: color-mix(in oklch, var(--secondary) 85%, black) !important;
}

.btn-ghost {
  background-color: transparent !important;
  color: inherit !important;
  border-color: transparent !important;
}

.btn-ghost:hover {
  background-color: var(--secondary, #F1F5F9) !important;
  color: var(--secondary-foreground, #0F172A) !important;
}

/* Button Sizing Modifiers */
.btn-sm {
  height: 2.25rem !important; /* 36px */
  padding-left: 1rem !important;
  padding-right: 1rem !important;
  font-size: 0.75rem !important;
}

.btn-md,
.btn-default-size {
  height: 2.75rem !important; /* 44px */
  padding-left: 1.5rem !important;
  padding-right: 1.5rem !important;
  font-size: 0.875rem !important;
}

.btn-lg {
  height: 3.25rem !important; /* 52px */
  padding-left: 2rem !important;
  padding-right: 2rem !important;
  font-size: 1rem !important;
}

/* ==========================================================================
   3. Responsive 1440px Proportional Balance (Matches 1920px Optical Scale)
   ========================================================================== */

@media (min-width: 1280px) and (max-width: 1599px) {
  .container-site {
    max-width: 78rem !important; /* 1248px - preserves elegant 96px side margins on 1440px */
    padding-inline: 2rem !important;
  }

  /* Scale headline sizes proportionally so they never appear zoomed-in */
  h1.text-5xl,
  h1.md\:text-6xl,
  h1.lg\:text-7xl,
  .text-5xl.md\:text-6xl.lg\:text-7xl,
  .text-5xl.md\:text-7xl {
    font-size: 3.35rem !important; /* ~54px - matches 72px proportion on 1920px */
    line-height: 1.05 !important;
    letter-spacing: -0.03em !important;
  }

  h2.text-3xl,
  h2.md\:text-5xl,
  .text-3xl.md\:text-5xl,
  .text-4xl.md\:text-5xl {
    font-size: 2.25rem !important; /* ~36px */
    line-height: 1.15 !important;
  }

  /* Subtitles & Descriptions */
  .container-site p.text-lg,
  .container-site p.text-xl {
    font-size: 1.05rem !important;
    line-height: 1.6 !important;
  }

  /* Prevent hero visual image and card photos from ballooning */
  .aspect-\[4\/3\],
  .bmc-img-edit-wrap {
    max-height: 420px !important;
    object-fit: cover !important;
  }

  /* Balanced grid gaps */
  .grid.gap-12,
  .grid.gap-14 {
    gap: 2.5rem !important;
  }
}

@media (min-width: 1600px) {
  .container-site {
    max-width: 80rem !important; /* 1280px */
    padding-inline: 2rem !important;
  }
}

/* ==========================================================================
   4. How It Works Journey Timeline - Alternating Step Cards
   ========================================================================== */

@media (min-width: 768px) {
  .bmc-timeline-step-even {
    grid-column-start: 2 !important;
    margin-left: 3rem !important;
    margin-right: 0 !important;
  }
  .bmc-timeline-step-odd {
    grid-column-start: 1 !important;
    margin-right: 3rem !important;
    margin-left: 0 !important;
  }
}

/* ==========================================================================
   5. Boarding Pass Card & Notched Corners
   ========================================================================== */

.ticket {
  --notch: 14px;
  --tear: 62%;
  -webkit-mask:
    radial-gradient(circle var(--notch) at 0 var(--tear), transparent 98%, #000) left / 51% 100% no-repeat,
    radial-gradient(circle var(--notch) at 100% var(--tear), transparent 98%, #000) right / 51% 100% no-repeat;
  mask:
    radial-gradient(circle var(--notch) at 0 var(--tear), transparent 98%, #000) left / 51% 100% no-repeat,
    radial-gradient(circle var(--notch) at 100% var(--tear), transparent 98%, #000) right / 51% 100% no-repeat;
}

.tear-line {
  background-image: linear-gradient(90deg, var(--border, #E2E8F0) 50%, transparent 50%);
  background-size: 12px 2px;
  background-repeat: repeat-x;
  height: 2px;
}

.route-dash {
  background-image: linear-gradient(90deg, currentColor 50%, transparent 50%);
  background-size: 10px 2px;
  background-repeat: repeat-x;
  height: 2px;
}

/* Clouds drifting animation */
@keyframes drift {
  0% { transform: translateX(0); }
  50% { transform: translateX(30px); }
  100% { transform: translateX(0); }
}

.animate-drift {
  animation: drift 60s ease-in-out infinite;
}


/* ==========================================================================
   6. Legal / Document Prose Styles (.prose-legal)
   ========================================================================== */

.prose-legal {
  max-width: 100%;
}

.prose-legal h2 {
  font-family: var(--font-display, "Bricolage Grotesque", sans-serif) !important;
  font-size: 1.5rem !important;
  font-weight: 700 !important;
  margin-top: 2.5rem !important;
  margin-bottom: 0.75rem !important;
  color: var(--foreground) !important;
  line-height: 1.3 !important;
}

.prose-legal p,
.prose-legal li {
  color: var(--muted-foreground) !important;
  line-height: 1.75 !important;
  font-size: 1rem !important;
}

.prose-legal p + p {
  margin-top: 1rem !important;
}

.prose-legal ul,
.prose-legal ol {
  list-style: disc !important;
  padding-left: 1.5rem !important;
  margin-block: 1rem !important;
}

.prose-legal ol {
  list-style: decimal !important;
}

.prose-legal li + li {
  margin-top: 0.5rem !important;
}

.prose-legal a {
  color: var(--primary) !important;
  text-decoration: underline !important;
  text-underline-offset: 4px !important;
  font-weight: 600 !important;
}

/* On pages without sky hero banner, ensure sticky header has clean frosted glass */
body:not(:has(.bg-sky-gradient)) #site-header:not(.is-scrolled):not(.is-open) {
  background-color: oklch(0.986 0.006 230 / 0.95) !important;
  border-bottom: 1px solid var(--border) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
}

/* ==========================================================================
   Comparison Table Desktop & Mobile Responsive
   ========================================================================== */
.bmc-comparison-card {
  width: 100%;
}
.bmc-comparison-row {
  display: grid !important;
  grid-template-columns: 1fr 6rem 6rem !important;
  column-gap: 1.5rem !important;
  align-items: center !important;
  padding: 1rem 1.5rem !important;
}
.bmc-col-bmc,
.bmc-col-courier {
  width: 6rem !important;
  text-align: center !important;
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
}
.bmc-row-text {
  word-break: normal;
  hyphens: manual;
  overflow-wrap: break-word;
  padding-right: 1rem;
}

@media (max-width: 640px) {
  .bmc-comparison-row {
    grid-template-columns: 1fr 4.5rem 3.75rem !important;
    column-gap: 0.75rem !important;
    padding: 0.875rem 1rem !important;
  }
  .bmc-col-bmc {
    width: 4.5rem !important;
    font-size: 0.6875rem !important;
    letter-spacing: 0.01em !important;
  }
  .bmc-col-courier {
    width: 3.75rem !important;
    font-size: 0.6875rem !important;
    letter-spacing: 0.01em !important;
  }
  .bmc-row-text {
    font-size: 0.8125rem !important;
    line-height: 1.35 !important;
    padding-right: 0.25rem;
  }
}

/* ==========================================================================
   Contact Form Topic Pills & Interactive Elements
   ========================================================================== */
.bmc-topic-btn {
  border: 1px solid var(--border) !important;
  background-color: var(--card) !important;
  color: var(--foreground) !important;
  border-radius: 9999px !important;
  padding: 0.5rem 1rem !important;
  font-size: 0.875rem !important;
  font-weight: 600 !important;
  line-height: 1.25rem !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05) !important;
  outline: none !important;
  user-select: none !important;
  -webkit-tap-highlight-color: transparent !important;
}
.bmc-topic-btn:hover {
  border-color: var(--primary) !important;
}
.bmc-topic-btn.is-active {
  border-color: var(--primary) !important;
  background-color: var(--primary) !important;
  color: var(--primary-foreground) !important;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1) !important;
}

/* ==========================================================================
   Mobile Navigation Drawer & Toggle
   ========================================================================== */
#mobile-menu-toggle {
  cursor: pointer !important;
  touch-action: manipulation !important;
  -webkit-tap-highlight-color: transparent !important;
}
#mobile-menu {
  background-color: #ffffff !important;
  background-color: var(--card) !important;
  color: var(--foreground) !important;
  border-top: 1px solid var(--border) !important;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1) !important;
}
#mobile-menu a:not(.btn) {
  display: block !important;
  color: var(--foreground) !important;
  transition: background-color 0.15s ease, color 0.15s ease !important;
}
#mobile-menu a:not(.btn):hover,
#mobile-menu a:not(.btn):focus {
  background-color: var(--secondary) !important;
  color: var(--primary) !important;
}
