/* The roof panel calculator (tools/roof-panel-calculator.html). Its own
   file rather than more of styles.css, which is past the size guideline. */

.tool-intro {
  max-width: 560px;
  font-size: 15px;
  line-height: 1.7;
  color: var(--ink-muted);
}

.roof-diagrams {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 16px;
  margin-top: 6px;
}

.roof-diagram-figure {
  margin: 0;
}

.roof-diagram-figure figcaption {
  margin-top: 6px;
  font-size: 11px;
  color: var(--ink-muted);
  text-align: center;
}

/* Under a drawing: the section is only just short of another row */
.page .roof-diagram-near {
  margin: 6px 0 0;
  padding: 6px 8px;
  font-size: 11px;
  line-height: 1.5;
  color: var(--ink);
  background: #fff4ec;
  border-radius: 6px;
}

.roof-diagram {
  display: block;
  width: 100%;
  height: auto;
  max-height: 320px;
}

.roof-diagram-face {
  fill: #eef1f8;
  stroke: var(--ink-muted);
  stroke-width: 1.5;
  vector-effect: non-scaling-stroke;
}

/* a section counted from Google's panels: the area they cover, as one */
.roof-diagram-google {
  stroke: none;
}

.roof-diagram-panels rect {
  fill: var(--ink);
  stroke: var(--surface);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

.roof-diagram text {
  fill: var(--ink-muted);
  font-family: inherit;
  text-anchor: middle;
}

/* Columns sized to their contents, so the facing text wraps on a phone
   rather than running into the next column. */
.roof-table {
  table-layout: auto;
}

.roof-table thead th,
.roof-table tbody td {
  white-space: normal;
  overflow-wrap: normal;
  word-break: normal;
  vertical-align: top;
}

/* Straight after the headline results: where to go next with the size */
.page .roof-disclaimer {
  margin: 0 0 14px;
  padding: 10px 12px;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--ink);
  background: #fff4ec;
  border: 1px solid #f3c9ad;
  border-radius: 10px;
}

/* the same note under the intro, as wide as the intro and clear of it */
.page .roof-intro-note {
  max-width: 560px;
  margin: 12px 0 0;
}

.roof-next-steps {
  margin-top: 10px;
  padding: 10px 12px;
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--hairline);
  border-radius: 10px;
}

.page .roof-next-steps p {
  margin: 0;
  font-size: 12.5px;
  color: var(--ink);
}

.roof-next-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.roof-next-primary,
.roof-next-secondary {
  display: inline-block;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  text-decoration: none;
}

.roof-next-primary {
  color: #ffffff;
  background: var(--ink);
}

.roof-next-secondary {
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--ink);
}

.roof-next-primary:hover,
.roof-next-secondary:hover {
  opacity: 0.88;
}

.tool-section {
  margin-top: 30px;
}

.tool-section h2 {
  font-size: 17px;
}

.tool-section p {
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--ink-muted);
}

.tool-related {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
  margin-top: 30px;
  text-align: center;
}

.tool-related a {
  font-size: 13px;
  font-weight: 600;
}

/* Results */
.roof-size-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.roof-size-card {
  padding: 12px 14px;
  background: var(--bg);
  border: 1px solid var(--hairline);
  border-radius: 10px;
}

.roof-size-card p {
  margin: 0;
}

.page .roof-size-name {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink);
}

.page .roof-size-note {
  font-size: 11px;
  color: var(--ink-muted);
}

.roof-size-card .roof-size-panels {
  margin-top: 8px;
  font-size: 14.5px;
  color: var(--ink);
}

.roof-size-number {
  font-family: 'Fraunces', serif;
  font-size: 34px;
  font-weight: 700;
  line-height: 1.1;
}

.page .roof-size-kwp {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--ink);
}

.roof-size-card .roof-size-working {
  margin-top: 2px;
  font-size: 11px;
  color: var(--ink-muted);
}

.roof-table th:nth-child(2),
.roof-table td:nth-child(2) {
  text-align: left;
}

.roof-row-note {
  display: block;
  font-size: 11px;
}

.roof-drawing-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.roof-drawing-size {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: var(--ink-muted);
}

.roof-drawing-size .roi-select {
  width: auto;
}

.roof-plan-wrap {
  max-width: 420px;
  margin: 8px auto 16px;
}

.roof-plan {
  display: block;
  width: 100%;
  height: auto;
  max-height: 340px;
}

.roof-plan-face {
  fill: #fbe3d6;
  stroke: var(--ink-muted);
  stroke-width: 1.5;
  vector-effect: non-scaling-stroke;
}

.roof-plan .roof-plan-label {
  font-weight: 700;
}

.roof-plan text {
  fill: var(--ink);
  font-family: inherit;
  font-weight: 600;
  text-anchor: middle;
}

.roof-plan .roof-plan-count {
  fill: var(--ink-muted);
  font-weight: 400;
}

.roof-plan-north path {
  stroke: var(--ink-muted);
  stroke-width: 1.5;
  vector-effect: non-scaling-stroke;
}

/* Google's required credit for the roof data: their exact words, Roboto,
   one of their greys, kept small and apart at the foot of the results */
.page .roof-data-credit {
  margin: 14px 0 0;
  font-family: 'Roboto', sans-serif;
  font-weight: 400;
  font-size: 12px;
  color: #5e5e5e;
  white-space: nowrap;
}

@media (max-width: 600px) {
  .roof-size-cards {
    grid-template-columns: 1fr;
  }
}

/* The address box and the addresses suggested as you type */
/* the list runs the full width of the row, under the Find button too */
.roof-address-row {
  position: relative;
}

.roof-address-box {
  flex: 1;
  min-width: 0;
}

/* .page ul (styles.css) indents lists; this one sits flush */
.page .roof-address-list {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  z-index: 20;
  margin: 4px 0 0;
  padding: 4px 0;
  list-style: none;
  max-height: 264px;
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(27, 36, 86, 0.14);
}

.roof-address-list li {
  padding: 8px 12px;
  font-size: 13px;
  line-height: 1.4;
  color: var(--ink);
  cursor: pointer;
}

.roof-address-list li:hover,
.roof-address-list li[aria-selected='true'] {
  background: var(--bg);
}

.roof-address-hint,
.roof-address-credit {
  display: block;
}

.roof-address-credit {
  margin-top: 2px;
  font-size: 10.5px;
  color: var(--ink-muted);
}
