/*
 * estimate_v2.css — Lokaaro estimate page redesign
 * Estimate page shell: calm public tool layout
 */

body.est-page-v2 {
  background: #0b211d;
}

.est-page-shell {
  display: grid;
  grid-template-columns: minmax(340px, .86fr) minmax(520px, 1fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  min-height: calc(100vh - 64px);
  max-width: none;
  margin: 0;
  border-top: .5px solid rgba(255,255,255,.12);
  padding: clamp(3rem, 6vw, 5.5rem) clamp(1.25rem, 6vw, 5rem);
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(7,38,34,.96) 0%, rgba(15,94,78,.92) 55%, rgba(29,158,117,.78) 100%),
    radial-gradient(circle at 74% 22%, rgba(159,225,203,.34), transparent 34%);
}
.est-page-shell::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: linear-gradient(90deg, rgba(0,0,0,.6), rgba(0,0,0,.24));
  pointer-events: none;
}
.est-left-panel,
.est-right-panel {
  position: relative;
  z-index: 1;
}

/* ── LEFT PANEL ── */
.est-left-panel {
  background: transparent;
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  padding: 0;
  position: relative;
  overflow: visible;
}
.est-left-panel .est-left-inner {
  position: sticky;
  top: clamp(2rem, 6vw, 5rem);
}
.est-trust-line {
  font-size: .875rem;
  color: #6b7280;
  line-height: 1.6;
  margin: 0 0 1.1rem;
}
.est-left-panel::before {
  content: none;
}
.est-left-panel::after {
  content: none;
}
.est-left-inner {
  max-width: 520px;
  z-index: 1;
}
.est-left-kicker {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  background: rgba(225,245,238,.12);
  border: .5px solid rgba(225,245,238,.28);
  border-radius: 999px;
  padding: .38rem .9rem;
  font-size: .74rem;
  font-weight: 600;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: #d9fff1;
  margin-bottom: 1.25rem;
}
.est-left-title {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: clamp(2.8rem, 5.4vw, 5.15rem);
  line-height: 1.02;
  color: #fff;
  letter-spacing: -.025em;
  margin-bottom: 1.15rem;
}
.est-left-title em {
  font-style: italic;
  color: #bdf5dd;
}
.est-left-sub {
  font-size: 1rem;
  color: rgba(255,255,255,.76);
  line-height: 1.72;
  margin-bottom: 1.35rem;
  max-width: 430px;
}
.est-trust-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1.1rem;
  display: flex;
  flex-direction: column;
  gap: .45rem;
  opacity: .92;
}
.est-trust-list li {
  display: flex;
  align-items: center;
  gap: .65rem;
  font-size: .9rem;
  color: rgba(255,255,255,.78);
  font-weight: 500;
}
.est-trust-dot {
  width: 20px; height: 20px;
  border-radius: 50%;
  background: rgba(159,225,203,.16);
  border: .5px solid rgba(159,225,203,.34);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: .7rem;
  color: #bdf5dd;
  flex-shrink: 0;
}
.est-left-badge {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  background: rgba(255,255,255,.10);
  border: .5px solid rgba(255,255,255,.18);
  border-radius: 8px;
  padding: .38rem .85rem;
  font-size: .76rem;
  font-weight: 600;
  color: #d9fff1;
}
.est-left-badge i { font-size: .72rem; }

.est-live-signal {
  border-left: 2px solid rgba(159,225,203,.68);
  margin: 1.4rem 0 1.1rem;
  max-width: 430px;
  padding: 2px 0 3px 14px;
}
.est-live-signal span {
  color: rgba(189,245,221,.92);
  display: block;
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .09em;
  line-height: 1;
  margin-bottom: 8px;
  text-transform: uppercase;
}
.est-live-signal p {
  color: rgba(255,255,255,.74);
  font-size: .84rem;
  line-height: 1.55;
  margin: 0;
}

/* ── RIGHT PANEL ── */
.est-right-panel {
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 0;
}
.est-right-card {
  background: rgba(255,252,246,.96);
  border-radius: 10px;
  border: 1px solid rgba(255,247,235,.72);
  box-shadow: 0 20px 60px rgba(3,22,19,.18);
  padding: 1.6rem 1.55rem;
  width: 100%;
  max-width: 560px;
  position: relative;
  backdrop-filter: blur(10px);
}
.est-right-card::before {
  content: none;
}
.est-card-head { margin-bottom: .65rem; }
.est-card-head h2 {
  font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
  font-size: 1.12rem;
  color: #111827;
  font-weight: 700;
  margin-bottom: 0;
  letter-spacing: 0;
}
.est-card-head p { font-size: .8rem; color: #6b7280; line-height: 1.5; margin: .15rem 0 0; }

/* ── Section labels ── */
.est-section { margin-bottom: .5rem; }
.est-section-label {
  display: block;
  font-size: .71rem;
  font-weight: 600;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: #6b7280;
  margin-bottom: .45rem;
}
.est-section-label--step2 {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin-top: 1rem;
  margin-bottom: .75rem;
  color: #374151;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .02em;
  text-transform: none;
}
.est-step-subtitle { font-weight: 400; color: #6b7280; font-size: .76rem; }

/* ── Category tile grid ── */
.est-cat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.est-cat-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 7px 9px;
  border: 1px solid #eadfce;
  outline: none;
  border-radius: 7px;
  background: #fffaf2;
  cursor: pointer;
  font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
  font-size: .71rem;
  font-weight: 600;
  color: #374151;
  text-align: center;
  line-height: 1.2;
  transition: all .18s ease;
  position: relative;
}
.est-cat-tile i { font-size: 1rem; color: #6b7280; transition: transform .18s ease; line-height: 1; }
.est-cat-tile:hover { border-color: #1D9E75; background: #f4fbf5; box-shadow: none; z-index: 1; transform: translateY(-1px); }
.est-cat-tile--popular { background: #fffaf2; }
.est-popular-dot { display: none; }
.est-cat-tile[aria-pressed="true"],
.est-cat-tile.is-active { border-color: #1D9E75; background: #E1F5EE; color: #0F6E56; box-shadow: none; transform: none; }
.est-cat-tile[aria-pressed="true"] i,
.est-cat-tile.is-active i { color: #1D9E75; transform: scale(1.08); }

.est-form-divider {
  align-items: center;
  color: #9ca3af;
  display: flex;
  font-size: .72rem;
  gap: .8rem;
  margin: .85rem 0 .7rem;
}
.est-form-divider::before,
.est-form-divider::after {
  background: #e5e7eb;
  content: '';
  flex: 1;
  height: 1px;
}

/* Hidden extra tiles — shown after "More" click */
.est-cat-tile--extra { display: none; }
.est-cat-grid--expanded .est-cat-tile--extra { display: flex; }

.est-more-btn {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  background: none;
  border: none;
  color: #6b7280;
  font-size: .76rem;
  font-weight: 600;
  font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
  cursor: pointer;
  padding: .4rem 0;
  margin-top: .45rem;
  letter-spacing: .01em;
  transition: color .15s;
}
.est-more-btn:hover { color: #374151; }
.est-more-btn i { font-size: .65rem; }

/* ── Dynamic fields ── */
.est-dynamic-fields {
  padding-top: .4rem;
  margin-top: .15rem;
  margin-bottom: .25rem;
  animation: est-fade-in .22s ease;
}
@keyframes est-fade-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Form row ── */
.est-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 1rem;
  margin-bottom: .9rem;
  position: relative;
}
.est-form-field { position: relative; }
.est-form-stack { display: flex; flex-direction: column; gap: 10px; margin-top: 1rem; margin-bottom: .9rem; }
.est-location-row { margin-top: .65rem; margin-bottom: .35rem; }
.est-description-row { margin-top: .4rem; margin-bottom: .75rem; }
.est-description-row--primary { margin-top: .7rem; margin-bottom: .8rem; }
.est-form-field--full { grid-column: 1 / -1; }
.est-field-guidance {
  margin: -.08rem 0 .42rem;
  font-size: .84rem;
  color: #6b7280;
  line-height: 1.45;
}
.est-textarea-shell {
  position: relative;
}
.est-textarea-icon {
  position: absolute;
  top: .85rem;
  left: .9rem;
  color: #9ca3af;
  font-size: .9rem;
  pointer-events: none;
}
.est-details-textarea {
  width: 100%;
  border: 1px solid #eadfce;
  border-radius: 7px;
  padding: .8rem .9rem .8rem 2.35rem;
  font-size: .95rem;
  font-family: inherit;
  color: #111827;
  resize: none;
  min-height: 64px;
  max-height: 180px;
  line-height: 1.5;
  background: #fffdf8;
  transition: border-color .15s, box-shadow .15s, background .15s, min-height .18s ease;
}
.est-details-textarea::placeholder { color: #9ca3af; transition: opacity .12s ease; }
.est-details-textarea.is-rotating-placeholder::placeholder { opacity: .2; }
.est-details-textarea:focus { border-color: #1D9E75; background: #fff; box-shadow: 0 0 0 3px rgba(29,158,117,.10); min-height: 104px; outline: none; }
.est-details-textarea.is-invalid { border-color: #c0392b !important; box-shadow: 0 0 0 2px rgba(192,57,43,.15) !important; }
.est-field-label { display: block; font-size: .71rem; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: #6b7280; margin-bottom: .4rem; }
.est-field-label--primary { color: #374151; }
.est-field-help { margin: .28rem 0 0; font-size: .72rem; color: #9ca3af; }
.est-label-optional { font-weight: 400; text-transform: none; letter-spacing: 0; color: #b0bec5; font-size: .7rem; }
.est-city-dropdown { position: absolute; top: 100%; left: 0; right: 0; z-index: 200; background: #fff; border: 1px solid #dee2e6; border-top: none; border-radius: 0 0 8px 8px; box-shadow: 0 4px 12px rgba(0,0,0,.09); max-height: 200px; overflow-y: auto; }
.est-city-item { padding: 8px 12px; font-size: .88rem; cursor: pointer; transition: background .12s; }
.est-city-item:hover { background: #f3f4f6; }
.hf-field-input {
  background: #fffdf8 !important;
  border-color: #eadfce !important;
  border-radius: 7px !important;
  color: #111827 !important;
}
.hf-field-group {
  position: relative;
}
.hf-field-icon {
  align-items: center;
  color: #9ca3af;
  display: inline-flex;
  height: 26px;
  justify-content: center;
  left: .75rem;
  pointer-events: none;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 26px;
  z-index: 2;
}
.hf-field-input {
  padding-left: 2.6rem !important;
}
.hf-field-input:focus {
  background: #fff !important;
  border-color: #1D9E75 !important;
  box-shadow: 0 0 0 3px rgba(29,158,117,.10) !important;
}
.hf-field-input::placeholder {
  color: #9ca3af !important;
}

/* ── Secondary details ── */
.est-more-details {
  border: 0;
  margin: .2rem 0 .75rem;
}
.est-more-details summary {
  color: #6b7280;
  cursor: pointer;
  display: inline-flex;
  font-size: .78rem;
  font-weight: 700;
  gap: .3rem;
  list-style: none;
  padding: .25rem 0;
}
.est-more-details summary::-webkit-details-marker {
  display: none;
}
.est-more-details summary::after {
  content: '+';
  color: #1D9E75;
  font-weight: 800;
}
.est-more-details[open] summary::after {
  content: '-';
}

/* ── Urgency ── */
.est-urgency-section { margin-top: .45rem; }
.est-urgency-row {
  display: flex;
  gap: 6px;
  margin-top: .35rem;
}
.est-urgency-btn { cursor: pointer; flex: 1; }
.est-urgency-radio { position: absolute; opacity: 0; width: 0; height: 0; }
.est-urgency-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: .42rem .62rem;
  border: 1px solid #eadfce;
  border-radius: 7px;
  background: #fffdf8;
  transition: border-color .15s, background .15s;
  text-align: center;
  white-space: nowrap;
}
.est-urgency-btn:hover .est-urgency-inner { border-color: #1D9E75; background: #f4fbf5; }
.est-urgency-radio:checked + .est-urgency-inner {
  border-color: #1D9E75;
  background: #E1F5EE;
}
.est-urgency-icon { display: none; }
.est-urgency-text { display: flex; align-items: center; }
.est-urgency-label { font-size: .76rem; font-weight: 600; color: #374151; line-height: 1; }
.est-urgency-sub { display: none; }
.est-urgency-radio:checked + .est-urgency-inner .est-urgency-label { color: #0F6E56; font-weight: 700; }
@media (max-width: 560px) {
  .est-urgency-row { flex-wrap: wrap; }
  .est-urgency-btn { flex: 0 0 calc(50% - 4px); }
}

/* ── Submit ── */
.est-submit-btn {
  width: 100%;
  padding: .95rem 1rem;
  background: #1D9E75;
  color: #fff;
  border: 1px solid transparent;
  border-radius: 7px;
  font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
  font-size: .97rem;
  font-weight: 600;
  cursor: pointer;
  letter-spacing: .01em;
  box-shadow: 0 2px 8px rgba(29,158,117,.22);
  transition: background .15s, transform .15s, box-shadow .15s;
  margin-bottom: .55rem;
}
.est-submit-btn:hover:not(:disabled) { background: #17896a; box-shadow: 0 4px 14px rgba(29,158,117,.30); transform: translateY(-1px); }
.est-submit-btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.est-field-error { margin: 5px 0 0; font-size: .78rem; color: #c0392b; display: flex; align-items: center; gap: 5px; }
.est-field-error::before { content: '⚠'; font-size: .75rem; }
.hf-field-input.is-invalid { border-color: #c0392b !important; box-shadow: 0 0 0 2px rgba(192,57,43,.15) !important; }
.est-submit-note { text-align: center; font-size: .75rem; color: #9ca3af; margin: 0 0 1rem; }
.est-submit-note-green { color: #1D9E75; font-weight: 600; }

/* ── Honeypot ── */
.hp-field { position: absolute; left: -9999px; opacity: 0; pointer-events: none; }

/* ── Escape Bootstrap container if needed ── */
body.est-page-v2 > .container,
body.est-page-v2 main > .container,
body.est-page-v2 .main-content > .container {
  max-width: 100% !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

/* ── Responsive ── */
@media (min-width: 1200px) {
  .est-right-card { max-width: 560px; }
}
@media (max-width: 991px) {
  .est-page-shell { grid-template-columns: 1fr; gap: 2rem; max-width: 100%; }
  .est-left-panel { justify-content: flex-start; }
  .est-right-panel { justify-content: flex-start; }
  .est-right-card { max-width: 640px; }
  .est-left-title { font-size: clamp(2.45rem, 8vw, 4rem); }
  .est-left-sub { font-size: .95rem; }
  .est-cat-grid { grid-template-columns: repeat(3, 1fr); gap: 5px; }
  .est-cat-tile { font-size: .68rem; padding: 8px 4px; }
  .est-cat-tile i { font-size: 1rem; }
}
@media (max-width: 767px) {
  .est-page-shell { grid-template-columns: 1fr; min-height: unset; padding: 2.5rem 1rem 2rem; gap: 1.5rem; }
  .est-left-panel { justify-content: flex-start; padding: 0; }
  .est-left-panel::before, .est-left-panel::after { display: none; }
  .est-left-title { font-size: clamp(2.2rem, 9vw, 3.1rem); margin-bottom: .75rem; }
  .est-left-sub { display: block; font-size: .9rem; max-width: 95%; }
  .est-trust-list { flex-direction: row; flex-wrap: wrap; gap: .5rem .9rem; margin-bottom: .75rem; }
  .est-trust-list li { font-size: .78rem; }
  .est-live-signal { margin: 1rem 0 .35rem; }
  .est-right-panel { padding: 0; justify-content: center; }
  .est-right-card { border-radius: 12px; padding: 1.25rem 1.05rem; max-width: 100%; }
  .est-card-head h2 { font-size: 1.2rem; }
  .est-card-head p { font-size: .8rem; }
  .est-cat-grid { grid-template-columns: repeat(3, 1fr); gap: 5px; }
  .est-cat-tile { padding: 9px 4px 8px; font-size: .66rem; }
  .est-cat-tile i { font-size: .95rem; }
  .est-form-row { grid-template-columns: 1fr; gap: 8px; }
  .est-submit-btn { font-size: .9rem; padding: .85rem; }
  .est-quick-btns { gap: .35rem; }
  .est-quick-btn { font-size: .72rem; padding: .32rem .6rem; }
}
@media (max-width: 400px) {
  .est-cat-grid { grid-template-columns: repeat(2, 1fr); }
  .est-left-title { font-size: 1.55rem; }
  .est-trust-list { display: none; }
}
