/* syntwa - Enterprise WhatsApp Cloud API Platform */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600;700&display=swap');

:root {
  --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --color-brand: #075E54;
  --color-wa-green: #25D366;
  --color-wa-bubble: #E7FFDB;
  --color-wa-bg: #EFEAE2;
  font-family: var(--font-sans);
  color-scheme: light;
}

body {
  background-color: #F8FAFC;
  color: #0F172A;
  font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11';
}

code,
pre,
.font-mono {
  font-family: var(--font-mono);
}

/* Custom Clean Scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: #F1F5F9;
}

::-webkit-scrollbar-thumb {
  background: #CBD5E1;
  border-radius: 9999px;
}

::-webkit-scrollbar-thumb:hover {
  background: #94A3B8;
}

/* Clean Cards & Elevation */
.app-card {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 1rem;
  box-shadow: 0 1px 3px 0 rgba(15, 23, 42, 0.04), 0 1px 2px -1px rgba(15, 23, 42, 0.04);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.app-card-elevated {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 1.25rem;
  box-shadow: 0 4px 6px -1px rgba(15, 23, 42, 0.04), 0 2px 4px -2px rgba(15, 23, 42, 0.04);
}

.app-card-interactive {
  background: #FFFFFF;
  border: 1.5px solid #E2E8F0;
  border-radius: 1rem;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.app-card-interactive:hover {
  border-color: #CBD5E1;
  box-shadow: 0 10px 15px -3px rgba(15, 23, 42, 0.05), 0 4px 6px -4px rgba(15, 23, 42, 0.05);
  transform: translateY(-1px);
}

.app-card-interactive.selected {
  border-color: #059669;
  background-color: #F0FDF4;
  box-shadow: 0 0 0 1px #059669, 0 4px 12px rgba(5, 150, 105, 0.12);
}

/* WhatsApp Phone Mockup & Wallpaper */
.wa-mock-phone {
  background: #FFFFFF;
  border-radius: 2rem;
  border: 4px solid #1E293B;
  box-shadow: 0 20px 25px -5px rgba(15, 23, 42, 0.12), 0 8px 10px -6px rgba(15, 23, 42, 0.08);
  overflow: hidden;
}

.wa-mock-wallpaper {
  background-color: #EFEAE2;
  background-image:
    radial-gradient(#D5D8DC 1px, transparent 1px),
    radial-gradient(#D5D8DC 1px, #EFEAE2 1px);
  background-size: 20px 20px;
  background-position: 0 0, 10px 10px;
}

.wa-speech-bubble {
  background-color: #E7FFDB;
  color: #111B21;
  border-radius: 12px 12px 2px 12px;
  position: relative;
  box-shadow: 0 1px 1.5px rgba(11, 20, 26, 0.18);
}

.wa-speech-bubble::after {
  content: '';
  position: absolute;
  right: -8px;
  bottom: 0;
  width: 0;
  height: 0;
  border-left: 9px solid #E7FFDB;
  border-top: 9px solid transparent;
}

/* Variable Highlighter Badge in Preview */
.var-highlight {
  background-color: #DCFCE7;
  color: #166534;
  border: 1px solid #86EFAC;
  padding: 1px 5px;
  border-radius: 4px;
  font-weight: 600;
  font-family: var(--font-mono);
}

/* Pulse animation for active dispatching state */
@keyframes soft-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.5);
  }

  70% {
    box-shadow: 0 0 0 8px rgba(16, 185, 129, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
  }
}

.pulse-emerald {
  animation: soft-pulse 2s infinite;
}

/* Terminal Styling */
.terminal-window {
  background: #0B132B;
  border: 1px solid #1E293B;
  border-radius: 0.875rem;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.4);
}

/* Form Controls */
.form-input-custom {
  background-color: #FFFFFF;
  border: 1.5px solid #E2E8F0;
  border-radius: 0.75rem;
  color: #0F172A;
  font-size: 0.8125rem;
  padding: 0.625rem 0.875rem;
  transition: all 0.15s ease-in-out;
  min-height: 40px;
}

.form-input-custom:focus {
  outline: none;
  border-color: #059669;
  box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.12);
}

/* Buttons */
.btn-primary {
  background: linear-gradient(135deg, #059669 0%, #0D9488 100%);
  color: #FFFFFF;
  font-weight: 700;
  border-radius: 0.75rem;
  box-shadow: 0 4px 12px rgba(5, 150, 105, 0.25);
  transition: all 0.2s ease;
  min-height: 40px;
}

.btn-primary:hover:not(:disabled) {
  background: linear-gradient(135deg, #047857 0%, #0F766E 100%);
  box-shadow: 0 6px 16px rgba(5, 150, 105, 0.35);
  transform: translateY(-1px);
}

.btn-primary:active:not(:disabled) {
  transform: translateY(0);
}

/* Universal Touch Ergonomics & Mobile Readiness */
* {
  -webkit-tap-highlight-color: transparent;
}

button,
select,
input,
a,
[role="button"],
label[for] {
  touch-action: manipulation;
  user-select: none;
}

/* Tactile Active Feedback for Touch Devices */
@media (hover: none) and (pointer: coarse) {

  button:active,
  a:active,
  [role="button"]:active,
  .btn-primary:active {
    transform: scale(0.98) !important;
    transition: transform 0.08s ease;
  }
}

/* Prevent iOS Safari 16px Auto-Zoom on Input Focus */
@media (max-width: 768px) {

  input[type="text"],
  input[type="password"],
  input[type="search"],
  input[type="number"],
  input[type="tel"],
  input[type="email"],
  select,
  textarea {
    font-size: 16px !important;
  }

  /* Touch target guarantees on mobile viewports */
  .btn-touch {
    min-height: 46px;
  }

  .touch-target {
    min-width: 44px;
    min-height: 44px;
  }
}

/* Safe Area Inset Utilities for Modern Mobile Devices (iPhone notch / home indicator) */
.pb-safe {
  padding-bottom: max(0.75rem, env(safe-area-inset-bottom, 0.75rem));
}

.bottom-bar-safe {
  padding-bottom: max(0.5rem, env(safe-area-inset-bottom, 0.5rem));
}

/* Smooth Touch Scrolling with Momentum */
.scroll-touch {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
}

/* Horizontal Scroll Containers with Touch Momentum */
.responsive-table-container {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.responsive-table-container::-webkit-scrollbar {
  height: 4px;
}