/* ConcretePlanner Calculators - shared styles.
   Brand palette: charcoal #171E20, rust #EF5100, paper #F7F5F2,
   sand #EDE8E1, line #DDD5C9. */

.cp-calc {
  background: #FFFFFF;
  border: 1px solid #DDD5C9;
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(35, 32, 29, 0.06);
  color: #171E20;
  font-family: 'Poppins', Arial, Helvetica, sans-serif;
  line-height: 1.55;
  margin: 0 auto 22px;
  max-width: 960px;
  padding: 22px;
}

.cp-calc * {
  box-sizing: border-box;
}

.cp-calc .cp-title {
  font-family: 'Poppins', Arial, Helvetica, sans-serif;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.3;
  margin: 0 0 6px;
}

.cp-calc .cp-title .cp-accent {
  color: #EF5100;
}

.cp-calc .cp-sub {
  color: #171E20;
  font-size: 14px;
  margin: 0 0 16px;
}

.cp-calc .cp-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.cp-calc .cp-grid + .cp-grid {
  margin-top: 12px;
}

.cp-calc label {
  display: block;
  font-size: 13px;
  font-weight: bold;
  margin-bottom: 5px;
}

.cp-calc input[type="number"],
.cp-calc input[type="text"],
.cp-calc select {
  background: #FFFFFF;
  border: 1px solid #DDD5C9;
  border-radius: 6px;
  color: #171E20;
  font-family: 'Poppins', Arial, Helvetica, sans-serif;
  font-size: 16px;
  padding: 10px;
  width: 100%;
}

.cp-calc input[type="number"]:focus,
.cp-calc input[type="text"]:focus,
.cp-calc select:focus {
  border-color: #EF5100;
  outline: 2px solid #EF5100;
  outline-offset: 0;
}

.cp-calc .cp-results {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  margin-top: 18px;
}

.cp-calc .cp-result {
  background: #EDE8E1;
  border-radius: 8px;
  padding: 14px 10px;
  text-align: center;
}

.cp-calc .cp-result .cp-num {
  color: #EF5100;
  display: block;
  font-size: 26px;
  font-weight: bold;
  line-height: 1.2;
}

.cp-calc .cp-result .cp-lbl {
  display: block;
  font-size: 12px;
  letter-spacing: 0.5px;
  margin-top: 2px;
  text-transform: uppercase;
}

.cp-calc .cp-result-main {
  background: #171E20;
}

.cp-calc .cp-result-main .cp-num {
  color: #FFFFFF;
}

.cp-calc .cp-result-main .cp-lbl {
  color: #EDE8E1;
}

.cp-calc .cp-preview {
  background: #F7F5F2;
  border: 1px solid #DDD5C9;
  border-radius: 8px;
  margin-top: 18px;
  padding: 14px;
}

.cp-calc .cp-pv-head {
  display: flex;
  font-size: 13px;
  font-weight: 700;
  justify-content: space-between;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.cp-calc .cp-pv-dims {
  color: #EF5100;
}

.cp-calc .cp-pv-stage {
  align-items: center;
  background-image: linear-gradient(#EDE8E1 1px, transparent 1px), linear-gradient(90deg, #EDE8E1 1px, transparent 1px);
  background-size: 22px 22px;
  border-radius: 6px;
  display: flex;
  height: 170px;
  justify-content: center;
  margin-top: 10px;
}

.cp-calc .cp-pv-slab {
  align-items: center;
  background: rgba(239, 81, 0, 0.14);
  border: 2px solid #EF5100;
  border-radius: 4px;
  color: #171E20;
  display: flex;
  font-size: 13px;
  font-weight: 700;
  justify-content: center;
  min-height: 36px;
  min-width: 60px;
  transition: all 0.25s ease;
}

.cp-calc .cp-pv-slab.cp-pv-round {
  border-radius: 50%;
}

.cp-calc .cp-pv-note {
  color: #5A5348;
  font-size: 12px;
  margin: 10px 0 0;
}

.cp-calc .cp-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.cp-calc .cp-btn {
  background: #FFFFFF;
  border: 2px solid #171E20;
  border-radius: 999px;
  color: #171E20;
  cursor: pointer;
  font-family: 'Poppins', Arial, Helvetica, sans-serif;
  font-size: 14px;
  font-weight: 700;
  padding: 10px 20px;
  transition: all 0.25s ease;
}

.cp-calc .cp-btn:hover {
  background: #171E20;
  color: #FFFFFF;
}

.cp-calc .cp-btn-primary {
  background: #EF5100;
  border-color: #EF5100;
  color: #FFFFFF;
}

.cp-calc .cp-btn-primary:hover {
  background: #171E20;
  border-color: #171E20;
  color: #FFFFFF;
}

.cp-calc .cp-copied {
  align-self: center;
  color: #2E7D32;
  font-size: 13px;
  font-weight: 600;
}

.cp-calc .cp-note {
  background: #F7F5F2;
  border: 1px solid #DDD5C9;
  border-radius: 8px;
  font-size: 13px;
  margin: 16px 0 0;
  padding: 12px 14px;
}

.cp-calc .cp-fineprint {
  font-size: 12px;
  margin: 12px 0 0;
}

@media (max-width: 600px) {
  .cp-calc {
    padding: 16px;
  }

  .cp-calc .cp-results {
    grid-template-columns: repeat(2, 1fr);
  }

  .cp-calc .cp-result .cp-num {
    font-size: 22px;
  }
}

/* Ad placeholder (the [cp_ad] shortcode). Real ad code replaces the box later. */
.cp-ad {
  max-width: 970px;
  margin: 0 auto 40px;
  text-align: center;
}

.cp-ad-label {
  display: block;
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #A39E93;
  margin-bottom: 6px;
}

.cp-ad-box {
  background: #EDE8E1;
  border: 1px dashed #C9BFA9;
  border-radius: 12px;
  min-height: 110px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #8A8172;
  font-size: 14px;
  padding: 16px;
}

@media (max-width: 640px) {
  .cp-ad-box {
    min-height: 100px;
  }
}

/* Full width tool page layout (calculator pages get the cp-toolpage body class). */
body.cp-toolpage .site-content {
  max-width: 100%;
  padding-left: 20px;
  padding-right: 20px;
}

body.cp-toolpage .inside-article {
  background: transparent;
  box-shadow: none;
  padding: 0;
}

body.cp-toolpage .entry-title {
  display: none;
}

body.cp-toolpage .entry-content {
  margin-top: 0;
}

body.cp-toolpage .separate-containers .site-main {
  margin-top: 10px;
  margin-bottom: 10px;
}

/* Tool pages: drop the theme right sidebar so the content runs full width. */
body.cp-toolpage:not(.home) .site-content .content-area {
  width: 100%;
}

body.cp-toolpage:not(.home) .is-right-sidebar {
  display: none;
}

/* ---- Single post design (v1.3.0) ---- */
body.single-post .inside-article {
  background: transparent;
  box-shadow: none;
  padding: 6px 0 0;
}
.cp-chip {
  display: inline-block;
  background: #EF5100;
  color: #FFFFFF;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .05em;
  text-transform: uppercase;
  padding: 5px 14px;
  border-radius: 999px;
  text-decoration: none;
  margin-bottom: 14px;
}
body.single-post .entry-title {
  font-size: 36px;
  font-weight: 800;
  line-height: 1.16;
  color: #171E20;
  margin-bottom: 12px;
}
body.single-post .entry-meta {
  color: #8A8172;
  font-size: 14px;
  margin-bottom: 22px;
}
body.single-post .entry-meta .avatar {
  border-radius: 50%;
  vertical-align: -8px;
  margin-right: 6px;
}
body.single-post .post-image img,
body.single-post .featured-image img {
  width: 100%;
  border-radius: 20px;
  display: block;
}
body.single-post .entry-content {
  font-size: 17px;
  line-height: 1.75;
  color: #33302A;
}
body.single-post .entry-content h2 {
  font-size: 25px;
  font-weight: 700;
  color: #171E20;
  line-height: 1.3;
  margin: 34px 0 12px;
}
body.single-post .entry-content h3 {
  font-size: 20px;
  font-weight: 700;
  color: #171E20;
  margin: 26px 0 10px;
}
body.single-post .entry-content a { color: #EF5100; }
body.single-post .entry-content table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid #E7E0D2;
  border-radius: 14px;
  overflow: hidden;
  margin: 18px 0;
  font-size: 15px;
}
body.single-post .entry-content th {
  background: #171E20;
  color: #FFFFFF;
  text-align: left;
  padding: 12px 16px;
}
body.single-post .entry-content td {
  padding: 11px 16px;
  border-top: 1px solid #EFE9DC;
  background: #FFFFFF;
}
.cp-tip {
  background: #EDE8E1;
  border-left: 4px solid #EF5100;
  border-radius: 12px;
  padding: 16px 20px;
  margin: 20px 0;
  font-size: 16px;
}
body.single-post .entry-content .cp-ad { margin: 26px 0; }

/* Author box appended to every post */
.cp-author-box {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  background: #FFFFFF;
  border: 1px solid #E7E0D2;
  border-radius: 20px;
  padding: 24px;
  margin: 36px 0 8px;
  box-shadow: 0 10px 30px rgba(23,30,32,.06);
}
.cp-author-img { width: 84px; height: 84px; border-radius: 50%; object-fit: cover; flex: none; }
.cp-author-name { font-size: 18px; font-weight: 700; color: #171E20; margin: 0 0 6px; }
.cp-author-bio { font-size: 15px; line-height: 1.65; color: #5A544A; margin: 0 0 8px; }
.cp-author-link { color: #EF5100; font-weight: 600; font-size: 15px; text-decoration: none; }

/* Related guides at the end of every post */
.cp-related { margin: 30px 0 10px; }
.cp-related-title { font-size: 24px; font-weight: 700; color: #171E20; margin: 0 0 18px; }
.cp-related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.cp-rel-card {
  background: #FFFFFF;
  border: 1px solid #E7E0D2;
  border-radius: 18px;
  overflow: hidden;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  box-shadow: 0 10px 30px rgba(23,30,32,.06);
}
.cp-rel-img { width: 100%; height: 120px; object-fit: cover; display: block; }
.cp-rel-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 7px; }
.cp-rel-chip {
  align-self: flex-start;
  background: #EF5100;
  color: #FFFFFF;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .05em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 999px;
}
.cp-rel-name { font-size: 15px; font-weight: 700; line-height: 1.35; color: #171E20; }

/* Single post sidebar cards */
body.single-post .is-right-sidebar .widget {
  background: #FFFFFF;
  border: 1px solid #E7E0D2;
  border-radius: 18px;
  padding: 22px;
  box-shadow: 0 10px 30px rgba(23,30,32,.05);
  margin-bottom: 26px;
}
body.single-post .is-right-sidebar .widget-title {
  font-size: 17px;
  font-weight: 700;
  color: #171E20;
  margin: 0 0 12px;
}
.cp-side-cta { text-align: left; }
.cp-side-cta h3 { font-size: 20px; font-weight: 800; color: #171E20; margin: 0 0 8px; }
.cp-side-cta p { font-size: 15px; line-height: 1.6; color: #5A544A; margin: 0 0 16px; }
.cp-side-btn {
  display: inline-block;
  background: #EF5100;
  color: #FFFFFF;
  font-weight: 600;
  font-size: 15px;
  padding: 12px 22px;
  border-radius: 999px;
  text-decoration: none;
}
.cp-side-author { text-align: center; }
.cp-side-author img { width: 78px; height: 78px; border-radius: 50%; object-fit: cover; margin-bottom: 10px; }
.cp-side-author h3 { font-size: 17px; font-weight: 700; color: #171E20; margin: 0 0 6px; }
.cp-side-author p { font-size: 14px; line-height: 1.6; color: #5A544A; margin: 0 0 10px; }
.cp-side-author a { color: #EF5100; font-weight: 600; font-size: 14px; text-decoration: none; }
body.single-post .is-right-sidebar .widget .wp-block-latest-posts li { margin-bottom: 10px; }
body.single-post .is-right-sidebar .widget .wp-block-latest-posts a {
  color: #171E20;
  font-weight: 600;
  font-size: 15px;
  line-height: 1.4;
  text-decoration: none;
}

@media (max-width: 900px) {
  body.single-post .entry-title { font-size: 29px; }
  .cp-related-grid { grid-template-columns: 1fr; }
  .cp-author-box { flex-direction: column; }
}
