/* ITS Solar – Pool heat pump sizing calculator trigger + modal.
   Scoped to .pool-calc-* selectors only; loaded on pool heat pump pages.
   The calculator itself renders inside an iframe with its own styles. */

/* ── Trigger (sits below the Add to Cart row, never modifies it) ── */
.pool-calc-hint {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: -1rem 0 2rem;
    font-size: 0.875rem;
    line-height: 1.25rem;
    color: #4B5563;
}
.pool-calc-hint > i {
    color: #EA580B;
    font-size: 1.125rem;
    flex-shrink: 0;
}
.pool-calc-hint__button {
    background: none;
    border: 0;
    padding: 0;
    font: inherit;
    font-weight: 600;
    color: #004A8F;
    text-decoration: underline;
    text-underline-offset: 2px;
    cursor: pointer;
    transition: color 0.15s ease;
}
.pool-calc-hint__button:hover,
.pool-calc-hint__button:focus-visible {
    color: #EA580B;
    outline: none;
}

/* Compact variant for category cards */
.pool-calc-hint--compact {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    margin: 0.5rem 0 0;
    padding: 0;
    background: none;
    border: 0;
    font: inherit;
    font-size: 0.7rem;
    line-height: 1rem;
    color: #004A8F;
    text-decoration: underline;
    text-underline-offset: 2px;
    cursor: pointer;
    transition: color 0.15s ease;
}
.pool-calc-hint--compact > i {
    color: #EA580B;
    font-size: 0.9rem;
}
.pool-calc-hint--compact:hover,
.pool-calc-hint--compact:focus-visible {
    color: #EA580B;
    outline: none;
}

/* ── Modal shell ── */
html.pool-calc-modal-open,
html.pool-calc-modal-open body {
    overflow: hidden;
}
.pool-calc-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(2px);
}
.pool-calc-modal[hidden] {
    display: none;
}
.pool-calc-modal__panel {
    display: flex;
    flex-direction: column;
    width: min(1100px, 100%);
    height: min(92vh, 960px);
    background: #FFFFFF;
    border-radius: 1rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
    overflow: hidden;
}
.pool-calc-modal__bar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 0.75rem 0.625rem 1rem;
    border-bottom: 1px solid #E5E7EB;
    background: #FFFFFF;
    font-family: Inter, ui-sans-serif, system-ui, sans-serif;
}
.pool-calc-modal__title {
    flex: 1;
    font-size: 0.875rem;
    font-weight: 700;
    color: #1E293B;
}
.pool-calc-modal__open {
    font-size: 0.75rem;
    font-weight: 600;
    color: #004A8F;
    text-decoration: underline;
    text-underline-offset: 2px;
}
.pool-calc-modal__open:hover {
    color: #EA580B;
}
.pool-calc-modal__close {
    width: 2.25rem;
    height: 2.25rem;
    border: 0;
    border-radius: 9999px;
    background: transparent;
    color: #6B7280;
    font-size: 1.75rem;
    line-height: 1;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease;
}
.pool-calc-modal__close:hover,
.pool-calc-modal__close:focus-visible {
    background: #F3F4F6;
    color: #1E293B;
    outline: none;
}
.pool-calc-modal__frame {
    flex: 1;
    width: 100%;
    border: 0;
    background: #FFFFFF;
}

@media (max-width: 640px) {
    .pool-calc-modal {
        padding: 0;
    }
    .pool-calc-modal__panel {
        width: 100%;
        height: 100%;
        border-radius: 0;
    }
}
