/* =========================================================
   ASHRAE Sizer – FULL stylesheet
   Version: v1.4.2
   Layout:
   - Plugin anchored to left of content area
   - Grid shifted further LEFT with negative margin
   - Results column widened
   - Chips centered
   - Help buttons aligned
   ========================================================= */

/* ---------- Theme tokens / outer wrapper ---------- */
.dbt-ashrae-sizer{
  --dbt-bg: #ffffff;
  --dbt-text: #0f172a;         /* slate-900 */
  --dbt-subtext: #334155;      /* slate-700 */
  --dbt-line: #e5e7eb;         /* gray-200 */
  --dbt-soft: #f8fafc;         /* slate-50 */
  --dbt-chip-ink: #0b4a6f;
  --dbt-card-radius: 16px;
  --dbt-shadow: 0 1px 2px rgba(0,0,0,.06), 0 8px 24px rgba(15,23,42,.06);
  --dbt-gap: 24px;

  color: var(--dbt-text);

  /* Normal block inside WP content, anchored left */
  width: 100%;
  max-width: 1600px;
  margin-left: -80px !important;
  margin-right: auto !important;

  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 0 8px;
}

/* ---------- Headings ---------- */
.dbt-ashrae-sizer .dbt-main-title{
  font-family: Arial, Helvetica, sans-serif !important;
  text-align: left;
  margin: 12px 0 18px;
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.dbt-ashrae-sizer .dbt-section-title{
  margin: 0 0 14px 0;
  font-size: clamp(18px, 2.2vw, 28px);
  font-weight: 750;
  letter-spacing: -0.01em;
  color: var(--dbt-subtext);
}

/* =========================================================
   GRID LAYOUT
   ========================================================= */
.dbt-ashrae-sizer .dbt-grid{
  width: 100%;
  max-width: 1280px;

  /* MAIN LEFT SHIFT — tweak this value to move more/less */
  margin-left: -300px;       /* push whole UI 80px further left */
  margin-right: auto;

  display: grid;
  grid-template-columns: 1.05fr 1.05fr 1.55fr;  /* wider results column */
  gap: var(--dbt-gap);
}

/* On medium screens, reduce / remove the left shift */
@media (max-width: 1200px){
  .dbt-ashrae-sizer .dbt-grid{
    margin-left: -40px;
  }
}

/* On tablets/phones, no negative margin */
@media (max-width: 900px){
  .dbt-ashrae-sizer .dbt-grid{
    margin-left: 0;
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 760px){
  .dbt-ashrae-sizer .dbt-grid{
    grid-template-columns: 1fr;
  }
}

/* ---------- Cards ---------- */
.dbt-ashrae-sizer .dbt-card{
  background: var(--dbt-bg);
  border: 1px solid var(--dbt-line);
  border-radius: var(--dbt-card-radius);
  padding: 20px 18px;
  box-shadow: var(--dbt-shadow);
}

/* ---------- Fields ---------- */
.dbt-ashrae-sizer .dbt-field{ margin-bottom: 14px; }
.dbt-ashrae-sizer .dbt-field:last-child{ margin-bottom: 0; }
.dbt-ashrae-sizer label{
  display:block;
  font-weight: 600;
  font-size: 14px;
  color: var(--dbt-subtext);
  margin: 0 0 6px 0;
}

/* ---------- Two-column rows ---------- */
.dbt-ashrae-sizer .dbt-two{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 16px;
}
@media (max-width: 640px){
  .dbt-ashrae-sizer .dbt-two{ grid-template-columns: 1fr; }
}

/* ---------- Inline row alignment (input + ?) ---------- */
.dbt-ashrae-sizer .dbt-inline{
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
}

/* ---------- Help Buttons ---------- */
.dbt-ashrae-sizer .dbt-helpbtn{
  position: static;
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid var(--dbt-line);
  background: #f3f4f6;
  color: #111827;
  font-weight: bold;
  cursor: pointer;
  flex: 0 0 30px;
}
.dbt-ashrae-sizer .dbt-helpbtn:hover{ background:#e5e7eb; }
.dbt-ashrae-sizer .dbt-helpbtn:focus{
  outline: 2px solid #93c5fd;
  outline-offset: 2px;
}

/* ---------- Inputs ---------- */
.dbt-ashrae-sizer input[type="number"],
.dbt-ashrae-sizer select{
  width: 100%;
  box-sizing: border-box;
  border:1px solid var(--dbt-line);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 14px;
  background: #fff;
  color: #0f172a;
}
.dbt-ashrae-sizer select{ height: 36px; }
.dbt-ashrae-sizer input[type="number"]:focus,
.dbt-ashrae-sizer select:focus{
  outline: 2px solid #93c5fd;
  outline-offset: 1px;
}

/* ---------- Stepper controls ---------- */
.dbt-ashrae-sizer .dbt-stepper{
  display:flex;
  align-items:center;
  gap:6px;
  width:100%;
}
.dbt-ashrae-sizer .dbt-stepper input[type="number"]{
  flex: 1 1 auto;
  min-width: 120px;
}
.dbt-ashrae-sizer .dbt-step{
  width: 34px;
  height: 30px;
  border-radius: 8px;
  border:1px solid var(--dbt-line);
  background: var(--dbt-soft);
  display:inline-grid;
  place-items:center;
  font-weight:700;
  cursor:pointer;
}
.dbt-ashrae-sizer .dbt-step:hover{ background:#eef2ff; }

/* ---------- Sliders ---------- */
.dbt-ashrae-sizer .dbt-rangewrap{ width:100%; }
.dbt-ashrae-sizer input[type="range"]{
  width:100%;
  background:transparent;
  height: 24px;
  margin: 0;
}
.dbt-ashrae-sizer input[type="range"]::-webkit-slider-runnable-track{
  height:6px; background:#e2e8f0; border-radius:999px;
}
.dbt-ashrae-sizer input[type="range"]::-webkit-slider-thumb{
  -webkit-appearance:none; width:18px; height:18px; border-radius:50%;
  background:#0ea5e9; margin-top:-6px;
  border:2px solid white; 
  box-shadow:0 1px 2px rgba(0,0,0,.12);
}

/* =========================================================
   RESULTS CHIP STYLING 
   ========================================================= */
.dbt-ashrae-sizer .dbt-kv{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  padding:10px 0;
  border-bottom:1px dashed var(--dbt-line);
  font-size: 15px;
}
.dbt-ashrae-sizer .dbt-kv:last-child{ border-bottom:none; padding-bottom:0; }
.dbt-ashrae-sizer .dbt-kv span{ color: var(--dbt-subtext); }

/* Centered blue ovals */
.dbt-ashrae-sizer .dbt-chip{
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;

  min-width: 120px;
  padding: 6px 14px;

  background:#ecfeff;
  border:1px solid #bae6fd;
  border-radius:999px;

  text-align:center;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 13px;
}

/* ---------- Warnings ---------- */
.dbt-ashrae-sizer .dbt-warnings{ margin-top: 6px; }
.dbt-ashrae-sizer .dbt-warn{
  background:#fee2e2;
  color:#b91c1c;
  border:1px solid #fecaca;
  padding:8px 10px;
  border-radius:8px;
  font-weight:600;
  margin-top:6px;
}

/* ---------- Tooltip ---------- */
.dbt-tooltip{
  position:absolute;
  z-index: 999999;
  transform: translate(-50%, -120%);
  background: #111827;
  color: #f9fafb;
  padding:10px 12px;
  max-width: 340px;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0,0,0,.25);
  font-size: 13px;
  line-height: 1.25;
  display:none;
}
.dbt-tooltip::after{
  content:"";
  position:absolute;
  left:50%; bottom:-6px;
  transform: translateX(-50%);
  border-left:6px solid transparent;
  border-right:6px solid transparent;
  border-top:6px solid #111827;
}

/* ---------- Utility ---------- */
.dbt-ashrae-sizer .grow{
  flex:1 1 auto;
  min-width: 160px;
}
