/* si-tools-common.css
   Shared styles for Silver Instruments unit converter tools:
   pressure-converter.html / flow-converter.html / mass-flow-converter.html
   Covers: site header, related-product recommendation card, site footer (desktop + mobile).
   Tool-specific styles (panel, listbox, result box, etc.) stay inline in each HTML file.
*/

* { box-sizing: border-box; }
body { margin: 0; }

/* ---- Site header ---- */
.si-site-header {
  width: 100%;
  background: #ffffff;
  border-bottom: 1px solid #e5e7eb;
  border-top: 3px solid #7cca0a;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}
.si-site-header-inner {
  display: flex;
  max-width: 1140px;
  margin: 0 auto;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 10px 20px;
}
.si-site-logo img { height: 60px; display: block; }
.si-site-nav { display: flex; gap: 20px; flex-wrap: wrap; }
.si-nav-item { position: relative; }
.si-nav-item > a {
  color: #374151;
  text-decoration: none;
  font-size: 15px;
  font-weight: 600;
}
.si-nav-item > a:hover { color: #2872ad; }
.si-nav-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: -14px;
  border-top: 14px solid transparent;
  background: #f0f1f3;
  background-clip: padding-box;
  border-radius: 0;
  padding: 12px 0;
  min-width: 220px;
  z-index: 50;
}
.si-nav-item:hover .si-nav-dropdown { display: block; }
.si-nav-dropdown a {
  display: block;
  padding: 10px 20px;
  font-size: 14px;
  color: #374151;
  text-decoration: none;
  white-space: nowrap;
}
.si-nav-dropdown a:hover { color: #2872ad; }
.si-site-contact { display: flex; gap: 16px; flex-wrap: wrap; font-size: 13px; }
.si-contact-item { display: inline-flex; align-items: center; gap: 4px; }
.si-site-contact a { color: #2872ad; text-decoration: none; font-weight: 600; }
.si-site-contact a:hover { text-decoration: underline; }
.si-nav-contact {
  background: #ff6800;
  color: #fff!important;
  padding: 4px 14px;
  border-radius: 6px;
}

@media (max-width: 640px) {
  .si-site-header-inner { justify-content: center; text-align: center; }
  .si-site-nav { justify-content: center; gap: 15px;}
  .si-nav-dropdown { left: 50%; transform: translateX(-50%); }
  .si-site-contact { justify-content: center; }
}

/* ---- Related product recommendation ---- */
.si-recommend {
  max-width: 960px;
  margin: 8px auto 40px;
  padding: 0 16px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}
.si-recommend-title {
  font-size: 14px;
  font-weight: 700;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: .04em;
  margin: 0 0 10px;
}
.si-recommend-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: #f3f4f6;
  border-radius: 10px;
  padding: 14px;
  text-decoration: none;
  transition: background .15s ease;
}
.si-recommend-card:hover { background: #e9ebee; }
.si-recommend-card img {
  width: 96px;
  height: 96px;
  object-fit: cover;
  border-radius: 8px;
  background: #fff;
  flex-shrink: 0;
}
.si-recommend-info h3 {
  margin: 0 0 4px;
  font-size: 16px;
  color: #111827;
}
.si-recommend-info p {
  margin: 0 0 6px;
  font-size: 13px;
  color: #6b7280;
  line-height: 1.5;
}
.si-recommend-cta {
  font-size: 13px;
  font-weight: 700;
  color:#2872ad;
}
@media (max-width: 480px) {
  .si-recommend-card { flex-direction: column; align-items: flex-start; }
  .si-recommend-card img { width: 100%; height: 160px; }
}

/* ---- Site footer ---- */
.si-site-footer {
  width: 100%;
  background: #f0f1f3;
  border-top: 1px solid #e5e7eb;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  margin-top: 20px;
}
.si-footer-inner {
  max-width: 1140px;
  margin: 0 auto;
  padding: 40px 20px 20px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.si-footer-col h4 {
  font-size: 15px;
  font-weight: 700;
  color: #111827;
  margin: 0 0 14px;
}
.si-footer-col ul { list-style: none; margin: 0; padding: 0; }
.si-footer-col li { margin-bottom: 9px; }
.si-footer-col a {
  color: #4b5563;
  text-decoration: none;
  font-size: 13.5px;
}
.si-footer-col a:hover { color: #2872ad; text-decoration: underline; }
.si-footer-col span { color: #4b5563; font-size: 13.5px; }
.si-footer-contact p {
  margin: 0 0 9px;
  font-size: 13.5px;
  color: #4b5563;
  line-height: 1.5;
  display: flex;
  align-items: flex-start;
  gap: 7px;
}
.si-footer-contact a { color: #4b5563; text-decoration: none; }
.si-footer-contact a:hover { color: #2872ad; text-decoration: underline; }
.si-footer-bottom {
  max-width: 1140px;
  margin: 0 auto;
  padding: 16px 20px;
  border-top: 1px solid #e0e1e3;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 12.5px;
  color: #6b7280;
}
.si-footer-bottom a { color: #6b7280; text-decoration: none; margin-left: 14px; }
.si-footer-bottom a:hover { text-decoration: underline; }
@media (max-width: 860px) {
  .si-footer-inner { grid-template-columns: repeat(2, 1fr); }
}
.si-footer-mobile { display: none; }
@media (max-width: 480px) {
  .si-footer-inner { display: none; }
.si-footer-bottom { display: none; }
  .si-footer-mobile {
    display: block;
    background: #2b2f36;
    padding: 20px 16px 10px;
  }
  .si-footer-mobile h4 {
    color: #ffffff;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: .03em;
    margin: 0 0 12px;
  }
  .si-footer-mobile-nav {
    list-style: none;
    margin: 0 0 26px;
    padding: 0;
  }
  .si-footer-mobile-nav li {
    border-bottom: 1px solid rgba(255,255,255,.14);
  }
  .si-footer-mobile-nav a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 13px 2px;
    color: #ffffff;
    text-decoration: none;
    font-size: 14.5px;
  }
  .si-footer-mobile-nav a::after {
    content: "\203A";
    font-size: 19px;
    color: #9ca3af;
  }
  .si-footer-mobile-contact p {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    color: #d1d5db;
    font-size: 13.5px;
    line-height: 1.5;
    margin: 0 0 12px;
  }
  .si-footer-mobile-contact a {
    color: #d1d5db;
    text-decoration: underline;
  }
  .si-footer-bottom { flex-direction: column; text-align: center; }
  .si-footer-bottom a { margin: 0 8px; }
}

/* ---- Converter tool UI (tabs, panel, listboxes, selects, result box) ----
   Currently identical across all three converters; kept here since they share one look. ---- */
  #si-tool-root, #si-tool-root * { box-sizing: border-box; }
  #si-tool-root {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    color: #1f2937;
    max-width: 960px;
    margin: 0 auto;
    padding: 24px 16px 48px;
  }
  .si-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    border-bottom: 2px solid #e5e7eb;
    flex-wrap: wrap;
  }
  .si-tab {
    display: inline-block;
    padding: 10px 18px;
    font-size: 14px;
    font-weight: 600;
    color: #4b5563;
    text-decoration: none;
    border-radius: 8px 8px 0 0;
    margin-bottom: -2px;
    transition: color .15s ease, background-color .15s ease;
  }
  .si-tab:hover { color: #7cca0a; background: #f3f4f6; }
  .si-tab.si-active {
    color: #ffffff;
    background: #7cca0a;
  }
  .si-tab.si-active:hover { color: #ffffff; background: #7cca0a; }
  .si-title {
    font-size: 26px;
    font-weight: 700;
    color: #2872ad;
    margin: 0 0 4px;
  }
  .si-subtitle {
    font-size: 14px;
    color: #6b7280;
    margin: 0 0 20px;
  }
  .si-panel {
    background: #f3f4f6;
    border-radius: 10px;
    padding: 20px;
  }
  .si-amount-row { margin-bottom: 18px; }
  .si-amount-col { margin-bottom: 12px; }
  .si-result-col { margin-bottom: 12px; }
  .si-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 6px;
  }
  .si-input {
    width: 100%;
    font-size: 20px;
    padding: 12px 14px;
    border: 2px solid #1f2937;
    border-radius: 8px;
    background: #fff;
    color: #111827;
  }
  .si-input:focus { outline: none; border-color: #2872ad; }
  .si-result-box {
    background: #ffffff;
    border: 2px solid #7cca0a;
    border-radius: 8px;
    padding: 12px 14px;
    font-size: 18px;
    font-weight: 700;
    color: #2872ad;
    word-break: break-word;
  }
  .si-result-unit { font-size: 14px; font-weight: 600; color: #4b5563; margin-left: 6px; }

  /* Desktop dual list box */
  .si-lists {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }
  .si-list-col { min-width: 0; }
  .si-listbox {
    list-style: none;
    margin: 0;
    padding: 4px;
    height: 320px;
    overflow-y: auto;
    background: #fff;
    border: 1px solid #d1d5db;
    border-radius: 8px;
  }
  .si-listbox li {
    padding: 7px 10px;
    font-size: 14px;
    color: #1d4ed8;
    cursor: pointer;
    border-radius: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .si-listbox li:hover { background: #eef2ff; }
  .si-listbox li.si-selected {
    background: #d1d5db;
    color: #111827;
    font-weight: 700;
  }

  /* Mobile select dropdown, hidden on desktop */
  .si-select-wrap { display: none; margin-top: 10px; }
  .si-select {
    width: 100%;
    font-size: 15px;
    padding: 10px 12px;
    border: 2px solid #1f2937;
    border-radius: 8px;
    background: #fff;
    color: #111827;
  }

  .si-note {
    margin-top: 18px;
    font-size: 12px;
    color: #9ca3af;
    line-height: 1.6;
  }

  @media (min-width: 721px) {
    .si-amount-row {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 16px;
      align-items: start;
    }
    .si-amount-col, .si-result-col { margin-bottom: 0; }
  }

  @media (max-width: 720px) {
    .si-lists { display: none; }
    .si-select-wrap { display: block; }
    .si-title { font-size: 22px; }
  }