
@font-face {
  font-family: 'RehlkoRunda';
  src: url('./fonts/RehlkoRunda-Regular.woff2') format('woff2');
  font-weight: normal;
  font-style: normal;
}

/* Allow sections to split across pages */
.pdf-section {
  page-break-inside: auto;
}

/* Prevent small rows from being cut */
.spec,
.form-group,
.pdf-value {
  page-break-inside: avoid;
  break-inside: avoid;
}


/* Force a new page before this element */
.pdf-page-break {
  page-break-before: always;
  break-before: page;
}

/* Prevent items from being split across pages */
.no-page-break {
  page-break-inside: avoid;
}


#download-pdf-btn {
  width: 180px;
  height: 60px;
  font-size: 0.99em;
  font-weight: 500;
  font-family: 'RehlkoRunda';
  display: inline-block;
  transition: transform 0.2s ease;
  transform-origin: center;
  background-color: #336EE5;
  border-color: #336EE5;
  border: 0;
  color: #fff;
  border-radius: 6px;
}


#download-pdf-btn:hover {
  transform: scale(0.95);
}


* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.epd-body {
    font-family: 'RehlkoRunda', sans-serif;
    background-color: #E6E7EB;
    padding: 10px;
}

.epd-p {
    font-family: 'RehlkoRunda', sans-serif;
    color: #000000;
    line-height: 1.6;
    font-size: 12px;
}

.visually-hidden {
  visibility: hidden;
}

.small-text{
  font-size: 0.7em;
}

.epd-section {
    margin-bottom: 30px;
}

.epd-select {
    font-family: 'RehlkoRunda', sans-serif;
    color: #666;
}

.font-runda {
    font-family: Runda;
}

.app-container {
    max-width: 800px;
    margin: 0 auto;
    background-color: white;
    padding: 20px;
    border-radius: 18px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.epd-h1 {
    color: #666;
    margin: 20px 0;
}

.epd-h2 {
    color: #666;
    margin: 20px 0;
}

.epd-h3 {
    color: #336EE5;
    margin: 20px 0;
}

.centered-text {
  text-align: center;
}

.left-text {
  text-align: left;
}

.form-group {
    margin-bottom: 15px;
}

.epd-label {
    font-family: 'RehlkoRunda', sans-serif;
    display: block;
    margin-bottom: 10px;
    color: #666;
    font-size: 0.85rem;
    font-weight: bold;
}

input, select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

#result {
    font-family: 'RehlkoRunda', sans-serif;
    margin-top: 20px;
    padding: 15px;
    background-color: #e7f3ff;
    border-left: 4px solid #336EE5;
    border-radius: 4px;
    display: none;
}

/* ===== Specs Grid ===== */
.specs {
    display: grid;
    grid-template-columns: 1fr; /* mobile-first: 1 column */
    gap: 12px;
    font-family: sans-serif;
}

.spec {
    font-family: 'RehlkoRunda', sans-serif;
    display: flex;
    flex-direction: column;
    border: 1px solid #ddd;
    padding: 10px;
    border-radius: 6px;
    background: #fafafa;
}

.value {
    font-family: 'RehlkoRunda', sans-serif;
    font-weight: 600;
    color: #666;
}

/* ===== Component Materials Horizontal Bar Chart ===== */
.cm-chart {
    width: 100%;
    max-width: 100%;
    font-family: sans-serif;
}

.bar-row {
    display: grid;
    grid-template-columns: clamp(80px, 30%, 100px) 1fr 40px; /* mobile-first fixed label + bar + value */
    align-items: center;
    gap: 8px;
    margin: 12px 0;
}

.bar-label {
    font-family: 'RehlkoRunda', sans-serif;
    font-size: 12px;
    white-space: nowrap;
}

.bar-container {
    position: relative;
    height: 12px;
    background: repeating-linear-gradient(
        to right,
        #eee,
        #eee 1px,
        transparent 1px,
        transparent 20%
    );
    border-radius: 0 6px 6px 0;
    overflow: hidden;
}

.bar {
    height: 100%;
    background: rgba(59,130,246,.5);
    border-radius: 0 6px 6px 0;
    width: 0;
    transition: width 0.6s ease;
}

.bar-value {
    font-size: 14px;
    text-align: right;
}


/* Climate Change Bar Chart */
.climate-change-impact-chart {
  width: 100%;
  margin-top: 30px;
}

.cc-chart {
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
}

.cc-bar-container {
  display: grid;
  grid-template-columns: 1fr 180px; /* bars | category axis */
  align-items: center;
  column-gap: 12px;
  margin-bottom: 14px;
}


.cc-bar-wrapper {
  position: relative;
  flex: 1;
  height: 14px;
  overflow: visible;
}

.cc-bar-value-outside {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  white-space: nowrap;
  font-size: 12px;
  line-height: 1;
}

.cc-zero-line {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 1px;
  background: #ccc;
}

.cc-bar {
  height: 100%;
  background: rgba(59,130,246,.5);
  transition: width 0.6s ease;
  position: absolute;
  top: 0;
  display: flex;
  align-items: center;
  font-size: 11px;
  color: #033;
  white-space: nowrap;
  overflow: hidden;
  z-index: 1;
  border-radius: 0; /* ← flat at zero by default */
}


/* Hide mobile value by default */
.cc-bar-value-mobile {
  display: none;
}


/* Positive bars */
.cc-bar.cc-positive {
  left: 50%;
  justify-content: flex-end;
  padding-right: 6px;
  border-radius: 0 6px 6px 0;
}

/* Negative bars */
.cc-bar.cc-negative {
  right: 50%;
  justify-content: flex-start;
  padding-left: 6px;
  border-radius: 6px 0 0 6px;
}

/* RIGHT LABEL */
.cc-bar-label {
  font-family: 'RehlkoRunda', sans-serif;
  font-size: 11px;
  font-weight: bold;
  color: #444;
  text-align: right;
  line-height: 1.3;
  white-space: normal;   /* allow wrapping */
}


/* Desktop default */
.cc-bar-value-full {
  display: inline-flex;
  align-items: center;
}

.cc-bar-percent-mobile {
  display: none;
}


/*Mobile */
@media (max-width: 700px) {
  .cc-bar-value-full {
    display: none;
  }

  .cc-bar-value-mobile {
    display: block;
    position: absolute;
    top: 50%;
    left: 50%;                 /* anchor at zero line */
    transform: translate(8px, -50%);
    font-size: 11px;
    font-weight: 600;
    color: #033;
    pointer-events: none;
    white-space: nowrap;
    z-index: 2;
  }
}
 

  
/*Desktop */
@media (min-width: 768px) {
  .cc-bar-wrapper {
    height: 20px;
  }

  .cc-bar-label {
    flex: 0 0 180px;
    font-size: 11px;
    text-align: right;
  }

  .cc-bar {
    font-size: 12px;
  }
}




/*Emissions factor table*/
.ef-table {
  width: 100%;
  border: 1px solid #ddd;
  border-radius: 6px;
  overflow: hidden;
}

/* Header */
.ef-header {
  display: none; /* hidden on mobile */
  background: #f5f5f5;
  font-weight: 600;
}

/* Rows */
.ef-row {
  display: flex;
  flex-direction: column;
  padding: 12px;
  border-bottom: 1px solid #eee;
}

.ef-label {
  font-size: 14px;
  margin-bottom: 6px;
  color: #333;
}

.ef-value {
  font-size: 14px;
  font-weight: 500;
  font-weight: bold;
}

/* Add labels on mobile */
.ef-value::before {
  content: attr(data-label);
  display: block;
  font-size: 14px;
  color: #777;
  font-weight: bold;
}

/* Desktop layout */
@media (min-width: 600px) {
  .ef-header {
    display: grid;
    grid-template-columns: 3fr 1fr 1fr;
    padding: 10px 12px;
  }

  .ef-row {
    display: grid;
    grid-template-columns: 3fr 1fr 1fr;
    align-items: center;
  }

  .ef-label {
    margin-bottom: 0;
  }

  .ef-value::before {
    display: none;
  }
}



/*Emissions factor table*/
.hvo-table {
  width: 100%;
  border: 1px solid #ddd;
  border-radius: 6px;
  overflow: hidden;
  font-family: 'RehlkoRunda', sans-serif;
}


/* Rows */
.hvo-row {
  display: flex;
  flex-direction: column;
  padding: 12px;
  border-bottom: 1px solid #eee;
}


.hvo-label {
  font-size: 14px;
  margin-bottom: 6px;
  color: #333;
}

.hvo-value {
  text-align: right;
  font-weight: bold;
}


/* Desktop layout */
@media (min-width: 600px) {
  .hvo-row {
    display: grid;
    grid-template-columns: 4fr 1fr;
    align-items: center;
  }

  .hvo-label {
    margin-bottom: 0;
  }

  .hvo-value::before {
    display: none;
    font-weight: bold;
  }
}

/*Concious Care table*/
.conscious-care-table {
  width: 100%;
  border: 1px solid #ddd;
  border-radius: 6px;
  overflow: hidden;
  font-family: 'RehlkoRunda', sans-serif;
}


/* Rows */
.conscious-care-row {
  display: flex;
  flex-direction: column;
  padding: 12px;
  border-bottom: 1px solid #eee;
}


.concious-care-label {
  font-size: 14px;
  margin-bottom: 6px;
  color: #333;
}

.conscious-care-value {
  text-align: right;
  font-weight: bold;
}


/* Desktop layout */
@media (min-width: 600px) {
  .conscious-care-row {
    display: grid;
    grid-template-columns: 4fr 1fr;
    align-items: center;
  }

  .conscious-care-label {
    margin-bottom: 0;
  }

  .conscious-care-value::before {
    display: none;
    font-weight: bold;
  }
}




/* ========== Climate Change Bar Chart ========= */


/* ===== Media Queries ===== */
@media (min-width: 401px) {
    .specs {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 768px) {
    .specs {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .specs {
        grid-template-columns: repeat(2, 1fr);
    }
}