/* Product Selection Tool — shared UI for fan/exhaust (and future) selection pages */

.pst-page {
    background: #f7f9fc;
}

.pst-tool {
    max-width: 1080px;
    margin: 0 auto;
}

.pst-intro {
    text-align: center;
    margin-bottom: 28px;
}

.pst-intro .fh-section-title {
    /* margin-bottom: 8px; */
}

.pst-intro .fh-section-title h2 {
    font-size: 24px;
    padding-bottom: 0;
    line-height: 1.3;
}

.pst-intro .fh-section-title h2::before {
    display: none;
}

.pst-intro p {
    margin: 0 auto;
    max-width: 640px;
    font-size: 15px;
    line-height: 1.7;
    color: #475569;
    font-family: "Open Sans", sans-serif;
}

.pst-card {
    background: var(--white);
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06), 0 6px 20px rgba(2, 22, 50, 0.06);
    padding: 32px 36px;
}

.pst-card-title {
    margin: 0 0 14px;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.3;
    color: var(--primary-color);
    font-family: "Open Sans", sans-serif;
}

.pst-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px 24px;
}

.pst-field label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    font-weight: 600;
    color: #334155;
    font-family: "Open Sans", sans-serif;
}

.pst-field select {
    width: 100%;
    padding: 11px 14px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    background-color: var(--white);
    font-size: 14px;
    color: #334155;
    font-family: "Open Sans", sans-serif;
    outline: none;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
    appearance: auto;
}

.pst-field select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(14, 59, 110, 0.12);
}

.pst-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 26px;
}

.pst-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    min-height: 40px;
    min-width: 0;
    padding: 0 20px;
    border: 1px solid var(--primary-color);
    border-radius: 10px;
    background-color: var(--primary-color);
    color: var(--white);
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0;
    text-transform: none;
    font-family: "Open Sans", sans-serif;
    white-space: nowrap;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

.pst-btn:hover,
.pst-btn:focus {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
    color: var(--white);
    outline: none;
}

.pst-btn--secondary {
    background-color: var(--white);
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
    font-weight: 600;
}

.pst-btn--secondary:hover,
.pst-btn--secondary:focus {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--white);
}

.pst-result {
    display: none;
    margin-top: 24px;
    background: var(--white);
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06), 0 6px 20px rgba(2, 22, 50, 0.06);
    padding: 28px 32px;
}

.pst-result.is-visible {
    display: block;
}

/* Result popup modal */
.pst-popup {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 10050;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.pst-popup.is-visible {
    display: flex;
}

.pst-popup__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(2, 22, 50, 0.58);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    cursor: pointer;
}

.pst-popup__dialog {
    position: relative;
    z-index: 1;
    display: block;
    width: 100%;
    max-width: 680px;
    max-height: min(88vh, 820px);
    margin: 0;
    overflow-x: hidden;
    overflow-y: auto;
    background: var(--white);
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    box-shadow: 0 24px 64px rgba(2, 22, 50, 0.28);
    padding: 32px 36px 28px;
    -webkit-overflow-scrolling: touch;
    animation: pst-popup-in 0.28s ease;
}

.pst-popup.is-visible .pst-popup__dialog.pst-result,
.pst-popup .pst-popup__dialog.pst-result {
    display: block;
    margin-top: 0;
}

.pst-popup__close {
    position: absolute;
    top: 14px;
    right: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 1px solid #e2e8f0;
    border-radius: 50%;
    background: #f8fafc;
    color: #475569;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.pst-popup__close svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

.pst-popup__close:hover,
.pst-popup__close:focus {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--white);
    outline: none;
}

body.pst-popup-open {
    overflow: hidden;
}

@keyframes pst-popup-in {
    from {
        opacity: 0;
        transform: translateY(12px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.pst-result-title {
    margin: 0 0 12px;
    text-align: center;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.3;
    color: var(--primary-color);
    font-family: "Open Sans", sans-serif;
}

.pst-popup__dialog .pst-result-title {
    padding-right: 36px;
    font-size: 18px;
}

.pst-popup__dialog .pst-kv {
    margin-top: 4px;
}

.pst-popup__dialog .pst-result-actions {
    justify-content: center;
}

.pst-kv {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 16px;
}

.pst-kv li {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 12px 14px;
    font-family: "Open Sans", sans-serif;
}

.pst-kv li strong {
    display: block;
    margin-bottom: 4px;
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.pst-kv li span {
    display: block;
    font-size: 15px;
    font-weight: 600;
    color: #1e293b;
}

.pst-kv li.pst-solution-top {
    grid-column: 1 / -1;
    border: 2px solid var(--primary-color);
    background: rgba(14, 59, 110, 0.06);
}

.pst-kv li.pst-solution-top strong {
    font-size: 13px;
    color: var(--primary-color);
}

.pst-kv li.pst-solution-top span {
    margin-top: 4px;
    font-size: 22px;
    font-weight: 800;
    color: var(--primary-color);
    letter-spacing: 0.02em;
}

.pst-note {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 18px 0 0;
    padding: 12px 16px;
    border-radius: 8px;
    background: #fff7ed;
    border: 1px solid #fed7aa;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    color: var(--primary-color);
    font-family: "Open Sans", sans-serif;
}

.pst-note.is-visible {
    display: flex;
}

.pst-note .pst-note-icon {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    fill: currentColor;
}

.pst-toast {
    position: fixed;
    left: 50%;
    bottom: 28px;
    z-index: 10060;
    transform: translateX(-50%) translateY(16px);
    padding: 12px 18px;
    border-radius: 8px;
    background: #1e293b;
    color: var(--white);
    font-size: 14px;
    font-weight: 600;
    font-family: "Open Sans", sans-serif;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.pst-toast.is-visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.pst-toast-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    margin-right: 8px;
    border-radius: 50%;
    background: var(--secondary-color);
    vertical-align: middle;
}

.pst-result-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
    padding-top: 18px;
    border-top: 1px solid #e2e8f0;
}

.pst-result-actions button {
    appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    min-height: 40px;
    padding: 0 20px;
    border: 1px solid var(--primary-color);
    border-radius: 10px;
    background-color: var(--primary-color);
    color: var(--white);
    font-size: 15px;
    font-weight: 600;
    font-family: "Open Sans", sans-serif;
    white-space: nowrap;
    cursor: pointer;
    box-shadow: none;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

.pst-result-actions button:hover,
.pst-result-actions button:focus {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
    color: var(--white);
    outline: none;
    filter: none;
}

.pst-result-actions button.secondary {
    background-color: var(--white);
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
}

.pst-result-actions button.secondary:hover,
.pst-result-actions button.secondary:focus {
    background-color: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
}

.pst-print-brand {
    display: none;
}

@media print {
    @page {
        margin: 14mm 12mm;
    }

    html,
    body {
        background: #fff !important;
        color: #0f172a !important;
        height: auto !important;
        overflow: visible !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    body.pst-popup-open {
        overflow: visible !important;
    }

    /* Hide chrome / page chrome; keep only the solution popup */
    .site-utility-bar,
    .site-header,
    .product-page-nav,
    #content,
    .footer-widgets,
    .site-footer,
    .preloader,
    .scroll-to-top,
    .primary-mobile-nav,
    .off-canvas-layer,
    .pst-toast,
    .pst-actions,
    .pst-result-actions,
    .pst-popup__backdrop,
    .pst-popup__close,
    .no-print {
        display: none !important;
    }

    #page {
        display: block !important;
        width: 100% !important;
        max-width: none !important;
        margin: 0 !important;
        padding: 0 !important;
        background: #fff !important;
    }

    .pst-popup {
        display: none !important;
    }

    .pst-popup.is-visible {
        display: block !important;
        position: static !important;
        inset: auto !important;
        z-index: auto !important;
        width: 100% !important;
        max-width: none !important;
        height: auto !important;
        max-height: none !important;
        margin: 0 !important;
        padding: 0 !important;
        align-items: stretch !important;
        justify-content: flex-start !important;
        overflow: visible !important;
        background: transparent !important;
    }

    .pst-popup.is-visible .pst-popup__dialog,
    .pst-popup.is-visible .pst-result {
        display: block !important;
        position: static !important;
        inset: auto !important;
        z-index: auto !important;
        width: 100% !important;
        max-width: none !important;
        max-height: none !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow: visible !important;
        border: none !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        background: #fff !important;
        animation: none !important;
        transform: none !important;
    }

    .pst-print-brand {
        display: flex !important;
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
        margin: 0 0 18px;
        padding: 0 0 14px;
        border-bottom: 2px solid #0e3b6e;
    }

    .pst-print-logo {
        display: block !important;
        width: auto !important;
        max-width: 200px !important;
        height: auto !important;
        max-height: 52px !important;
        margin: 0 0 8px !important;
        object-fit: contain;
    }

    .pst-print-brand strong {
        display: block;
        font-size: 18px;
        font-weight: 700;
        line-height: 1.3;
        color: #0e3b6e !important;
        font-family: "Open Sans", sans-serif;
    }

    .pst-print-brand span {
        display: block;
        font-size: 13px;
        font-weight: 600;
        line-height: 1.4;
        color: #475569 !important;
        font-family: "Open Sans", sans-serif;
    }

    .pst-result-title {
        margin: 0 0 16px !important;
        padding: 0 !important;
        text-align: left !important;
        font-size: 16px !important;
        font-weight: 700 !important;
        color: #0f172a !important;
    }

    .pst-popup__dialog .pst-result-title {
        padding-right: 0 !important;
        font-size: 16px !important;
    }

    .pst-kv {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 10px 12px !important;
        margin: 0 !important;
        padding: 0 !important;
        list-style: none !important;
        page-break-inside: avoid;
    }

    .pst-kv li {
        break-inside: avoid;
        page-break-inside: avoid;
        background: #f8fafc !important;
        border: 1px solid #cbd5e1 !important;
        border-radius: 6px !important;
        padding: 10px 12px !important;
        box-shadow: none !important;
    }

    .pst-kv li strong {
        display: block !important;
        margin-bottom: 3px !important;
        font-size: 11px !important;
        font-weight: 700 !important;
        color: #64748b !important;
        text-transform: uppercase !important;
        letter-spacing: 0.03em !important;
    }

    .pst-kv li span {
        display: block !important;
        font-size: 14px !important;
        font-weight: 600 !important;
        color: #0f172a !important;
        word-break: break-word;
    }

    .pst-kv li.pst-solution-top {
        grid-column: 1 / -1 !important;
        background: #eef4fa !important;
        border: 2px solid #0e3b6e !important;
        padding: 14px 16px !important;
    }

    .pst-kv li.pst-solution-top strong {
        font-size: 12px !important;
        color: #0e3b6e !important;
    }

    .pst-kv li.pst-solution-top span {
        margin-top: 2px !important;
        font-size: 22px !important;
        font-weight: 800 !important;
        color: #0e3b6e !important;
        letter-spacing: 0.02em !important;
    }

    .pst-note {
        break-inside: avoid;
        page-break-inside: avoid;
        margin: 14px 0 0 !important;
        padding: 10px 12px !important;
        border-radius: 6px !important;
        background: #fff7ed !important;
        border: 1px solid #fdba74 !important;
        color: #0e3b6e !important;
        font-size: 12px !important;
    }

    .pst-note.is-visible {
        display: flex !important;
    }

    .pst-note .pst-note-icon {
        width: 16px !important;
        height: 16px !important;
        flex: 0 0 16px !important;
    }
}

@media (max-width: 991px) {
    .pst-card {
        padding: 26px 22px;
    }

    .pst-result,
    .pst-popup__dialog {
        padding: 22px;
    }
}

@media (max-width: 720px) {
    .pst-popup {
        padding: 12px;
        align-items: flex-end;
    }

    .pst-popup__dialog {
        max-width: 100%;
        max-height: min(92vh, 100%);
        border-radius: 14px 14px 10px 10px;
        padding: 24px 18px 20px;
        animation: pst-popup-in-mobile 0.28s ease;
    }

    .pst-grid,
    .pst-kv {
        grid-template-columns: 1fr;
    }

    .pst-actions,
    .pst-result-actions {
        flex-direction: column;
    }

    .pst-btn,
    .pst-result-actions button {
        width: 100%;
    }

    .pst-kv li.pst-solution-top span {
        font-size: 18px;
    }
}

@keyframes pst-popup-in-mobile {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Email result compose panel (shared with calculators) */
.calc-email-panel {
  position: fixed;
  inset: 0;
  z-index: 10080;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.calc-email-panel.is-visible {
  display: flex;
}

.calc-email-panel__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
}

.calc-email-panel__dialog {
  position: relative;
  z-index: 1;
  width: min(640px, 100%);
  max-height: min(90vh, 820px);
  overflow: auto;
  background: #fff;
  border: 1px solid #dbe3ee;
  border-radius: 14px;
  box-shadow: 0 18px 50px rgba(2, 22, 50, 0.28);
  padding: 20px 20px 16px;
  font-family: "Open Sans", system-ui, sans-serif;
}

.calc-email-panel__close {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 36px;
  height: 36px;
  border: 0;
  background: transparent;
  font-size: 28px;
  line-height: 1;
  color: #64748b;
  cursor: pointer;
}

.calc-email-panel__dialog h3 {
  margin: 0 36px 6px 0;
  font-size: 20px;
  color: #0b3057;
}

.calc-email-panel__hint {
  margin: 0 0 14px;
  font-size: 13px;
  color: #64748b;
}

.calc-email-panel__dialog label {
  display: block;
  margin: 10px 0 4px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #475569;
}

.calc-email-panel__dialog input,
.calc-email-panel__dialog textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #d0dae6;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 14px;
  color: #1e293b;
  background: #fff;
}

.calc-email-panel__dialog input[readonly] {
  background: #f8fafc;
}

.calc-email-panel__dialog textarea {
  resize: vertical;
  min-height: 180px;
  line-height: 1.45;
  font-family: "Open Sans", system-ui, sans-serif;
}

.calc-email-panel__preview {
  min-height: 180px;
  max-height: min(42vh, 360px);
  overflow: auto;
  padding: 14px 16px;
  border: 1px solid #dbe3ee;
  border-radius: 10px;
  background: #fff;
  line-height: 1.5;
  font-family: "Open Sans", system-ui, sans-serif;
  color: #334155;
}

.calc-email-panel__preview:focus {
  outline: 2px solid rgba(11, 48, 87, 0.25);
  outline-offset: 1px;
}

.calc-email-panel__preview strong {
  color: #0b3057;
}

.calc-email-panel__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.calc-email-panel__btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 16px;
  border-radius: 10px;
  border: 1px solid var(--primary-color, #0b3057);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

.calc-email-panel__btn.primary {
  background: var(--primary-color, #0b3057);
  color: #fff;
}

.calc-email-panel__btn.secondary {
  background: #fff;
  color: var(--primary-color, #0b3057);
}

.calc-email-panel__btn.ghost {
  background: #f1f5f9;
  border-color: #d0dae6;
  color: #334155;
}

.calc-email-panel__status {
  min-height: 18px;
  margin: 10px 0 0;
  font-size: 13px;
  color: #0b3057;
  font-weight: 600;
}

body.calc-email-open {
  overflow: hidden;
}

@media (max-width: 575px) {
  .calc-email-panel__actions {
    flex-direction: column;
  }

  .calc-email-panel__btn {
    width: 100%;
  }
}

@media print {
  .calc-email-panel {
    display: none !important;
  }
}

/* Axial fan multi-match results inside PST popup */
.aft-result-dialog {
  max-width: 920px;
}

.aft-solutions {
  margin-top: 18px;
  text-align: left;
}

.aft-solution {
  margin-top: 24px;
  padding: 18px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #f9fafc;
}

.aft-solution:first-child {
  margin-top: 0;
}

.aft-solution h4 {
  margin: 0 0 16px;
  font-size: 20px;
  font-weight: 700;
  color: var(--primary-color);
  font-family: "Open Sans", sans-serif;
  line-height: 1.3;
}

.aft-solution-specs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px 14px;
}

.aft-solution-spec {
  padding: 10px 12px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
}

.aft-solution-spec b {
  display: inline;
  margin-bottom: 0;
  font-size: 13px;
  font-weight: 700;
  color: #0b3057;
  font-family: "Open Sans", sans-serif;
}

.aft-solution-spec span {
  display: inline;
  font-size: 13px;
  line-height: 1.45;
  color: #334155;
  font-family: "Open Sans", sans-serif;
  white-space: pre-line;
}

.aft-empty {
  background: #fff7ed;
  border: 1px solid #fdba74;
  border-radius: 10px;
  padding: 18px;
  color: #7c2d12;
  font-size: 14px;
  font-family: "Open Sans", sans-serif;
  text-align: left;
}

@media (max-width: 850px) {
  .aft-solution-specs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 575px) {
  .aft-solution-specs {
    grid-template-columns: 1fr;
  }
}

@media print {
  .aft-result-dialog {
    max-width: none;
  }

  .aft-solution {
    break-inside: avoid;
  }
}
