/* ---- Polarisation losses model (CHM3005) ---- */

.pol-plot-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 20px;
    margin: 20px 0;
    align-items: start;
}

/* stops a wide Plotly chart from forcing the grid open */
.pol-plot-layout > * {
    min-width: 0;
}

.pol-plot {
    display: block;
    width: 100%;
}

.pol-loss-panel {
    position: sticky;
    top: 20px;
    height: fit-content;
}

.pol-loss-toggle {
    margin: 12px 0;
    padding: 12px;
    border: 2px solid rgba(128, 128, 128, 0.35);
    border-radius: 8px;
}

.pol-loss-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
}

.pol-loss-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    flex: 0 0 auto;
    cursor: pointer;
}

.pol-loss-description {
    margin-top: 8px;
    font-size: 0.9rem;
    line-height: 1.4;
    opacity: 0.85;
}

.pol-mode-row {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    margin: 15px 0;
}

.pol-mode-option {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.1rem;
    cursor: pointer;
}

.pol-mode-option input[type="radio"] {
    width: 20px;
    height: 20px;
    flex: 0 0 auto;
}

@media (max-width: 1024px) {
    .pol-plot-layout {
        grid-template-columns: 1fr;
    }

    .pol-loss-panel {
        position: static;
    }
}

@media (max-width: 640px) {
    .pol-mode-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .pol-mode-option {
        font-size: 1rem;
    }
}
