/* =====================================================================
   LOCALBUDDY — POST A TASK (create-task.php) — client form v2
   ---------------------------------------------------------------------
   Own lightweight stylesheet. style.css is only used for header/footer.
   Matches the profile pages (profilepage.css / provider-profile.css).

   1. Tokens & base     4. Location combobox + "use my location"
   2. Layout            5. Photos (drop zone + 2 thumbnails)
   3. Fields (icon inputs, labels, meta)
                        6. Submit, alert, success   7. Side panel
                        8. Responsive
   ===================================================================== */

/* ---------------------------------------------------------------------
   1. TOKENS & BASE
   --------------------------------------------------------------------- */
body.lb-post {
  --pt-green: #0b6b34;
  --pt-green-dark: #0d5c2b;
  --pt-green-soft: #e2f2e5;
  --pt-green-mint: #f1f8f3;
  --pt-yellow-soft: #fdf3d3;
  --pt-ink: #111827;
  --pt-text: #344054;
  --pt-muted: #667085;
  --pt-icon: #5b6b9a;
  --pt-line: #e6e9e7;
  --pt-border: #dde3ec;
  --pt-danger: #b42318;
  --pt-shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 6px 20px rgba(16, 24, 40, .06);
  --pt-font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;

  background: #f7f9f8;
  color: var(--pt-ink);
  font-family: var(--pt-font);
  -webkit-font-smoothing: antialiased;
}

.lb-post main *,
.lb-post main *::before,
.lb-post main *::after { box-sizing: border-box; }

.lb-post main h1,
.lb-post main h2,
.lb-post main p,
.lb-post main ol,
.lb-post main ul { margin: 0; }

.lb-post main img { display: block; max-width: 100%; }

.lb-post .lb-sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}


/* ---------------------------------------------------------------------
   2. LAYOUT
   --------------------------------------------------------------------- */
.pt-page { padding: 26px 0 56px; }

.pt-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 28px;
}

.pt-head { margin-bottom: 18px; }
.pt-title { font-size: 28px; font-weight: 800; line-height: 1.15; letter-spacing: -0.03em; color: var(--pt-green-dark); }
.pt-sub { margin-top: 6px !important; font-size: 14.5px; color: var(--pt-text); }

.pt-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 22px;
  align-items: start;
}

.pt-card {
  padding: 26px 28px 26px;
  border: 1px solid var(--pt-line);
  border-radius: 18px;
  background: #ffffff;
  box-shadow: var(--pt-shadow);
}


/* ---------------------------------------------------------------------
   3. FIELDS
   --------------------------------------------------------------------- */
.pt-field { margin-bottom: 14px; }

.pt-label {
  display: block;
  margin-bottom: 8px;
  font-size: 15px;
  font-weight: 800;
  color: #1b2340;
}
.pt-req { color: #e5322d; }
.pt-opt { font-weight: 800; }

.pt-label-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.pt-control { position: relative; }

.pt-control-ico {
  position: absolute;
  top: 50%;
  left: 18px;
  z-index: 1;
  width: 20px;
  text-align: center;
  color: var(--pt-icon);
  font-size: 18px;
  transform: translateY(-50%);
  pointer-events: none;
}
.pt-control-area .pt-control-ico { top: 22px; transform: none; }
.pt-peso { font-size: 20px; font-weight: 800; font-style: normal; }

.pt-control-chev {
  position: absolute;
  top: 50%;
  right: 18px;
  color: #1b2340;
  font-size: 14px;
  transform: translateY(-50%);
  pointer-events: none;
}

.pt-input {
  width: 100%;
  height: 54px;
  padding: 0 16px 0 52px;
  border: 1.5px solid var(--pt-border);
  border-radius: 12px;
  background: #ffffff;
  color: var(--pt-ink);
  font-family: var(--pt-font);
  font-size: 15px;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.pt-input::placeholder { color: #8a93ad; }
.pt-input:focus {
  outline: none;
  border-color: var(--pt-green);
  box-shadow: 0 0 0 4px rgba(11, 107, 52, .12);
}
.pt-input.is-invalid { border-color: var(--pt-danger); }
.pt-input.is-invalid:focus { box-shadow: 0 0 0 4px rgba(180, 35, 24, .12); }

.pt-textarea {
  height: auto;
  min-height: 140px;
  padding-top: 14px;
  padding-bottom: 14px;
  line-height: 1.55;
  resize: vertical;
}

.pt-combo-input { padding-right: 44px; }

.pt-langs {
  margin-top: 8px !important;
  font-size: 12.5px;
  color: var(--pt-muted);
}
.pt-langs i { margin-right: 4px; color: var(--pt-green); }
.pt-langs strong { color: var(--pt-text); }

.pt-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  min-height: 18px;
  margin-top: 5px;
  font-size: 12.5px;
}
.pt-error { color: var(--pt-danger); font-weight: 600; }
.pt-hint { color: var(--pt-muted); }
.pt-hint.is-ok { color: var(--pt-green); font-weight: 600; }
.pt-count { margin-left: auto; color: var(--pt-muted); white-space: nowrap; }
.pt-count.is-near { color: #b54708; }


/* ---------------------------------------------------------------------
   4. LOCATION COMBOBOX + "USE MY LOCATION"
   --------------------------------------------------------------------- */
.pt-linkbtn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--pt-green-dark);
  font-family: var(--pt-font);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.pt-linkbtn:hover span { text-decoration: underline; }
.pt-linkbtn[disabled] { opacity: .6; cursor: wait; }

.pt-combo-list {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 60;
  max-height: 290px;
  margin: 0;
  padding: 6px;
  overflow-y: auto;
  list-style: none;
  border: 1px solid var(--pt-line);
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 16px 40px rgba(16, 24, 40, .14);
}
.pt-combo-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 14px;
  color: var(--pt-ink);
  cursor: pointer;
}
.pt-combo-list li small { font-size: 11.5px; color: var(--pt-muted); white-space: nowrap; }
.pt-combo-list li[aria-selected="true"],
.pt-combo-list li:hover { background: var(--pt-green-mint); }
.pt-combo-list li.is-picked { color: var(--pt-green-dark); font-weight: 700; }
.pt-combo-list .pt-combo-empty { justify-content: center; color: var(--pt-muted); cursor: default; }
.pt-combo-list .pt-combo-empty:hover { background: transparent; }


/* ---------------------------------------------------------------------
   5. PHOTOS
   --------------------------------------------------------------------- */
.pt-photos {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, .9fr) minmax(0, .9fr);
  gap: 14px;
  align-items: stretch;
}

.pt-drop {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 132px;
  margin: 0;
  padding: 14px;
  border: 1.5px dashed var(--pt-border);
  border-radius: 12px;
  background: #ffffff;
  color: #6b7596;
  font-size: 14px;
  line-height: 1.45;
  text-align: center;
  cursor: pointer;
  transition: border-color .2s ease, background-color .2s ease;
}
.pt-drop-ico { font-size: 34px; color: var(--pt-icon); }
.pt-drop:hover,
.pt-drop.is-over { border-color: var(--pt-green); background: var(--pt-green-mint); }
.pt-drop:focus-visible { outline: 3px solid rgba(11, 107, 52, .35); outline-offset: 2px; }
.pt-drop.is-full { opacity: .55; pointer-events: none; }

.pt-thumb {
  position: relative;
  min-height: 132px;
  overflow: hidden;
  border-radius: 12px;
  background: #eef2ef;
}
.pt-thumb[hidden] { display: none; }
.pt-thumb img { width: 100%; height: 100%; object-fit: cover; }
.pt-thumb button {
  position: absolute;
  top: 8px;
  right: 8px;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(17, 24, 39, .72);
  color: #ffffff;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
}
.pt-thumb button:hover { background: var(--pt-danger); }


/* ---------------------------------------------------------------------
   6. SUBMIT, ALERT, SUCCESS
   --------------------------------------------------------------------- */
.pt-submit-row { display: flex; flex-direction: column; gap: 10px; padding-top: 8px; }

.pt-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 46px;
  padding: 0 20px;
  border: 1.5px solid var(--pt-green);
  border-radius: 12px;
  background: #ffffff;
  color: var(--pt-green-dark) !important;
  font-family: var(--pt-font);
  font-size: 14.5px;
  font-weight: 700;
  text-decoration: none !important;
  cursor: pointer;
  transition: background-color .2s ease, transform .2s ease, opacity .2s ease;
}
.pt-btn:hover { background: var(--pt-green-mint); }
.pt-btn:active { transform: scale(.99); }
.pt-btn:focus-visible { outline: 3px solid rgba(11, 107, 52, .35); outline-offset: 2px; }
.pt-btn[disabled] { opacity: .6; cursor: wait; }

.pt-btn-primary {
  height: 58px;
  border-radius: 12px;
  background: var(--pt-green);
  color: #ffffff !important;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: .02em;
  box-shadow: 0 8px 18px rgba(11, 107, 52, .22);
}
.pt-btn-primary i { font-size: 20px; }
.pt-btn-primary:hover { background: #08552a; }
.pt-btn-ghost { border-color: transparent; }

.pt-note { font-size: 12.5px; color: var(--pt-muted); text-align: center; }
.pt-note i { margin-right: 4px; color: var(--pt-green); }

.pt-alert {
  margin: 0 0 16px;
  padding: 12px 14px;
  border: 1px solid #fecdca;
  border-radius: 12px;
  background: #fef3f2;
  color: var(--pt-danger);
  font-size: 14px;
  font-weight: 600;
}
.pt-alert[hidden] { display: none; }

.pt-success { padding: 30px 6px 10px; text-align: center; }
.pt-success[hidden] { display: none; }
.pt-success-ico {
  display: inline-grid;
  place-items: center;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--pt-green-soft);
  color: var(--pt-green);
  font-size: 34px;
}
.pt-success h2 { margin-top: 14px !important; font-size: 22px; font-weight: 800; color: var(--pt-green-dark); }
.pt-success p { max-width: 470px; margin: 8px auto 0 !important; font-size: 14.5px; line-height: 1.6; color: var(--pt-text); }
.pt-success-tags { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 14px; }
.pt-success-tags:empty { display: none; }
.pt-success-tags span {
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--pt-green-soft);
  color: var(--pt-green-dark);
  font-size: 12.5px;
  font-weight: 700;
}
.pt-success-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 22px; }
.pt-success-actions .pt-btn-primary { height: 46px; font-size: 14.5px; }


/* ---------------------------------------------------------------------
   7. SIDE PANEL
   --------------------------------------------------------------------- */
.pt-side { position: sticky; top: calc(var(--lb-header-h, 80px) + 16px); display: grid; gap: 14px; }

.pt-mascot-card {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 14px 18px 0 10px;
  overflow: hidden;
  border-radius: 18px;
  background: radial-gradient(240px 140px at 100% 0%, rgba(255, 255, 255, .6), transparent 70%), var(--pt-yellow-soft);
}
.pt-mascot-card img { align-self: end; width: 112px; height: auto; }
.pt-mascot-card strong { display: block; font-size: 16px; font-weight: 800; color: var(--pt-ink); }
.pt-mascot-card p { margin-top: 4px !important; padding-bottom: 14px; font-size: 13px; line-height: 1.5; color: var(--pt-text); }

.pt-tips {
  padding: 18px 20px;
  border: 1px solid var(--pt-line);
  border-radius: 18px;
  background: #ffffff;
  box-shadow: var(--pt-shadow);
}
.pt-tips h2 { margin-bottom: 12px !important; font-size: 16px; font-weight: 800; color: var(--pt-green-dark); }
.pt-tips ol { display: grid; gap: 12px; padding: 0; list-style: none; }
.pt-tips li { display: flex; gap: 12px; align-items: flex-start; }
.pt-tips li > span {
  flex: 0 0 26px;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--pt-green-soft);
  color: var(--pt-green-dark);
  font-size: 12.5px;
  font-weight: 800;
}
.pt-tips strong { display: block; font-size: 14px; font-weight: 700; color: var(--pt-ink); }
.pt-tips small { display: block; margin-top: 2px; font-size: 12.5px; color: var(--pt-muted); }

.pt-safety {
  display: flex;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid #dcebe1;
  border-radius: 16px;
  background: var(--pt-green-mint);
}
.pt-safety i { margin-top: 2px; font-size: 18px; color: var(--pt-green); }
.pt-safety p { font-size: 12.5px; line-height: 1.55; color: var(--pt-text); }


/* ---------------------------------------------------------------------
   8. RESPONSIVE
   --------------------------------------------------------------------- */
@media (max-width: 991.98px) {
  .pt-layout { grid-template-columns: 1fr; }
  .pt-side { position: static; order: -1; }
  .pt-tips, .pt-safety { display: none; }
}

@media (max-width: 767.98px) {
  .pt-page { padding: 14px 0 40px; }
  .pt-container { padding: 0 12px; }
  .pt-title { font-size: 22px; }
  .pt-card { padding: 18px 16px; border-radius: 16px; }
  .pt-label { font-size: 14px; }
  .pt-label-row { flex-direction: column; gap: 0; }
  .pt-input { height: 50px; padding-left: 46px; font-size: 15px; }
  .pt-control-ico { left: 15px; font-size: 16px; }
  .pt-photos { grid-template-columns: 1fr 1fr; }
  .pt-drop { grid-column: 1 / -1; min-height: 110px; }
  .pt-thumb { min-height: 120px; }
  .pt-btn-primary { height: 54px; font-size: 16px; }
  .pt-mascot-card { grid-template-columns: 84px 1fr; }
  .pt-mascot-card img { width: 84px; }
  .pt-success-actions .pt-btn { flex: 1 1 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .pt-input, .pt-drop, .pt-btn { transition: none; }
}
