:root{
  --brand:#ff6e2e;

  /* Gradient built from ff6e2e family */
  --accent:linear-gradient(
    135deg,
    #ff8a50,
    #ff6e2e,
    #e85a1a
  );

  --card-bg: rgba(10,14,22,0.88);
  --muted:#94a3b8;
}

/* ================= RESET ================= */
*{box-sizing:border-box}
html,body{
  height:100%;
  margin:0;
  font-family:Inter,system-ui,Segoe UI,Roboto,Arial;
  color:#eef2ff;
  background:#020617;
}

/* ================= HEADER ================= */
.site-header{
  position:fixed;
  top:0; left:0; right:0;
  height:64px;
  background:#020617;
  border-bottom:1px solid rgba(255,255,255,.06);
  z-index:1000;
}

.header-inner{
  max-width:1400px;
  margin:0 auto;
  height:100%;
  padding:0 20px;
  display:flex;
  align-items:center;
  justify-content:space-between;
}

.header-text{
  display:flex;
  flex-direction:column;
  line-height:1.2;
}

.header-title{
  font-size:35px;
  font-weight:600;
  color:#f8fafc;
}

.header-subtitle{
  font-size:12px;
  color:var(--muted);
  margin-top:2px;
}

.logo-wrap img{
  height:34px;
}

/* ================= MAP ================= */
#map{
  position:absolute;
  top:64px;
  left:0;
  right:0;
  bottom:0;
  height:calc(100vh - 64px);
}

.error-block{
  margin-top:auto;        /* pushes to bottom of panel */
  padding-top:12px;

  display:flex;
  flex-direction:column;
  gap:10px;
  font-size: 14px;
}
.error-cta{
  display:block;              /* 👈 change */
  width:100%;                 /* 👈 full width */

  padding:10px 16px;
  border-radius:10px;
  font-size:14px;
  font-weight:600;

  text-align:center;

  color:#020617;
  background:#fe6731;
  text-decoration:none;

  transition:transform .15s ease, box-shadow .15s ease, opacity .15s ease;
}

.error-cta:hover{
  transform:translateY(-1px);
  box-shadow:0 6px 14px rgba(254,103,49,.35);
  opacity:.95;
}



/* ================= PANELS ================= */
.topbar{
  position:fixed;
  top:64px;
  left:0;
  width:360px;
  height:calc(100vh - 64px);
  padding:16px;
  background:var(--card-bg);
  border-right:1px solid rgba(255,255,255,.08);
  z-index:1100;

  display:flex;
  flex-direction:column;
  gap:16px;

  overflow-y:auto;
  overflow-x:hidden;
  -webkit-overflow-scrolling:touch;

  transition:transform .25s ease;
}

.topbar.collapsed{
  transform:translateX(-100%);
}

/* Toggle */
.panel-toggle{
  position:absolute;
  right:-14px;
  top:16px;
  width:28px;
  height:28px;
  border-radius:50%;
  background:#020617;
  border:1px solid rgba(255,255,255,.2);
  color:#e5e7eb;
  cursor:pointer;
}

.topbar.collapsed .panel-toggle{
  transform:rotate(180deg);
}

/* ================= BRAND ================= */
.brand{
  display:flex;
  gap:12px;
  align-items:center;
}

.logo{
  width:42px;
  height:42px;
  display:flex;
  align-items:center;
  justify-content:center;
  overflow:hidden;
}

.logo img{
  width:100%;
  height:100%;
  object-fit:contain;
  display:block;
}

.title .h{
  font-weight:600;
}

.title .sub{
  font-size:12px;
  color:var(--muted);
}

/* ================= CONTROLS ================= */
.controls{
  display:flex;
  flex-direction:column;
  gap:10px;
  flex:1;                 /* 👈 THIS IS THE KEY */
}

.input{
  padding:11px 12px;
  border-radius:10px;
  border:1px solid rgba(255,255,255,.08);
  background:rgba(255,255,255,.04);
  color:#eef2ff;
  font-size:14px;
}

.input::placeholder{
  color:#9ca3af;
}

.input.small{
  background:#2d3237;
}

/* ================= BUTTONS ================= */
.btn{
  padding:11px 16px;
  border-radius:10px;
  border:0;
  background:var(--accent);
  color:#022;
  font-weight:600;
  font-size:14px;
  cursor:pointer;
}

.btn.secondary{
  background:transparent;
  border:1px solid rgba(255,255,255,.15);
  color:#cbd5e1;
}

/* ================= FORM ================= */
.form-head{
  margin-bottom:4px;
}

.form-head h3{
  margin:0;
  font-size:18px;
  font-weight:600;
  color:#f8fafc;
}

.form-head p{
  margin:6px 0 0;
  font-size:12px;
  color:var(--muted);
  line-height:1.4;
}

.lead-form{
  display:flex;
  flex-direction:column;
  gap:14px;
}

.fgroup{
  display:flex;
  flex-direction:column;
  gap:6px;
}

.fgroup label{
  font-size:12px;
  color:#cbd5f5;
}

.fgroup label span{
  color:var(--muted);
  font-weight:400;
}

.frow{
  display:flex;
  gap:10px;
}

.frow.actions{
  justify-content:flex-end;
  margin-top:6px;
}

.form-foot{
  margin-top:4px;
  font-size:11px;
  color:var(--muted);
  text-align:center;
}

/* ================= STATES ================= */
.hidden{
  display:none;
}

@keyframes shake{
  0%{transform:translateX(0)}
  25%{transform:translateX(-6px)}
  50%{transform:translateX(6px)}
  75%{transform:translateX(-4px)}
  100%{transform:translateX(0)}
}

.shake{
  animation:shake .35s ease;
  border-color:#ef4444!important;
}

/* ================= AUTOCOMPLETE ================= */
.pac-container{
  position:fixed!important;
  z-index:3000!important;
  background:#0b1220;
  border-radius:12px;
  border:1px solid rgba(255,255,255,.1);
  box-shadow:0 20px 40px rgba(0,0,0,.6);
}

.pac-item{
  color:#e5e7eb;
  padding:8px 12px;
}

.pac-item:hover{
  background:#111827;
}

.pac-item-query{
  color:#ffffff;
}

/* ================= RESPONSIVE ================= */

/* Tablets */
@media (max-width:1024px){
  .header-title{font-size:20px}
  .topbar{width:320px}
}

/* Mobile */
@media (max-width:768px){

  .site-header{height:56px}

  .header-inner{padding:0 14px}

  .header-title{font-size:16px}
  .header-subtitle{font-size:11px}
  .logo-wrap img{height:28px}

  #map{
    top:56px;
    height:calc(100vh - 56px);
  }

  .topbar{
    top:auto;
    bottom:0;
    left:0;
    right:0;
    width:100%;
    max-height:70vh;

    overflow-y:auto;
    overflow-x:hidden;

    border-right:0;
    border-top:1px solid rgba(255,255,255,.08);
    border-radius:16px 16px 0 0;
    transform:translateY(0);
  }

  .topbar.collapsed{
    transform:translateY(100%);
  }

  .panel-toggle{
    right:50%;
    top:-14px;
    transform:translateX(50%);
  }

  .topbar.collapsed .panel-toggle{
    transform:translateX(50%) rotate(180deg);
  }

  .frow.actions{
    flex-direction:column-reverse;
  }

  .btn{
    width:100%;
  }
}

/* Small phones */
@media (max-width:420px){
  .topbar{
    max-height:80vh;
  }
}

/* ================= OPTIONAL SCROLLBAR ================= */
.topbar::-webkit-scrollbar{
  width:6px;
}
.topbar::-webkit-scrollbar-thumb{
  background:rgba(255,255,255,.15);
  border-radius:4px;
}
