/*
Theme Name: Fiixly
Theme URI: https://fiixly.in
Author: Fiixly Team
Author URI: https://fiixly.in
Description: Premium hyperlocal service marketplace. Book trusted professionals instantly.
Version: 1.0.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: fiixly
Tags: mobile-first, service-marketplace, booking, premium
*/

/* Design Tokens */
:root {
  --primary: #00D166;
  --primary-light: #6FFFB0;
  --primary-dark: #00B358;
  --primary-subtle: rgba(0, 209, 102, 0.08);
  --primary-glow: rgba(0, 209, 102, 0.25);
  --dark: #0F172A;
  --text: #1E293B;
  --text-2: #475569;
  --text-3: #94A3B8;
  --bg: #FFFFFF;
  --bg-2: #F8FAFC;
  --bg-3: #F1F5F9;
  --border: #E2E8F0;
  --border-light: #F1F5F9;
  --star: #F59E0B;
  --error: #EF4444;
  --warning: #F59E0B;
  --info: #3B82F6;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --r-sm: 12px;
  --r-md: 16px;
  --r-lg: 20px;
  --r-xl: 24px;
  --r-2xl: 32px;
  --r-full: 9999px;
  --shadow-xs: 0 1px 2px rgba(0,0,0,0.05);
  --shadow-sm: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1);
  --shadow-md: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1);
  --shadow-lg: 0 20px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.1);
  --shadow-xl: 0 25px 50px -12px rgba(0,0,0,0.25);
  --shadow-btn: 0 8px 24px rgba(0, 209, 102, 0.25);
  --glass: rgba(255, 255, 255, 0.8);
  --glass-blur: blur(16px);
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --header-h: 72px;
  --nav-h: 72px;
  --max-w: 1280px;
  --safe-b: env(safe-area-inset-bottom, 0px);
}

.glass {
  background: var(--glass);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

*,*::before,*::after{margin:0;padding:0;box-sizing:border-box}
html{font-size:16px;-webkit-text-size-adjust:100%;-webkit-font-smoothing:antialiased;scroll-behavior:smooth}
body{font-family:var(--font);font-size:.9375rem;font-weight:400;line-height:1.6;color:var(--text);background:var(--bg);min-height:100dvh;overflow-x:hidden}
a{color:inherit;text-decoration:none}
img{max-width:100%;height:auto;display:block}
button{font-family:inherit;cursor:pointer;border:none;background:none}
input,select,textarea{font-family:inherit;font-size:inherit;border:none;outline:none;background:none}
ul,ol{list-style:none}
h1,h2,h3,h4,h5,h6{font-weight:700;line-height:1.2;color:var(--dark)}
h1{font-size:2.5rem;letter-spacing:-.03em}
h2{font-size:1.875rem;letter-spacing:-.02em}
h3{font-size:1.375rem}
h4{font-size:1.125rem}
p{color:var(--text-2);line-height:1.7}
.container{width:100%;max-width:var(--max-w);margin:0 auto;padding:0 20px}
@media(min-width:768px){.container{padding:0 40px}}
@media(min-width:1024px){.container{padding:0 60px}}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}

/* ==========================================================================
   MOBILE RESPONSIVENESS PATCHES (Targeting <= 768px and <= 480px)
   ========================================================================== */

/* --- TABLET & MOBILE GLOBAL FIXES (max-width: 768px) --- */
@media (max-width: 768px) {
  /* Prevent horizontal screen leakage */
  html, body {
    overflow-x: hidden !important;
    width: 100vw;
  }
  
  /* Issue 3: Helpers Near You horizontal overflow containment */
  .helpers-scroll {
    max-width: 100vw !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    display: flex !important;
    gap: 16px !important;
  }

  /* Issue 6: Footer 4-column layout stack */
  .footer-grid {
    grid-template-columns: 1fr !important;
    gap: 20px !important;
    text-align: left !important;
  }
  .footer-brand, .footer-links {
    width: 100% !important;
    text-align: left !important;
  }

  /* Issue 11: Image + Text Columns stacking */
  .about-grid, .contact-grid {
    grid-template-columns: 1fr !important;
    gap: 32px !important;
  }
  /* Stacking Elementor rows vertically and letting column-reverse work */
  .elementor-column {
    width: 100% !important;
  }
  .stack-reverse-mobile,
  .elementor-row.stack-reverse,
  .elementor-container.stack-reverse {
    flex-direction: column-reverse !important;
    display: flex !important;
  }
}

/* --- MOBILE SPECIFIC FIXES (max-width: 480px) --- */
@media (max-width: 480px) {
  /* Issue 1: Hero Section text & CTA buttons overlap */
  .hero {
    padding: 60px 0 40px !important;
  }
  .hero-inner {
    gap: 24px !important;
    grid-template-columns: 1fr !important;
  }
  .hero-content {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    text-align: left !important;
    padding: 0 20px !important;
  }
  .hero-title {
    font-size: 2.25rem !important;
    line-height: 1.25 !important;
    margin-bottom: 16px !important;
  }
  .hero-subtitle {
    font-size: 0.95rem !important;
    line-height: 1.5 !important;
    margin-bottom: 24px !important;
  }
  .hero-actions {
    flex-direction: column !important;
    align-items: stretch !important;
    width: 100% !important;
    gap: 12px !important;
  }
  .hero-actions .btn {
    width: 100% !important;
    text-align: center !important;
    justify-content: center !important;
    padding: 14px 20px !important;
  }

  /* Issue 2: Service category grid (16 icons) to 2-column */
  .cat-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
    padding: 0 10px !important;
  }
  .cat-card {
    padding: 16px 8px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
  .cat-icon {
    width: 48px !important;
    height: 48px !important;
    font-size: 24px !important;
  }
  .cat-name {
    font-size: 0.75rem !important;
    white-space: normal !important;
  }

  /* Issue 4: Become a Fiixly Pro banner text & padding */
  .promo-banner {
    padding: 20px !important;
    margin: 0 10px !important;
    border-radius: var(--r-xl) !important;
  }
  .promo-banner h3 {
    font-size: 1.2rem !important;
    line-height: 1.3 !important;
  }
  .promo-banner p {
    font-size: 0.8125rem !important;
    line-height: 1.5 !important;
    margin-bottom: 16px !important;
  }
  .promo-banner .btn {
    width: 100% !important;
    padding: 12px 16px !important;
    font-size: 0.875rem !important;
    text-align: center !important;
    justify-content: center !important;
  }

  /* Issue 5: Stats counter row stacking and alignment */
  .stats-bar {
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 20px !important;
    margin-top: 24px !important;
  }
  .stat-item {
    width: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
  }
  .stat-value {
    font-size: 1.75rem !important;
  }
  .stat-label {
    font-size: 0.8125rem !important;
  }

  /* Issue 7: Bottom navigation bar alignment & touch target */
  .bottom-nav {
    display: flex !important;
    height: 64px !important;
    padding-bottom: env(safe-area-inset-bottom, 0px) !important;
    align-items: stretch !important;
  }
  .bnav-item {
    flex: 1 !important;
    width: 25% !important;
    height: 100% !important;
    min-height: 48px !important;
    display: inline-flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 4px !important;
    padding: 6px 0 !important;
  }
  .bnav-item .material-icons-round {
    font-size: 22px !important;
  }
  .bnav-item span {
    font-size: 0.6875rem !important;
    line-height: 1 !important;
  }

  /* Issue 8: Customer/Professional toggle buttons full width */
  .role-selector-wrap {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  .role-pill {
    padding: 12px 10px !important;
    font-size: 0.875rem !important;
  }

  /* Issue 9: Form fields 100% width and horizontal padding */
  .auth-form-panel {
    padding: 30px 16px !important;
  }
  .auth-form-inner, .auth-form, .input-group, .input-wrapper {
    width: 100% !important;
  }
  .input-field-icon {
    width: 100% !important;
    padding-left: 40px !important;
    padding-right: 12px !important;
    font-size: 0.875rem !important;
    box-sizing: border-box !important;
  }
  .input-field {
    width: 100% !important;
    padding-left: 12px !important;
    padding-right: 12px !important;
    font-size: 0.875rem !important;
    box-sizing: border-box !important;
  }
  /* Force 2-column grids inside forms to stack */
  form div[style*="grid-template-columns:1fr 1fr"],
  form div[style*="grid-template-columns: 1fr 1fr"] {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }

  /* Issue 10: Category filter tabs/chips horizontal scroll */
  .cat-pills-wrap {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    padding: 12px 16px !important;
    margin: 0 -20px !important;
    width: auto !important;
    scrollbar-width: none !important;
  }
  .cat-pills-wrap::-webkit-scrollbar {
    display: none !important;
  }
  .cat-pill {
    flex-shrink: 0 !important;
    white-space: nowrap !important;
    padding: 8px 16px !important;
    font-size: 0.8125rem !important;
  }
}

/* ==========================================================================
   GLOBAL RESPONSIVENESS ENHANCEMENTS (Every Page & Screen Size)
   ========================================================================== */

/* --- TABLET/MOBILE INTERMEDIATE BREAKPOINTS (max-width: 1024px) --- */
@media (max-width: 1023px) {
  /* Prevent header nav items colliding with logo/actions on intermediate screens */
  .header-nav {
    display: none !important;
  }
  .menu-toggle {
    display: flex !important;
  }
  .header-actions .btn {
    display: none !important; /* Hide desktop auth buttons on header for clean mobile/tablet layout */
  }
}

/* --- TABLET & MOBILE GLOBAL CONTENT RESPONSIVENESS (max-width: 768px) --- */
@media (max-width: 768px) {
  /* Prevent table overflow globally across all dashboards, bookings, etc. */
  .table-responsive, 
  .responsive-table-wrapper, 
  .dash-panel-card table, 
  .vendor-dashboard table,
  table:not(.ui-datepicker-calendar) {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    box-sizing: border-box !important;
  }
  
  /* Stacking 2-column form grids (like edit profile details) */
  .form-grid.two-cols, 
  .grid-two-cols, 
  .two-columns-form {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }

  /* Make sure inputs and select containers take full width */
  .input-group, .input-wrapper, select, input, textarea {
    max-width: 100% !important;
  }
}

/* --- MOBILE SPECIFIC ENHANCEMENTS (max-width: 480px) --- */
@media (max-width: 480px) {
  /* Vendor registration steps and grid responsiveness */
  .steps-indicator-container {
    max-width: 100% !important;
    padding: 0 10px !important;
  }
  .service-areas-grid {
    grid-template-columns: 1fr !important; /* Single column stack for mobile checklist */
    max-height: 220px !important;
  }
  .form-controls {
    flex-direction: column-reverse !important;
    gap: 12px !important;
    width: 100% !important;
  }
  .form-controls .btn {
    width: 100% !important;
    justify-content: center !important;
  }
  
  /* Align reviews card header nicely on small screens */
  .review-header {
    flex-direction: row !important;
    align-items: center !important;
    gap: 10px !important;
  }
  
  /* General container padding tweaks */
  .container {
    padding: 0 16px !important;
  }
}



/* ==========================================================================
   WHATSAPP CUSTOM INTEGRATION (Contact Page + Floating Button)
   ========================================================================== */

/* WhatsApp Button on Contact Page */
.whatsapp-btn-contact {
  background-color: #25D366;
  color: #FFFFFF !important;
  border-radius: 8px;
  min-height: 48px;
  font-size: 15px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  padding: 0 24px;
  text-decoration: none;
  transition: transform 0.2s, background-color 0.2s;
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.2);
  width: 100%;
  max-width: 280px;
}
.whatsapp-btn-contact:hover {
  background-color: #1fc157;
  transform: translateY(-1px);
}

/* WhatsApp Floating Button */
.whatsapp-floating-btn {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 56px;
  height: 56px;
  background-color: #25D366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
  transition: transform 0.2s ease;
  text-decoration: none;
}
.whatsapp-floating-btn:hover {
  transform: scale(1.05);
}

@media (max-width: 767px) {
  /* Prevent overlap with fixed mobile bottom nav (72px bottom nav + 16px offset) */
  .whatsapp-floating-btn {
    bottom: 88px;
    right: 16px;
    width: 52px;
    height: 52px;
  }
  .whatsapp-floating-btn svg {
    width: 26px;
    height: 26px;
  }
  .whatsapp-btn-contact {
    max-width: 100%;
    width: 100%;
  }
}
