/* ServicePress Leads – styles that follow theme tokens */
:root{
  /* falls back if theme not loaded */
  --bg:#0b0f14; --card:#111827; --text:#f7f9fc; --muted:#9aa4b2;
  --grad-from:#37d6b5; --grad-to:#4e8cff; --grad-angle:115deg;
  --gradient: linear-gradient(var(--grad-angle), var(--grad-from), var(--grad-to));
  --ring:0 0 0 2px rgba(255,255,255,.08);
}

.sp-leads{ margin-top: 18px; }
.sp-lead-map{ margin: 0 0 22px; border-radius:16px; overflow:hidden; box-shadow:0 20px 60px rgba(0,0,0,.25); }

/*
* THE FIX:
* Changed 'grid-template-columns' from '1fr 1fr' to just '1fr'.
* This stacks the info column and the form column vertically.
* It's a much cleaner layout that's balanced and works on all screen sizes.
*/
.sp-lead-grid{
  display:grid;
  grid-template-columns: 1fr; /* This was '1fr 1fr' */
  gap: clamp(18px, 2.6vw, 28px);
}
/* Removed the redundant @media (max-width: 900px) rule for .sp-lead-grid */

/* Left info column */
.sp-lead-info{
  display:grid; gap:14px;
}
.info-block{
  display:grid; grid-template-columns: 42px 1fr; gap:10px;
  padding:14px; border-radius:14px;
  background: color-mix(in oklab, var(--text) 6%, transparent);
  border: 1px solid color-mix(in oklab, #fff 7%, transparent);
  box-shadow: var(--ring);
}
.info-icon{
  width:42px; height:42px; border-radius:12px; display:grid; place-items:center;
  background: var(--gradient); color:#0a0f16; font-weight:900;
  box-shadow: 0 8px 24px color-mix(in oklab, var(--grad-to) 28%, transparent);
}
.info-block h3{ margin:.1rem 0 .2rem; letter-spacing:.2px; color:var(--text); }
.info-block p, .info-block li{ margin:0; color:var(--muted); }
.loc-list{ padding:0; margin:0; list-style:none; display:grid; gap:2px; }

/* Right form */
.sp-lead-form__form{
  background: rgba(255,255,255,.06);
  border:1px solid rgba(255,255,255,.10);
  border-radius: 16px;
  padding: clamp(16px, 2.6vw, 22px);
  box-shadow: 0 30px 80px rgba(0,0,0,.35);
  backdrop-filter: blur(14px) saturate(140%);
}
.sp-lead-form .row{ display:grid; gap:12px; margin-bottom:10px; }
.sp-lead-form .row--2{ grid-template-columns: 1fr 1fr; }
@media (max-width: 720px){ .sp-lead-form .row--2{ grid-template-columns: 1fr; } }

.sp-lead-form input[type="text"],
.sp-lead-form input[type="email"],
.sp-lead-form input[type="tel"],
.sp-lead-form textarea{
  width:100%;
  background: color-mix(in oklab, var(--text) 6%, transparent);
  border:1px solid color-mix(in oklab, #fff 9%, transparent);
  color: var(--text);
  padding: 12px 12px;
  border-radius: 12px;
  outline: none;
  transition: border-color .2s ease, box-shadow .2s ease;
  box-shadow: var(--ring);
}
.sp-lead-form input::placeholder, .sp-lead-form textarea::placeholder{ color: color-mix(in oklab, var(--muted) 80%, transparent); }
.sp-lead-form input:focus, .sp-lead-form textarea:focus{
  border-color: color-mix(in oklab, var(--grad-to) 30%, transparent);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--grad-to) 20%, transparent);
}
.sp-hp{ position:absolute !important; left:-9999px !important; }

/* feedback */
.sp-lead-feedback{ margin:8px 0 0; }
.sp-lead-success{ color:#9ef5cf; }
.sp-lead-error{ color:#ff9c9c; }

/* re-use .btn styles from theme; ensure gradient */
.sp-lead-submit{
  background: var(--gradient);
  color:#fff; border:0;
  box-shadow:0 10px 30px color-mix(in oklab, var(--grad-to) 35%, transparent);
  border-radius:14px; padding:12px 18px; font-weight:800; letter-spacing:.3px;
}
.sp-lead-submit:hover{ transform: translateY(-2px); }

/* ServicePress Leads – Admin clean UI */

body.post-type-sp_lead .wrap h1 {
  display:flex; align-items:center; gap:12px;
}
body.post-type-sp_lead .wrap h1::after{
  content:""; flex:1 1 auto; border-top:1px solid #e5e7eb; opacity:.6;
}

/* List table tweaks */
body.post-type-sp_lead .wp-list-table .column-lead { width:28%; }
body.post-type-sp_lead .wp-list-table .column-email,
body.post-type-sp_lead .wp-list-table .column-phone { width:14%; }
body.post-type-sp_lead .wp-list-table .column-status { width:10%; }
body.post-type-sp_lead .wp-list-table .column-source { width:10%; }
body.post-type-sp_lead .wp-list-table .column-date { width:12%; }

body.post-type-sp_lead .wp-list-table .column-lead .row-subject{
  color:#555; margin-top:3px; font-size:12px; line-height:1.3;
}

.spl-badge{
  display:inline-block; padding:2px 8px; border-radius:999px; font-size:11px; line-height:1.7;
  background:#eef2ff; color:#111; border:1px solid rgba(0,0,0,.05);
}
.spl-badge--new{      background:#dcfce7; }
.spl-badge--contacted{background:#e0f2fe;}
.spl-badge--quoted{   background:#fef9c3;}
.spl-badge--won{      background:#d1fae5;}
.spl-badge--lost{     background:#fee2e2;}

/* Single lead screen – make it feel like a simple card form */
body.post-type-sp_lead .postbox .hndle { font-weight:600; }
body.post-type-sp_lead .spl-table th { width:140px; }
body.post-type-sp_lead .spl-status { min-width:180px; }

/* Belt & suspenders (in case perms/plugins re-show Add New) */
body.post-type-sp_lead .page-title-action { display:none !important; }

/* Hide WP “quick edit” if any theme re-injects it */
body.post-type-sp_lead .row-actions .inline { display:none !important; }

