/* Pak Photo Tools - Custom Styles & PWA App Aesthetics */

:root {
  --pak-green: #01411C;
  --pak-green-light: #0d6d33;
  --pak-green-dark: #002b12;
  --pak-accent: #22c55e;
  --pak-passport-blue: #0077b6;
  --bg-app: #f8fafc;
}

/* Smooth scrolling and native touch */
html {
  box-sizing: border-box;
  -webkit-text-size-adjust: 100%;
}

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

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  min-height: 100%;
  overflow-x: hidden;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-tap-highlight-color: transparent;
}

/* Allow text selection in inputs and notes */
input, textarea, p, span, h1, h2, h3, h4, h5, h6 {
  user-select: text;
  -webkit-user-select: text;
}

/* ========================================== */
/* 100% RESPONSIVE MOBILE & DESKTOP STYLES   */
/* Full-width edge-to-edge on mobile screens  */
/* Clean centered container on larger screens */
/* ========================================== */
body {
  background-color: var(--bg-app) !important;
}

.desktop-wrapper {
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  background-color: var(--bg-app);
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow-x: hidden;
}

.phone-frame {
  width: 100% !important;
  max-width: 680px !important;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  background-color: var(--bg-app);
  display: flex;
  flex-direction: column;
  position: relative;
  box-shadow: none !important;
  border: none !important;
  border-radius: 0 !important;
  overflow: visible !important;
}

.phone-notch,
.desktop-companion-sidebar {
  display: none !important;
}

#phone-content-area, main {
  width: 100% !important;
  max-width: 100% !important;
  flex: 1;
  padding-bottom: 96px !important;
  overflow-x: hidden;
}

.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  width: 100% !important;
  max-width: 680px !important;
  margin: 0 auto !important;
  z-index: 50;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid #e2e8f0;
  padding-bottom: env(safe-area-inset-bottom, 8px);
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
}

/* Active Bottom Nav Item */
.nav-btn {
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}
.nav-btn.active {
  color: var(--pak-green);
  font-weight: 700;
}
.nav-btn.active .nav-icon {
  transform: translateY(-2px) scale(1.1);
  color: var(--pak-green);
}
.nav-btn.active::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 24px;
  height: 3px;
  background-color: var(--pak-green);
  border-radius: 3px;
}

/* Passport Face Guide Oval Overlay */
.cropper-face-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 72%;
  height: 82%;
  border: 2px dashed rgba(255, 255, 255, 0.75);
  border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  pointer-events: none;
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.45);
  z-index: 10;
}

.cropper-eye-line {
  position: absolute;
  top: 42%;
  left: 10%;
  right: 10%;
  height: 1px;
  border-top: 1px dashed rgba(250, 204, 21, 0.8);
  pointer-events: none;
}

.cropper-chin-line {
  position: absolute;
  bottom: 8%;
  left: 20%;
  right: 20%;
  height: 1px;
  border-top: 1px dashed rgba(250, 204, 21, 0.8);
  pointer-events: none;
}

/* Ad Placements Styling */
.ad-slot {
  width: 100%;
  background: #f1f5f9;
  border: 1px dashed #cbd5e1;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #64748b;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin: 10px 0;
  transition: all 0.2s ease;
  overflow: hidden;
}

#ad-top {
  min-height: 52px;
}

#ad-middle {
  min-height: 90px;
}

#ad-bottom-sticky {
  position: relative;
  min-height: 50px;
  background: #ffffff;
  z-index: 30;
  margin: 10px 0;
  border-radius: 10px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

/* Pulse animation for active uploads */
@keyframes softPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.92; transform: scale(0.98); }
}

.btn-pulse {
  animation: softPulse 2.5s infinite ease-in-out;
}

/* Toast message animation */
.toast-slide {
  transform: translateY(0);
  opacity: 1;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.toast-hidden {
  transform: translateY(100%);
  opacity: 0;
  pointer-events: none;
}

/* Print Stylesheet for High Res Printing */
@media print {
  body * {
    visibility: hidden;
  }
  .print-container, .print-container * {
    visibility: visible;
  }
  .print-container {
    position: fixed;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    background: white !important;
  }
  .no-print {
    display: none !important;
  }
}
