/* ServicePro Field Checklist — Service Checklist Plugin Styles */
/* Version 1.0.0 */

.hvac-wrap {
  --navy:    #001C32;
  --blue:    #5D90C0;
  --orange:  #E07820;
  --blue-lt: #9FBDDA;
  --blue-dk: #3A6A96;
  --white:   #FFFFFF;
  --gray-50: #F8FAFC;
  --gray-100:#F1F5F9;
  --gray-200:#E2E8F0;
  --gray-300:#CBD5E1;
  --gray-400:#94A3B8;
  --gray-500:#6B7280;
  --gray-600:#475569;
  --gray-700:#334155;
  --gray-900:#0F172A;
  --green:   #10B981;
  --green-lt:#D1FAE5;
  --amber:   #F59E0B;
  --amber-lt:#FEF3C7;
  --red:     #EF4444;
  --red-lt:  #FEE2E2;
  --shadow:  0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.08);
  --radius:  10px;
  font-family: 'Barlow', sans-serif;
  color: var(--navy);
  background: var(--gray-100);
  padding: 0 0 80px 0;
}

/* Google Fonts import */
@import url('https://fonts.googleapis.com/css2?family=Barlow:wght@400;500;600;700;800&family=Barlow+Condensed:wght@600;700;800&family=JetBrains+Mono:wght@400;500&display=swap');

/* ── CHECKLIST HEADER ─────────────────────────────────────────────────────── */
.hvac-header {
  background: var(--navy);
  border-radius: var(--radius) var(--radius) 0 0;
  overflow: hidden;
  margin-bottom: 12px;
  position: sticky;
  top: 32px; /* account for WP admin bar */
  z-index: 99;
  box-shadow: 0 2px 8px rgba(0,0,0,0.35);
}

.hvac-header-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  border-bottom: 3px solid var(--orange);
}

.hvac-brand h2 {
  font-family: 'Barlow Condensed', sans-serif !important;
  font-size: 18px !important;
  font-weight: 800 !important;
  color: var(--white) !important;
  margin: 0 !important;
  padding: 0 !important;
  line-height: 1.1 !important;
  letter-spacing: 0.5px;
  border: none !important;
}

.hvac-brand p {
  font-size: 11px;
  color: var(--blue-lt);
  font-weight: 500;
  margin: 0 !important;
}

.hvac-contact {
  text-align: right;
}

.hvac-contact .hvac-phone {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: var(--white);
  display: block;
}

.hvac-contact .hvac-site {
  font-size: 10px;
  color: var(--blue-lt);
}

/* ── PROGRESS BAR ─────────────────────────────────────────────────────────── */
.hvac-progress {
  background: var(--blue-dk);
  padding: 8px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.hvac-progress-track {
  flex: 1;
  height: 6px;
  background: rgba(255,255,255,0.2);
  border-radius: 99px;
  overflow: hidden;
}

.hvac-progress-fill {
  height: 100%;
  background: var(--orange);
  border-radius: 99px;
  transition: width 0.3s ease;
  width: 0%;
}

.hvac-progress-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--white);
  white-space: nowrap;
  font-family: 'JetBrains Mono', monospace;
}

/* ── JOB INFO ──────────────────────────────────────────────────────────────── */
.hvac-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  margin-bottom: 12px;
}

.hvac-section-label {
  background: var(--navy);
  color: var(--white);
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1px;
  padding: 8px 14px;
  text-transform: uppercase;
}

.hvac-job-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.hvac-job-field {
  padding: 10px 14px;
  border-bottom: 1px solid var(--gray-200);
  border-right: 1px solid var(--gray-200);
}

.hvac-job-field:nth-child(even) { border-right: none; }
.hvac-job-field.hvac-full { grid-column: 1 / -1; border-right: none; }

.hvac-job-field label {
  display: block;
  font-size: 10px;
  font-weight: 700;
  color: var(--gray-400);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 3px !important;
}

.hvac-job-field input,
.hvac-job-field select {
  width: 100%;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  font-family: 'Barlow', sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: var(--gray-900);
  background: transparent;
  padding: 0 !important;
}

/* ── SCOPE ─────────────────────────────────────────────────────────────────── */
.hvac-scope-toggle {
  background: var(--navy);
  color: var(--white);
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1px;
  padding: 8px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  text-transform: uppercase;
  border: none;
  width: 100%;
  text-align: left;
}

.hvac-scope-toggle .hvac-arrow { transition: transform 0.2s; font-size: 10px; }
.hvac-scope-toggle.hvac-open .hvac-arrow { transform: rotate(180deg); }

.hvac-scope-body { display: none; padding: 10px 14px; background: var(--white); }
.hvac-scope-body.hvac-open { display: block; }

.hvac-scope-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 12px;
}

.hvac-scope-item {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  padding: 4px 0;
  font-size: 12px;
  color: var(--gray-700);
  line-height: 1.4;
}

.hvac-scope-item .hvac-tick { color: var(--blue); font-weight: 700; flex-shrink: 0; margin-top: 1px; }

.hvac-coil-note {
  background: var(--amber-lt);
  border-left: 3px solid var(--amber);
  border-radius: 0 6px 6px 0;
  padding: 8px 12px;
  margin-top: 10px;
  font-size: 11px;
  font-weight: 600;
  color: #92400E;
  line-height: 1.5;
}

/* ── UNITS LABEL ───────────────────────────────────────────────────────────── */
.hvac-units-label {
  background: var(--navy);
  color: var(--white);
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1px;
  padding: 8px 14px;
  border-radius: var(--radius);
  text-transform: uppercase;
  margin-bottom: 8px;
}

/* ── UNIT CARD ─────────────────────────────────────────────────────────────── */
.hvac-unit {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  margin-bottom: 10px;
  transition: box-shadow 0.2s;
}

.hvac-unit.hvac-complete { box-shadow: 0 0 0 2px var(--green), var(--shadow); }
.hvac-unit.hvac-partial  { box-shadow: 0 0 0 2px var(--amber), var(--shadow); }

.hvac-unit-header {
  background: var(--blue);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.hvac-unit-header:active { background: var(--blue-dk); }

.hvac-unit-header-left { display: flex; align-items: center; gap: 10px; }

.hvac-unit-badge {
  background: rgba(255,255,255,0.2);
  color: var(--white);
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 14px;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 99px;
  letter-spacing: 0.5px;
}

.hvac-unit-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: var(--white);
}

.hvac-unit-header-right { display: flex; align-items: center; gap: 8px; }

.hvac-status-pill {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 99px;
  background: rgba(255,255,255,0.15);
  color: var(--white);
  font-family: 'JetBrains Mono', monospace;
}

.hvac-status-pill.hvac-done    { background: var(--green); }
.hvac-status-pill.hvac-partial { background: var(--amber); color: var(--navy); }

.hvac-chevron { color: rgba(255,255,255,0.7); font-size: 12px; transition: transform 0.2s; }
.hvac-unit.hvac-open .hvac-chevron { transform: rotate(180deg); }

/* ── UNIT BODY ─────────────────────────────────────────────────────────────── */
.hvac-unit-body { display: none; padding: 12px 14px; }
.hvac-unit.hvac-open .hvac-unit-body { display: block; }

.hvac-check-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px 8px;
  margin-bottom: 10px;
}

.hvac-check-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

.hvac-check-item:hover { background: var(--gray-50); }
.hvac-check-item.hvac-checked { background: var(--green-lt); }

.hvac-check-item input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  min-width: 20px;
  border: 2px solid var(--gray-300) !important;
  border-radius: 5px;
  cursor: pointer;
  position: relative;
  transition: all 0.15s;
  background: var(--white);
  margin-top: 1px;
  box-shadow: none !important;
}

.hvac-check-item input[type="checkbox"]:checked {
  background: var(--blue) !important;
  border-color: var(--blue) !important;
}

.hvac-check-item input[type="checkbox"]:checked::after {
  content: '';
  position: absolute;
  left: 5px;
  top: 2px;
  width: 6px;
  height: 10px;
  border: 2px solid white;
  border-top: none;
  border-left: none;
  transform: rotate(45deg);
}

.hvac-check-item span {
  font-size: 13px;
  color: var(--gray-700);
  line-height: 1.4;
  font-weight: 500;
}

.hvac-check-item.hvac-checked span {
  color: var(--gray-500);
  text-decoration: line-through;
  text-decoration-color: var(--green);
}

.hvac-unit-note {
  background: var(--gray-50);
  border-left: 3px solid var(--blue-lt);
  padding: 6px 10px;
  font-size: 11px;
  color: var(--gray-600);
  font-style: italic;
  border-radius: 0 4px 4px 0;
  margin-bottom: 10px;
  line-height: 1.5;
}

/* ── READINGS ──────────────────────────────────────────────────────────────── */
.hvac-readings {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-bottom: 10px;
}

.hvac-reading {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: 6px;
  padding: 6px 8px;
}

.hvac-reading label {
  display: block;
  font-size: 9px;
  font-weight: 700;
  color: var(--gray-400);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 2px !important;
}

.hvac-reading input {
  width: 100%;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  background: transparent;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  color: var(--gray-900);
  font-weight: 500;
  padding: 0 !important;
}

/* ── UNIT BOTTOM ───────────────────────────────────────────────────────────── */
.hvac-unit-bottom {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 6px;
  align-items: stretch;
}

.hvac-notes, .hvac-initials, .hvac-status {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: 6px;
  padding: 6px 8px;
}

.hvac-notes label, .hvac-initials label, .hvac-status label {
  display: block;
  font-size: 9px;
  font-weight: 700;
  color: var(--gray-400);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 2px !important;
}

.hvac-notes input, .hvac-initials input {
  width: 100%;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  background: transparent;
  font-family: 'Barlow', sans-serif;
  font-size: 13px;
  color: var(--gray-900);
  padding: 0 !important;
}

.hvac-initials { min-width: 80px; }
.hvac-initials input { text-align: center; font-family: 'JetBrains Mono', monospace; font-size: 14px; font-weight: 600; }
.hvac-status { min-width: 120px; }

.hvac-status-btns { display: flex; gap: 4px; }

.hvac-status-btn {
  flex: 1;
  border: none !important;
  border-radius: 4px;
  padding: 4px 6px;
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
  font-family: 'Barlow', sans-serif;
  transition: all 0.15s;
  background: var(--gray-200);
  color: var(--gray-600);
  -webkit-tap-highlight-color: transparent;
}

.hvac-status-btn.hvac-ok.hvac-active     { background: var(--green); color: white; }
.hvac-status-btn.hvac-mon.hvac-active    { background: var(--amber); color: var(--navy); }
.hvac-status-btn.hvac-action.hvac-active { background: var(--red);   color: white; }

/* ── SIGN-OFF ───────────────────────────────────────────────────────────────  */
.hvac-signoff-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0;
  padding: 12px 14px;
  border-bottom: 1px solid var(--gray-200);
}

.hvac-signoff-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  cursor: pointer;
  border-radius: 6px;
  transition: background 0.15s;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.hvac-signoff-item:hover { background: var(--gray-50); }
.hvac-signoff-item.hvac-checked { background: var(--green-lt); }

.hvac-signoff-item input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  min-width: 18px;
  border: 2px solid var(--gray-300) !important;
  border-radius: 4px;
  cursor: pointer;
  position: relative;
  transition: all 0.15s;
  background: var(--white);
  box-shadow: none !important;
}

.hvac-signoff-item input:checked {
  background: var(--blue) !important;
  border-color: var(--blue) !important;
}

.hvac-signoff-item input:checked::after {
  content: '';
  position: absolute;
  left: 4px;
  top: 1px;
  width: 5px;
  height: 9px;
  border: 2px solid white;
  border-top: none;
  border-left: none;
  transform: rotate(45deg);
}

.hvac-signoff-item span { font-size: 12px; color: var(--gray-700); font-weight: 500; }
.hvac-signoff-item.hvac-checked span { text-decoration: line-through; color: var(--gray-400); }

.hvac-sig-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 12px 14px;
}

.hvac-sig-block label {
  display: block;
  font-size: 10px;
  font-weight: 700;
  color: var(--gray-400);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px !important;
}

.hvac-sig-line {
  width: 100%;
  border: none !important;
  border-bottom: 2px solid var(--gray-300) !important;
  outline: none !important;
  box-shadow: none !important;
  padding: 4px 0 !important;
  font-family: 'Barlow', sans-serif;
  font-size: 14px;
  color: var(--gray-900);
  background: transparent;
}

.hvac-sig-date {
  font-size: 10px;
  color: var(--gray-400);
  margin-top: 4px;
}

.hvac-sig-date input {
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  font-size: 10px;
  color: var(--gray-600);
  background: transparent;
  padding: 0 !important;
}

.hvac-disclaimer {
  font-size: 11px;
  color: var(--gray-400);
  font-style: italic;
  padding: 0 14px 12px;
}

/* ── ACTION BAR ─────────────────────────────────────────────────────────────  */
.hvac-action-bar {
  position: sticky;
  bottom: 0;
  background: var(--white);
  border-top: 1px solid var(--gray-200);
  padding: 10px 16px;
  display: flex;
  gap: 10px;
  z-index: 98;
  box-shadow: 0 -2px 8px rgba(0,0,0,0.1);
  border-radius: 0 0 var(--radius) var(--radius);
}

.hvac-btn {
  flex: 1;
  padding: 12px;
  border: none !important;
  border-radius: 8px;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: all 0.15s;
  -webkit-tap-highlight-color: transparent;
}

.hvac-btn-secondary {
  background: var(--gray-100);
  color: var(--gray-700);
  border: 1px solid var(--gray-200) !important;
}

.hvac-btn-primary { background: var(--orange); color: var(--white); }
.hvac-btn-primary:hover { background: #C46810; }
.hvac-btn-secondary:hover { background: var(--gray-200); }

/* ── RESPONSIVE ─────────────────────────────────────────────────────────────  */
@media (max-width: 600px) {
  .hvac-check-grid    { grid-template-columns: 1fr; }
  .hvac-job-grid      { grid-template-columns: 1fr; }
  .hvac-job-field     { border-right: none !important; }
  .hvac-scope-grid    { grid-template-columns: 1fr; }
  .hvac-readings      { grid-template-columns: 1fr 1fr; }
  .hvac-unit-bottom   { grid-template-columns: 1fr; }
  .hvac-signoff-grid  { grid-template-columns: 1fr; }
  .hvac-sig-row       { grid-template-columns: 1fr; }
}

/* ── PRINT ──────────────────────────────────────────────────────────────────  */
@media print {
  .hvac-action-bar    { display: none !important; }
  .hvac-header        { position: relative !important; top: 0 !important; }
  .hvac-unit-body     { display: block !important; }
  .hvac-unit          { break-inside: avoid; }
  .hvac-wrap    { background: white; }
}

/* ── SUBMIT BUTTON ──────────────────────────────────────────────────────────  */
.hvac-btn-submit {
  background: #001C32;
  color: #FFFFFF;
  border: 2px solid #E07820 !important;
  font-size: 14px;
}

.hvac-btn-submit:hover { background: #0D2D47; }
.hvac-btn-submit:disabled { background: #10B981; border-color: #10B981 !important; cursor: default; }
