/* RoofScour Roof Inspection Checklist — inspection.css */

/* ── Wrap ── */
.rif-wrap {
  font-family: 'DM Sans', sans-serif;
  background: #ffffff;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(26,31,46,0.12);
  max-width: 860px;
  margin: 0 auto;
  box-shadow: 0 4px 24px rgba(26,31,46,0.08);
}

/* ── Header ── */
.rif-header {
  background: #1a1f2e;
  padding: 18px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
}
.rif-header-left {
  display: flex;
  align-items: center;
  gap: 14px;
}
.rif-header-icon {
  width: 44px;
  height: 44px;
  background: rgba(200,131,42,0.15);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.rif-header-title {
  font-family: 'DM Serif Display', serif;
  font-size: 17px;
  color: #f5f0e8;
  font-weight: 400;
}
.rif-header-sub {
  font-size: 12px;
  color: rgba(245,240,232,0.45);
  margin-top: 2px;
}
.rif-type-tabs {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}
.rif-type-tab {
  padding: 6px 14px;
  border: 1px solid rgba(245,240,232,0.15);
  background: transparent;
  color: rgba(245,240,232,0.5);
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  font-weight: 500;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s;
}
.rif-type-tab:hover { color: #f5f0e8; border-color: rgba(245,240,232,0.3); }
.rif-type-tab.active {
  background: #c8832a;
  border-color: #c8832a;
  color: #ffffff;
}

/* ── Property details ── */
.rif-details {
  background: #f5f0e8;
  padding: 18px 28px;
  border-bottom: 1px solid rgba(26,31,46,0.08);
}
.rif-details-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px;
}
.rif-detail-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.rif-detail-field label {
  font-size: 11px;
  font-weight: 600;
  color: #4a5268;
}
.rif-optional {
  font-size: 10px;
  color: #888780;
  font-weight: 400;
}
.rif-detail-field input,
.rif-detail-field select {
  appearance: none;
  -webkit-appearance: none;
  background: #ffffff;
  border: 1px solid rgba(26,31,46,0.15);
  border-radius: 7px;
  padding: 9px 12px;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  color: #1a1f2e;
  transition: border-color 0.15s;
}
.rif-detail-field input:focus,
.rif-detail-field select:focus {
  outline: none;
  border-color: #c8832a;
  box-shadow: 0 0 0 3px rgba(200,131,42,0.1);
}

/* ── Safety notice ── */
.rif-safety {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 13px 28px;
  background: #e4f5f0;
  border-bottom: 1px solid rgba(30,122,110,0.15);
  font-size: 12px;
  color: #0F6E56;
  line-height: 1.6;
}
.rif-safety svg { flex-shrink: 0; margin-top: 1px; }
.rif-safety p { margin: 0; }

/* ── Sections ── */
.rif-section {
  border-bottom: 1px solid rgba(26,31,46,0.08);
}
.rif-section-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 28px 14px;
  background: #fafaf8;
  border-bottom: 1px solid rgba(26,31,46,0.06);
}
.rif-section-icon {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.rif-icon-amber { background: #fdf3e3; color: #c8832a; }
.rif-icon-teal  { background: #e4f5f0; color: #1e7a6e; }
.rif-section-title {
  font-size: 14px;
  font-weight: 600;
  color: #1a1f2e;
}
.rif-section-sub {
  font-size: 11px;
  color: #4a5268;
  margin-top: 2px;
}
.rif-section-score {
  margin-left: auto;
  font-size: 12px;
  font-weight: 600;
  color: #4a5268;
  background: #f5f0e8;
  padding: 4px 12px;
  border-radius: 20px;
  white-space: nowrap;
}

/* ── Item groups ── */
.rif-items { padding: 0 28px 16px; }
.rif-item-group { margin-top: 18px; }
.rif-item-group-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #888780;
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(26,31,46,0.06);
}

/* ── Items ── */
.rif-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 11px 0;
  border-bottom: 1px solid rgba(26,31,46,0.05);
}
.rif-item:last-child { border-bottom: none; }
.rif-item-checks {
  display: flex;
  gap: 5px;
  flex-shrink: 0;
  padding-top: 2px;
}
.rif-radio-label { cursor: pointer; }
.rif-radio-label input { display: none; }
.rif-radio {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  padding: 4px 9px;
  border-radius: 5px;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: all 0.12s;
  letter-spacing: 0.04em;
  user-select: none;
}
.rif-pass { background: #f5f0e8; color: #888780; border-color: rgba(26,31,46,0.12); }
.rif-fail { background: #f5f0e8; color: #888780; border-color: rgba(26,31,46,0.12); }
.rif-na   { background: #f5f0e8; color: #888780; border-color: rgba(26,31,46,0.12); }

input[type="radio"]:checked + .rif-pass { background: #e4f5f0; color: #0F6E56; border-color: #1e7a6e; }
input[type="radio"]:checked + .rif-fail { background: #FCEBEB; color: #A32D2D; border-color: #A32D2D; }
input[type="radio"]:checked + .rif-na   { background: #f5f0e8; color: #888780; border-color: #888780; }

.rif-item-text { flex: 1; }
.rif-item-text strong {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #1a1f2e;
  line-height: 1.3;
  margin-bottom: 2px;
}
.rif-item-text span {
  font-size: 11px;
  color: #4a5268;
  line-height: 1.5;
}

/* ── Notes ── */
.rif-notes-section {
  padding: 16px 28px;
  border-top: 1px solid rgba(26,31,46,0.08);
  background: #fafaf8;
}
.rif-notes-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: #4a5268;
  margin-bottom: 6px;
}
.rif-notes {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid rgba(26,31,46,0.15);
  border-radius: 8px;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  color: #1a1f2e;
  background: #ffffff;
  resize: vertical;
  box-sizing: border-box;
  transition: border-color 0.15s;
}
.rif-notes:focus { outline: none; border-color: #c8832a; box-shadow: 0 0 0 3px rgba(200,131,42,0.1); }
.rif-notes::placeholder { color: rgba(26,31,46,0.35); }

/* ── Results ── */
.rif-results {
  background: #1a1f2e;
  padding: 24px 28px;
}
.rif-results-top {
  display: flex;
  align-items: flex-start;
  gap: 24px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.rif-overall-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(245,240,232,0.38);
  margin-bottom: 8px;
}
.rif-overall-status {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid transparent;
  white-space: nowrap;
}
.rif-score-bars {
  flex: 1;
  min-width: 200px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  justify-content: center;
}
.rif-score-bar-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: rgba(245,240,232,0.5);
}
.rif-score-bar-item span:first-child { min-width: 54px; }
.rif-bar-track {
  flex: 1;
  height: 6px;
  background: rgba(245,240,232,0.1);
  border-radius: 4px;
  overflow: hidden;
}
.rif-bar-fill {
  height: 100%;
  width: 0%;
  border-radius: 4px;
  background: #c8832a;
  transition: width 0.5s ease, background 0.3s;
}
.rif-bar-pct {
  min-width: 32px;
  text-align: right;
  font-weight: 600;
  color: rgba(245,240,232,0.7);
}

/* ── Fails ── */
.rif-fails {
  margin-bottom: 16px;
}
.rif-fails-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(245,240,232,0.38);
  margin-bottom: 8px;
}
.rif-fails-list { display: flex; flex-direction: column; gap: 5px; }
.rif-fail-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 12px;
  color: rgba(245,240,232,0.65);
  padding: 7px 10px;
  background: rgba(255,255,255,0.05);
  border-radius: 6px;
}
.rif-fail-item svg { flex-shrink: 0; margin-top: 1px; color: #e09840; }
.rif-fail-urgent { background: rgba(163,45,45,0.15); }
.rif-fail-urgent svg { color: #F09595; }
.rif-fail-urgent span strong { color: #F09595; }

/* ── Pro advice ── */
.rif-pro-advice {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 13px 15px;
  background: rgba(200,131,42,0.12);
  border: 1px solid rgba(200,131,42,0.25);
  border-radius: 8px;
  font-size: 12px;
  color: #e09840;
  line-height: 1.6;
  margin-bottom: 18px;
}
.rif-pro-advice svg { flex-shrink: 0; margin-top: 1px; }
.rif-pro-advice div { flex: 1; }

/* ── Actions ── */
.rif-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.rif-btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 11px 20px;
  background: #c8832a;
  color: #ffffff !important;
  border: none;
  border-radius: 8px;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none !important;
  transition: background 0.15s;
  white-space: nowrap;
}
.rif-btn-primary:hover { background: #e09840; }
.rif-btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 11px 18px;
  background: transparent;
  color: rgba(245,240,232,0.7);
  border: 1px solid rgba(245,240,232,0.2);
  border-radius: 8px;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
}
.rif-btn-secondary:hover { color: #f5f0e8; border-color: rgba(245,240,232,0.4); }
.rif-btn-ghost {
  display: inline-flex;
  align-items: center;
  padding: 11px 16px;
  background: transparent;
  color: rgba(245,240,232,0.4);
  border: none;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  cursor: pointer;
  transition: color 0.15s;
}
.rif-btn-ghost:hover { color: rgba(245,240,232,0.7); }

/* ── CTA ── */
.rif-cta {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(200,131,42,0.25);
  border-radius: 10px;
  padding: 18px 20px;
  margin-top: 4px;
}
.rif-cta-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.rif-cta-text { display: flex; flex-direction: column; gap: 3px; }
.rif-cta-text strong { font-size: 13px; font-weight: 600; color: #f5f0e8; }
.rif-cta-text span   { font-size: 11px; color: rgba(245,240,232,0.4); }

/* ── Responsive ── */
@media (max-width: 600px) {
  .rif-header       { padding: 16px 18px; }
  .rif-header-left  { flex-wrap: wrap; }
  .rif-details      { padding: 14px 18px; }
  .rif-safety       { padding: 12px 18px; }
  .rif-section-header { padding: 14px 18px 12px; }
  .rif-items        { padding: 0 18px 12px; }
  .rif-notes-section{ padding: 14px 18px; }
  .rif-results      { padding: 18px 18px; }
  .rif-item-checks  { flex-direction: column; gap: 3px; }
  .rif-results-top  { flex-direction: column; }
  .rif-cta-inner    { flex-direction: column; align-items: flex-start; }
  .rif-btn-primary  { width: 100%; justify-content: center; }
  .rif-type-tabs    { display: none; }
}

/* ── Print styles ── */
@media print {
  .rif-header, .rif-type-tabs, .rif-actions,
  .rif-cta, .rif-notes-section { display: none !important; }
  .rif-wrap { box-shadow: none; border: 1px solid #ddd; }
  .rif-results { background: #fff; color: #1a1f2e; }
}
