/* =============================================================
   Pawa Search – Submit CSS v1.1
   Mobile-first, step-based form
   ============================================================= */

:root {
  --pws-primary:   #2563eb;
  --pws-primary-d: #1d4ed8;
  --pws-success:   #10b981;
  --pws-danger:    #ef4444;
  --pws-border:    #e5e7eb;
  --pws-radius:    12px;
  --pws-dark:      #111827;
  --pws-gray:      #6b7280;
  --pws-light:     #f9fafb;
  --pws-white:     #ffffff;
  --pws-transition:.2s ease;
  --pws-header-h:  60px;
}

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

body.pws-canvas-body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  background: var(--pws-light);
  color: var(--pws-dark);
  -webkit-tap-highlight-color: transparent;
}

.pws-app { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }

/* ============================================================
   HEADER
   ============================================================ */
.pws-header {
  background: var(--pws-primary);
  color: #fff;
  padding: 0 20px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,.18);
}
.pws-header-inner {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--pws-header-h);
}
.pws-logo { font-size: 19px; font-weight: 800; color: #fff; text-decoration: none; display: flex; align-items: center; gap: 8px; }
.pws-logo img { height: 30px; border-radius: 4px; }
.pws-nav { display: flex; gap: 4px; }
.pws-nav a {
  color: rgba(255,255,255,.85);
  text-decoration: none;
  padding: 7px 13px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  transition: background var(--pws-transition);
}
.pws-nav a:hover, .pws-nav a.active { background: rgba(255,255,255,.18); color: #fff; }

/* ============================================================
   PROGRESS STEPS
   ============================================================ */
.pws-progress-bar {
  background: var(--pws-white);
  border-bottom: 1px solid var(--pws-border);
  padding: 14px 20px;
  position: sticky;
  top: var(--pws-header-h);
  z-index: 90;
}
.pws-progress-inner {
  max-width: 820px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 0;
}
.pws-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  flex: 1;
  position: relative;
  cursor: default;
}
.pws-step:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 15px;
  left: 50%;
  width: 100%;
  height: 2px;
  background: var(--pws-border);
  z-index: 0;
}
.pws-step.done:not(:last-child)::after { background: var(--pws-primary); }
.pws-step-num {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--pws-border);
  color: var(--pws-gray);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  position: relative;
  z-index: 1;
  transition: background var(--pws-transition), color var(--pws-transition);
}
.pws-step.active .pws-step-num { background: var(--pws-primary); color: #fff; }
.pws-step.done .pws-step-num { background: var(--pws-success); color: #fff; }
.pws-step-label {
  font-size: 10px;
  font-weight: 600;
  color: var(--pws-gray);
  text-align: center;
  white-space: nowrap;
}
.pws-step.active .pws-step-label { color: var(--pws-primary); }
.pws-step.done .pws-step-label { color: var(--pws-success); }

/* ============================================================
   FORM WRAPPER
   ============================================================ */
.pws-submit-wrap { flex: 1; padding: 28px 20px 40px; }
.pws-submit-card {
  max-width: 820px;
  margin: 0 auto;
  background: var(--pws-white);
  border-radius: 16px;
  padding: 32px;
  box-shadow: 0 4px 24px rgba(0,0,0,.07);
}
.pws-submit-intro { margin-bottom: 28px; padding-bottom: 20px; border-bottom: 1px solid var(--pws-border); }
.pws-submit-intro h1 { font-size: 22px; font-weight: 800; margin-bottom: 6px; letter-spacing: -.3px; }
.pws-submit-intro p { font-size: 14px; color: var(--pws-gray); line-height: 1.6; }

/* ============================================================
   SECTIONS
   ============================================================ */
.pws-submit-section {
  margin-bottom: 28px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--pws-border);
}
.pws-submit-section:last-of-type { border-bottom: none; }
.pws-submit-section-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}
.pws-submit-section h2 {
  font-size: 16px;
  font-weight: 700;
  margin: 0;
  color: var(--pws-dark);
}
.pws-step-badge {
  width: 28px;
  height: 28px;
  background: var(--pws-primary);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
}

/* ============================================================
   FORM GRID
   ============================================================ */
.pws-submit-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.pws-col-2 { grid-column: span 2; }
.pws-col-1 { grid-column: span 1; }

/* ============================================================
   FORM GROUPS
   ============================================================ */
.pws-form-group { display: flex; flex-direction: column; gap: 5px; }
.pws-form-group label { font-size: 13px; font-weight: 600; color: #374151; }
.pws-form-group small { font-size: 12px; color: var(--pws-gray); margin-top: 2px; }
.pws-required { color: var(--pws-danger); }

.pws-form-group input,
.pws-form-group select,
.pws-form-group textarea {
  padding: 10px 14px;
  border: 1.5px solid var(--pws-border);
  border-radius: 9px;
  font-size: 14px;
  outline: none;
  transition: border-color var(--pws-transition), box-shadow var(--pws-transition);
  background: var(--pws-white);
  font-family: inherit;
  color: var(--pws-dark);
}
.pws-form-group input:focus,
.pws-form-group select:focus,
.pws-form-group textarea:focus {
  border-color: var(--pws-primary);
  box-shadow: 0 0 0 3px rgba(37,99,235,.1);
}
.pws-form-group input.pws-error,
.pws-form-group select.pws-error { border-color: var(--pws-danger); }
.pws-field-error { font-size: 12px; color: var(--pws-danger); font-weight: 500; margin-top: 2px; }

/* ============================================================
   BUTTONS
   ============================================================ */
.pws-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 11px 22px;
  border: none;
  border-radius: 9px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity var(--pws-transition), transform .1s;
  font-family: inherit;
}
.pws-btn:active { transform: scale(.97); }
.pws-btn:hover  { opacity: .88; }
.pws-btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.pws-btn-primary { background: var(--pws-primary); color: #fff; }
.pws-btn-success { background: var(--pws-success); color: #fff; }
.pws-btn-geo { background: var(--pws-success); color: #fff; margin-top: 10px; }
.pws-btn-outline { background: transparent; border: 1.5px solid var(--pws-border); color: var(--pws-dark); }
.pws-btn-lg { padding: 14px 28px; font-size: 16px; border-radius: 11px; }
.pws-btn-full { width: 100%; justify-content: center; }

/* ============================================================
   SUBMIT FOOTER
   ============================================================ */
.pws-submit-footer { text-align: center; padding-top: 8px; }
.pws-submit-footer p { font-size: 12px; color: var(--pws-gray); margin-bottom: 14px; line-height: 1.5; }

/* Sticky bottom bar on mobile */
.pws-submit-sticky {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--pws-white);
  border-top: 1px solid var(--pws-border);
  padding: 12px 16px;
  z-index: 200;
  box-shadow: 0 -4px 20px rgba(0,0,0,.1);
}

/* ============================================================
   ALERTS
   ============================================================ */
.pws-alert {
  padding: 14px 18px;
  border-radius: 10px;
  font-size: 14px;
  margin-bottom: 16px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  line-height: 1.5;
}
.pws-alert-success { background: #d1fae5; color: #065f46; border: 1px solid #a7f3d0; }
.pws-alert-error   { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }
.pws-alert-icon { font-size: 18px; flex-shrink: 0; margin-top: 1px; }

/* ============================================================
   SUCCESS STATE
   ============================================================ */
.pws-success-state {
  text-align: center;
  padding: 40px 20px;
}
.pws-success-state .pws-success-icon {
  font-size: 64px;
  margin-bottom: 16px;
  display: block;
  animation: pws-bounce .5s ease;
}
@keyframes pws-bounce {
  0%   { transform: scale(0); }
  60%  { transform: scale(1.15); }
  100% { transform: scale(1); }
}
.pws-success-state h2 { font-size: 22px; font-weight: 800; color: var(--pws-success); margin-bottom: 8px; }
.pws-success-state p { font-size: 15px; color: var(--pws-gray); line-height: 1.6; }

/* ============================================================
   GPS COORDS DISPLAY
   ============================================================ */
.pws-coords-display {
  margin-top: 8px;
  font-size: 12px;
  color: var(--pws-success);
  font-weight: 600;
  display: none;
}

/* ============================================================
   SECTION HINT
   ============================================================ */
.pws-section-hint {
  font-size: 13px;
  color: var(--pws-gray);
  margin-bottom: 14px;
  line-height: 1.5;
  background: var(--pws-light);
  padding: 10px 12px;
  border-radius: 8px;
  border-left: 3px solid var(--pws-border);
}

/* ============================================================
   MOBILE
   ============================================================ */
@media (max-width: 768px) {
  :root { --pws-header-h: 52px; }

  .pws-header-inner { padding: 0 14px; }
  .pws-logo { font-size: 16px; }
  .pws-nav a { padding: 6px 10px; font-size: 12px; }

  .pws-progress-bar { padding: 10px 14px; }
  .pws-step-label { font-size: 9px; }
  .pws-step-num { width: 26px; height: 26px; font-size: 11px; }

  .pws-submit-wrap { padding: 14px 12px 100px; }
  .pws-submit-card { padding: 16px; border-radius: 12px; }
  .pws-submit-intro h1 { font-size: 18px; }
  .pws-submit-intro p { font-size: 13px; }

  .pws-submit-grid { grid-template-columns: 1fr; }
  .pws-col-2 { grid-column: span 1; }

  /* Show sticky submit button */
  .pws-submit-sticky { display: block; }
  /* Hide inline submit on mobile */
  .pws-submit-footer .pws-btn-lg { display: none; }
}

@media (max-width: 480px) {
  .pws-nav span { display: none; }
}
