/*
Theme Name: Wadirect
Theme URI: https://wadirect.com
Author: wadirect Team
Author URI: https://wadirect.com
Description: Production-ready SaaS WhatsApp Link & QR Code Generator Theme. Lightweight, AdSense-ready, SEO-optimized, and built to seamlessly integrate with the wadirect SaaS Core plugin.
Version: 1.0.1
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: wadirect
Tags: saas, whatsapp, link-generator, qr-code, adsense-ready, responsive, translation-ready
*/

/* CSS Reset & Variables */
:root {
  --wadirect-primary: #10b981;
  --wadirect-primary-hover: #059669;
  --wadirect-primary-light: #ecfdf5;
  --wadirect-dark: #0f172a;
  --wadirect-gray-50: #f8fafc;
  --wadirect-gray-100: #f1f5f9;
  --wadirect-gray-200: #e2e8f0;
  --wadirect-gray-600: #475569;
  --wadirect-gray-900: #0f172a;
  --wadirect-radius: 16px;
  --wadirect-font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
  font-family: var(--wadirect-font-sans);
  background-color: #ffffff;
  color: var(--wadirect-dark);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* Container responsive sizing */
.wadirect-container {
  width: 100%;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
  box-sizing: border-box;
}

@media (min-width: 640px) {
  .wadirect-container {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
}

/* STRICT LOGO SIZING & CONTROLS */
.wadirect-header .logo-container,
.wadirect-header .custom-logo-link,
.wadirect-header a.group {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  max-width: 145px;
  height: auto;
  text-decoration: none;
}

.wadirect-header .custom-logo,
.wadirect-header img.logo-img,
.wadirect-header svg.logo-icon {
  max-width: 140px;
  max-height: 40px;
  width: auto;
  height: auto;
  object-fit: contain;
}

.wadirect-header .w-10.h-10 {
  width: 2.5rem !important;
  height: 2.5rem !important;
  min-width: 2.5rem !important;
  min-height: 2.5rem !important;
  border-radius: 9999px !important;
}

.wadirect-header svg.w-6.h-6 {
  width: 1.5rem !important;
  height: 1.5rem !important;
}

@media (min-width: 768px) {
  .wadirect-header .logo-container,
  .wadirect-header .custom-logo-link,
  .wadirect-header a.group {
    max-width: 180px;
  }
  .wadirect-header .custom-logo,
  .wadirect-header img.logo-img {
    max-width: 175px;
    max-height: 48px;
  }
}

/* RESPONSIVE NAVIGATION BREAKPOINTS */
/* Mobile First: Hide Desktop Nav & Auth Buttons below 768px */
@media (max-width: 767px) {
  .wadirect-header nav.hidden.md\:flex,
  .wadirect-header div.hidden.md\:flex,
  .wadirect-header .desktop-nav,
  .wadirect-header .desktop-auth {
    display: none !important;
  }

  #wadirect-mobile-toggle {
    display: flex !important;
    align-items: center;
    justify-center;
    padding: 0.5rem;
    border-radius: 0.5rem;
    color: #334155;
    background: transparent;
    border: none;
    cursor: pointer;
  }

  #wadirect-mobile-menu {
    width: 100%;
    background-color: #ffffff;
    border-bottom: 1px solid #f1f5f9;
    padding: 1.25rem 1.5rem;
  }

  #wadirect-mobile-menu.hidden {
    display: none !important;
  }

  #wadirect-mobile-menu.block,
  #wadirect-mobile-menu.active {
    display: block !important;
  }
}

/* Desktop View (>=768px): Show Desktop Nav & Auth, Hide Hamburger Toggle & Drawer */
@media (min-width: 768px) {
  #wadirect-mobile-toggle,
  #wadirect-mobile-menu {
    display: none !important;
  }

  .wadirect-header nav.hidden.md\:flex,
  .wadirect-header div.hidden.md\:flex {
    display: flex !important;
  }
}

/* RESPONSIVE TYPOGRAPHY */
h1, .text-3xl.sm\:text-4xl.md\:text-5xl {
  font-size: clamp(1.85rem, 5vw, 3.25rem) !important;
  line-height: 1.25 !important;
  font-weight: 800 !important;
  letter-spacing: -0.02em !important;
}

h2, .text-3xl {
  font-size: clamp(1.5rem, 4vw, 2.25rem) !important;
  line-height: 1.3 !important;
  font-weight: 800 !important;
}

p, .text-base {
  font-size: clamp(0.875rem, 2vw, 1rem);
  line-height: 1.6;
}

/* FORM & BUTTON STANDALONE STYLING */
input[type="tel"],
input[type="text"],
select,
textarea {
  width: 100%;
  max-width: 100%;
  font-family: inherit;
  font-size: 1rem; /* Prevents mobile iOS auto-zoom */
  box-sizing: border-box;
}

button, .button {
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

/* AdSense Slot styling */
.wadirect-adsense-container {
  width: 100%;
  margin: 1.5rem 0;
  padding: 1rem;
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: var(--wadirect-radius);
  text-align: center;
}

.wadirect-adsense-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #94a3b8;
  margin-bottom: 0.5rem;
  display: block;
}

/* Modal Bottom Sheet on Mobile (<640px) */
@media (max-width: 640px) {
  .wadirect-modal-container {
    align-items: flex-end !important;
    padding: 0 !important;
  }
  .wadirect-modal-content {
    border-bottom-left-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
    border-top-left-radius: 24px !important;
    border-top-right-radius: 24px !important;
    width: 100% !important;
    max-width: 100% !important;
  }
}
